{"action":"closed","number":103,"pull_request":{"url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/pulls/103","id":230670764,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwNjcwNzY0","html_url":"https://github.com/mongodb/stitch-ios-sdk/pull/103","diff_url":"https://github.com/mongodb/stitch-ios-sdk/pull/103.diff","patch_url":"https://github.com/mongodb/stitch-ios-sdk/pull/103.patch","issue_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/issues/103","number":103,"state":"closed","locked":false,"title":"STITCH-2211 Swift SDK: Create data models and implement local event coalescence","user":{"login":"jsflax","id":4356928,"node_id":"MDQ6VXNlcjQzNTY5Mjg=","avatar_url":"https://avatars3.githubusercontent.com/u/4356928?v=4","gravatar_id":"","url":"https://api.github.com/users/jsflax","html_url":"https://github.com/jsflax","followers_url":"https://api.github.com/users/jsflax/followers","following_url":"https://api.github.com/users/jsflax/following{/other_user}","gists_url":"https://api.github.com/users/jsflax/gists{/gist_id}","starred_url":"https://api.github.com/users/jsflax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsflax/subscriptions","organizations_url":"https://api.github.com/users/jsflax/orgs","repos_url":"https://api.github.com/users/jsflax/repos","events_url":"https://api.github.com/users/jsflax/events{/privacy}","received_events_url":"https://api.github.com/users/jsflax/received_events","type":"User","site_admin":false},"body":"# \"Port\" the following classes:\r\n## InstanceSynchronization:\r\n- InstanceSynchronization now acts as a container for an internal config (`InstanceSynchronization.Config`). This was due to the fact that the current Java equivalent can exist in a partial state, which is a no-go in Swift. It also cleans up a significant amount of the encoding/decoding code, which was cumbersome. IMO, we should make these changes on Java as well.\r\n- Conformance to `Sequence`. Can iterate through `NamespaceSynchronization.Configs`.\r\n- Subscript access. `InstanceSynchronization` subscript uses a mutating getter to either get existing `NamespaceSynchronization`s or will create new ones.\r\n## NamespaceSynchronization\r\n- See above for container information.\r\n- Conformance to `Sequence`. Can iterate through `CoreDocumentSynchronization.Configs`.\r\n- Subscript access. `NamespaceSynchronization` subscript will either fetch existing `CoreDocumentSynchronization` by `id` or can set new ones by id.\r\n## CoreDocumentSynchronization\r\n- See above for container information. `Config` properties are now private. The properties are exposed in the outlying struct `CoreDocumentSynchronization` as computed properties. These getters/setters are synchronized via a `ReadWriteLock`, with the setters mutating the underlying `config`.\r\n## ChangeEvent\r\n- `OperationType` has been moved out to its own enum. \r\n    - The string values of each case are now implicit.\r\n- `transform` (the method that converts a ChangeEvent with an associated type of `Document` to a user associated type) now takes on a more Swifty shape.\r\n## UpdateDescription\r\n- `UpdateDescription` has been moved out to its own class.\r\n- Conversion to a `Document` is now computed lazily.\r\n- `diff` is now a method extended to the `Document` class.\r\n## ConflictHandler\r\n- Uses associated types, which forces us to store locally using type erasure.\r\n## ChangeEventListener\r\n- Uses associated types, which forces us to store locally using type erasure.\r\n## MongoNamespace\r\n- Not sure why this class doesn't exist on `MongoMobile`. Simple port-over.\r\n## DocumentVersionInfo\r\n- `nextVersionDocument` is now lazily computed.\r\n## ReadWriteLock\r\n- Swift doesn't have a default RWLock, so this is a simple wrapper above `pthread_rwlock_t`.\r\n\r\n## Other additions, notable or otherwise:\r\n- More comments.\r\n- More tests.\r\n- Take advantage of nullability and mutability.\r\n- More Swift.","created_at":"2018-11-14T00:22:39Z","updated_at":"2018-11-16T21:29:07Z","closed_at":"2018-11-16T21:29:06Z","merged_at":"2018-11-16T21:29:06Z","merge_commit_sha":"4c6f037ed9e504f272d44a4a6dd8ff70d5d4fd6a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/pulls/103/commits","review_comments_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/pulls/103/comments","review_comment_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/issues/103/comments","statuses_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/statuses/969b404913b415608725d6c19e94cd458585a0c0","head":{"label":"jsflax:STITCH-2211","ref":"STITCH-2211","sha":"969b404913b415608725d6c19e94cd458585a0c0","user":{"login":"jsflax","id":4356928,"node_id":"MDQ6VXNlcjQzNTY5Mjg=","avatar_url":"https://avatars3.githubusercontent.com/u/4356928?v=4","gravatar_id":"","url":"https://api.github.com/users/jsflax","html_url":"https://github.com/jsflax","followers_url":"https://api.github.com/users/jsflax/followers","following_url":"https://api.github.com/users/jsflax/following{/other_user}","gists_url":"https://api.github.com/users/jsflax/gists{/gist_id}","starred_url":"https://api.github.com/users/jsflax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsflax/subscriptions","organizations_url":"https://api.github.com/users/jsflax/orgs","repos_url":"https://api.github.com/users/jsflax/repos","events_url":"https://api.github.com/users/jsflax/events{/privacy}","received_events_url":"https://api.github.com/users/jsflax/received_events","type":"User","site_admin":false},"repo":{"id":110735788,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA3MzU3ODg=","name":"stitch-ios-sdk","full_name":"jsflax/stitch-ios-sdk","private":false,"owner":{"login":"jsflax","id":4356928,"node_id":"MDQ6VXNlcjQzNTY5Mjg=","avatar_url":"https://avatars3.githubusercontent.com/u/4356928?v=4","gravatar_id":"","url":"https://api.github.com/users/jsflax","html_url":"https://github.com/jsflax","followers_url":"https://api.github.com/users/jsflax/followers","following_url":"https://api.github.com/users/jsflax/following{/other_user}","gists_url":"https://api.github.com/users/jsflax/gists{/gist_id}","starred_url":"https://api.github.com/users/jsflax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsflax/subscriptions","organizations_url":"https://api.github.com/users/jsflax/orgs","repos_url":"https://api.github.com/users/jsflax/repos","events_url":"https://api.github.com/users/jsflax/events{/privacy}","received_events_url":"https://api.github.com/users/jsflax/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jsflax/stitch-ios-sdk","description":null,"fork":true,"url":"https://api.github.com/repos/jsflax/stitch-ios-sdk","forks_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/forks","keys_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/teams","hooks_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/hooks","issue_events_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/events","assignees_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/tags","blobs_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/languages","stargazers_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/stargazers","contributors_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/contributors","subscribers_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/subscribers","subscription_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/subscription","commits_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/merges","archive_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/downloads","issues_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/labels{/name}","releases_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/jsflax/stitch-ios-sdk/deployments","created_at":"2017-11-14T19:35:26Z","updated_at":"2018-11-14T19:01:16Z","pushed_at":"2018-11-16T20:26:14Z","git_url":"git://github.com/jsflax/stitch-ios-sdk.git","ssh_url":"git@github.com:jsflax/stitch-ios-sdk.git","clone_url":"https://github.com/jsflax/stitch-ios-sdk.git","svn_url":"https://github.com/jsflax/stitch-ios-sdk","homepage":null,"size":195449,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mongodb:sync","ref":"sync","sha":"da131deb5e1e230775c28c1e0b0e3c95d6b09823","user":{"login":"mongodb","id":45120,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MTIw","avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"repo":{"id":93444591,"node_id":"MDEwOlJlcG9zaXRvcnk5MzQ0NDU5MQ==","name":"stitch-ios-sdk","full_name":"mongodb/stitch-ios-sdk","private":false,"owner":{"login":"mongodb","id":45120,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MTIw","avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mongodb/stitch-ios-sdk","description":null,"fork":false,"url":"https://api.github.com/repos/mongodb/stitch-ios-sdk","forks_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/forks","keys_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/teams","hooks_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/hooks","issue_events_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/events","assignees_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/tags","blobs_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/languages","stargazers_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/stargazers","contributors_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/contributors","subscribers_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/subscribers","subscription_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/subscription","commits_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/merges","archive_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/downloads","issues_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/labels{/name}","releases_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb/stitch-ios-sdk/deployments","created_at":"2017-06-05T20:37:29Z","updated_at":"2018-11-16T17:17:29Z","pushed_at":"2018-11-16T21:29:06Z","git_url":"git://github.com/mongodb/stitch-ios-sdk.git","ssh_url":"git@github.com:mongodb/stitch-ios-sdk.git","clone_url":"https://github.com/mongodb/stitch-ios-sdk.git","svn_url":"https://github.com/mongodb/stitch-ios-sdk","homepage":null,"size":27857,"stargazers_count":20,"watchers_count":20,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":7,"open_issues":3,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb/stitch-ios-sdk/pulls/103"},"html":{"href":"https://github.com/mongodb/stitch-ios-sdk/pull/103"},"issue":{"href":"https://api.github.com/repos/mongodb/stitch-ios-sdk/issues/103"},"comments":{"href":"https://api.github.com/repos/mongodb/stitch-ios-sdk/issues/103/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb/stitch-ios-sdk/pulls/103/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb/stitch-ios-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb/stitch-ios-sdk/pulls/103/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb/stitch-ios-sdk/statuses/969b404913b415608725d6c19e94cd458585a0c0"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"jsflax","id":4356928,"node_id":"MDQ6VXNlcjQzNTY5Mjg=","avatar_url":"https://avatars3.githubusercontent.com/u/4356928?v=4","gravatar_id":"","url":"https://api.github.com/users/jsflax","html_url":"https://github.com/jsflax","followers_url":"https://api.github.com/users/jsflax/followers","following_url":"https://api.github.com/users/jsflax/following{/other_user}","gists_url":"https://api.github.com/users/jsflax/gists{/gist_id}","starred_url":"https://api.github.com/users/jsflax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsflax/subscriptions","organizations_url":"https://api.github.com/users/jsflax/orgs","repos_url":"https://api.github.com/users/jsflax/repos","events_url":"https://api.github.com/users/jsflax/events{/privacy}","received_events_url":"https://api.github.com/users/jsflax/received_events","type":"User","site_admin":false},"comments":2,"review_comments":127,"maintainer_can_modify":false,"commits":9,"additions":3050,"deletions":789,"changed_files":50}}
{"actor":{"display_login":"jsflax"}}