{"action":"closed","number":663,"pull_request":{"url":"https://api.github.com/repos/dynamoosejs/dynamoose/pulls/663","id":303676675,"node_id":"MDExOlB1bGxSZXF1ZXN0MzAzNjc2Njc1","html_url":"https://github.com/dynamoosejs/dynamoose/pull/663","diff_url":"https://github.com/dynamoosejs/dynamoose/pull/663.diff","patch_url":"https://github.com/dynamoosejs/dynamoose/pull/663.patch","issue_url":"https://api.github.com/repos/dynamoosejs/dynamoose/issues/663","number":663,"state":"closed","locked":false,"title":"Update batchPut to allow partial update in typescript","user":{"login":"mckernanin","id":6300047,"node_id":"MDQ6VXNlcjYzMDAwNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/6300047?v=4","gravatar_id":"","url":"https://api.github.com/users/mckernanin","html_url":"https://github.com/mckernanin","followers_url":"https://api.github.com/users/mckernanin/followers","following_url":"https://api.github.com/users/mckernanin/following{/other_user}","gists_url":"https://api.github.com/users/mckernanin/gists{/gist_id}","starred_url":"https://api.github.com/users/mckernanin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mckernanin/subscriptions","organizations_url":"https://api.github.com/users/mckernanin/orgs","repos_url":"https://api.github.com/users/mckernanin/repos","events_url":"https://api.github.com/users/mckernanin/events{/privacy}","received_events_url":"https://api.github.com/users/mckernanin/received_events","type":"User","site_admin":false},"body":"<!-- THANK YOU for your contribution to Dynamoose, we really appreciate you taking the time to improve this package, and look forward to reviewing your PR and getting the changes integrated into the package. Thanks again!! -->\r\n\r\n\r\n### Summary:\r\nbatchPut can take a partial update, but the current types don't allow for it. Updating types on batchPut to fix that.\r\n\r\n\r\n\r\n<!-- Please remove the `Code sample` section below if it doesn't apply to this PR -->\r\n### Code sample:\r\n#### Schema\r\n```\r\nconst schema = new dynamoose.Schema({\r\n  id: Number,\r\n  name: String,\r\n  main: {\r\n    type: Boolean\r\n  },\r\n  displayName: String,\r\n  alts: {\r\n    type: \"list\",\r\n    list: [\r\n      {\r\n        type: String\r\n      }\r\n    ]\r\n  }\r\n});\r\n```\r\n\r\n#### Model\r\n```\r\nexport const Character = dynamoose.model<CharacterModel, {}>(\r\n  'character',\r\n  schema\r\n);\r\n```\r\n\r\n#### General\r\n```\r\nexport const batchUpdateCharacters = async (\r\n  toUpdate: Partial<CharacterModel>[]\r\n): Promise<CharacterModel[]> =>\r\n  await Character.batchPut(toUpdate, {\r\n    condition: \"attribute_not_exists(Id)\"\r\n  });\r\n```\r\n\r\n### Is this ready to be merged into Dynamoose? (select 1):\r\n- [ ] Yes\r\n- [x] No\r\n\r\n\r\n### Other:\r\n- [x] I have searched through the GitHub pull requests to ensure this PR has not already been submitted\r\n- [ ] I have updated the Dynamoose documentation (if required) given the changes I made\r\n- [ ] I have added/updated the Dynamoose test cases (if required) given the changes I made\r\n- [x] I agree that all changes made in this pull request may be distributed and are made available in accordance with the [Dynamoose license](https://github.com/dynamoosejs/dynamoose/blob/master/LICENSE.txt)\r\n- [x] All of my commits and commit messages are detailed, explain what changes were made, and are easy to follow and understand\r\n- [x ] I have filled out all fields above\r\n","created_at":"2019-08-02T07:41:52Z","updated_at":"2019-08-25T01:28:53Z","closed_at":"2019-08-25T01:28:53Z","merged_at":null,"merge_commit_sha":"2bcac500b2d3fc1a822e6eb96c59943ff8cdc06a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dynamoosejs/dynamoose/pulls/663/commits","review_comments_url":"https://api.github.com/repos/dynamoosejs/dynamoose/pulls/663/comments","review_comment_url":"https://api.github.com/repos/dynamoosejs/dynamoose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dynamoosejs/dynamoose/issues/663/comments","statuses_url":"https://api.github.com/repos/dynamoosejs/dynamoose/statuses/a31f48e32f8c4767d08b2d442ace6c4141942909","head":{"label":"mckernanin:master","ref":"master","sha":"a31f48e32f8c4767d08b2d442ace6c4141942909","user":{"login":"mckernanin","id":6300047,"node_id":"MDQ6VXNlcjYzMDAwNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/6300047?v=4","gravatar_id":"","url":"https://api.github.com/users/mckernanin","html_url":"https://github.com/mckernanin","followers_url":"https://api.github.com/users/mckernanin/followers","following_url":"https://api.github.com/users/mckernanin/following{/other_user}","gists_url":"https://api.github.com/users/mckernanin/gists{/gist_id}","starred_url":"https://api.github.com/users/mckernanin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mckernanin/subscriptions","organizations_url":"https://api.github.com/users/mckernanin/orgs","repos_url":"https://api.github.com/users/mckernanin/repos","events_url":"https://api.github.com/users/mckernanin/events{/privacy}","received_events_url":"https://api.github.com/users/mckernanin/received_events","type":"User","site_admin":false},"repo":{"id":200188599,"node_id":"MDEwOlJlcG9zaXRvcnkyMDAxODg1OTk=","name":"dynamoose","full_name":"mckernanin/dynamoose","private":false,"owner":{"login":"mckernanin","id":6300047,"node_id":"MDQ6VXNlcjYzMDAwNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/6300047?v=4","gravatar_id":"","url":"https://api.github.com/users/mckernanin","html_url":"https://github.com/mckernanin","followers_url":"https://api.github.com/users/mckernanin/followers","following_url":"https://api.github.com/users/mckernanin/following{/other_user}","gists_url":"https://api.github.com/users/mckernanin/gists{/gist_id}","starred_url":"https://api.github.com/users/mckernanin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mckernanin/subscriptions","organizations_url":"https://api.github.com/users/mckernanin/orgs","repos_url":"https://api.github.com/users/mckernanin/repos","events_url":"https://api.github.com/users/mckernanin/events{/privacy}","received_events_url":"https://api.github.com/users/mckernanin/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mckernanin/dynamoose","description":"Dynamoose is a modeling tool for Amazon's DynamoDB","fork":true,"url":"https://api.github.com/repos/mckernanin/dynamoose","forks_url":"https://api.github.com/repos/mckernanin/dynamoose/forks","keys_url":"https://api.github.com/repos/mckernanin/dynamoose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mckernanin/dynamoose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mckernanin/dynamoose/teams","hooks_url":"https://api.github.com/repos/mckernanin/dynamoose/hooks","issue_events_url":"https://api.github.com/repos/mckernanin/dynamoose/issues/events{/number}","events_url":"https://api.github.com/repos/mckernanin/dynamoose/events","assignees_url":"https://api.github.com/repos/mckernanin/dynamoose/assignees{/user}","branches_url":"https://api.github.com/repos/mckernanin/dynamoose/branches{/branch}","tags_url":"https://api.github.com/repos/mckernanin/dynamoose/tags","blobs_url":"https://api.github.com/repos/mckernanin/dynamoose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mckernanin/dynamoose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mckernanin/dynamoose/git/refs{/sha}","trees_url":"https://api.github.com/repos/mckernanin/dynamoose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mckernanin/dynamoose/statuses/{sha}","languages_url":"https://api.github.com/repos/mckernanin/dynamoose/languages","stargazers_url":"https://api.github.com/repos/mckernanin/dynamoose/stargazers","contributors_url":"https://api.github.com/repos/mckernanin/dynamoose/contributors","subscribers_url":"https://api.github.com/repos/mckernanin/dynamoose/subscribers","subscription_url":"https://api.github.com/repos/mckernanin/dynamoose/subscription","commits_url":"https://api.github.com/repos/mckernanin/dynamoose/commits{/sha}","git_commits_url":"https://api.github.com/repos/mckernanin/dynamoose/git/commits{/sha}","comments_url":"https://api.github.com/repos/mckernanin/dynamoose/comments{/number}","issue_comment_url":"https://api.github.com/repos/mckernanin/dynamoose/issues/comments{/number}","contents_url":"https://api.github.com/repos/mckernanin/dynamoose/contents/{+path}","compare_url":"https://api.github.com/repos/mckernanin/dynamoose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mckernanin/dynamoose/merges","archive_url":"https://api.github.com/repos/mckernanin/dynamoose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mckernanin/dynamoose/downloads","issues_url":"https://api.github.com/repos/mckernanin/dynamoose/issues{/number}","pulls_url":"https://api.github.com/repos/mckernanin/dynamoose/pulls{/number}","milestones_url":"https://api.github.com/repos/mckernanin/dynamoose/milestones{/number}","notifications_url":"https://api.github.com/repos/mckernanin/dynamoose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mckernanin/dynamoose/labels{/name}","releases_url":"https://api.github.com/repos/mckernanin/dynamoose/releases{/id}","deployments_url":"https://api.github.com/repos/mckernanin/dynamoose/deployments","created_at":"2019-08-02T07:35:56Z","updated_at":"2019-08-02T07:37:22Z","pushed_at":"2019-08-02T07:37:20Z","git_url":"git://github.com/mckernanin/dynamoose.git","ssh_url":"git@github.com:mckernanin/dynamoose.git","clone_url":"https://github.com/mckernanin/dynamoose.git","svn_url":"https://github.com/mckernanin/dynamoose","homepage":"https://dynamoosejs.com","size":3973,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dynamoosejs:master","ref":"master","sha":"cf7879ce43372138f34c43f97acd253be14a019e","user":{"login":"dynamoosejs","id":40209300,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMjA5MzAw","avatar_url":"https://avatars0.githubusercontent.com/u/40209300?v=4","gravatar_id":"","url":"https://api.github.com/users/dynamoosejs","html_url":"https://github.com/dynamoosejs","followers_url":"https://api.github.com/users/dynamoosejs/followers","following_url":"https://api.github.com/users/dynamoosejs/following{/other_user}","gists_url":"https://api.github.com/users/dynamoosejs/gists{/gist_id}","starred_url":"https://api.github.com/users/dynamoosejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dynamoosejs/subscriptions","organizations_url":"https://api.github.com/users/dynamoosejs/orgs","repos_url":"https://api.github.com/users/dynamoosejs/repos","events_url":"https://api.github.com/users/dynamoosejs/events{/privacy}","received_events_url":"https://api.github.com/users/dynamoosejs/received_events","type":"Organization","site_admin":false},"repo":{"id":16962535,"node_id":"MDEwOlJlcG9zaXRvcnkxNjk2MjUzNQ==","name":"dynamoose","full_name":"dynamoosejs/dynamoose","private":false,"owner":{"login":"dynamoosejs","id":40209300,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMjA5MzAw","avatar_url":"https://avatars0.githubusercontent.com/u/40209300?v=4","gravatar_id":"","url":"https://api.github.com/users/dynamoosejs","html_url":"https://github.com/dynamoosejs","followers_url":"https://api.github.com/users/dynamoosejs/followers","following_url":"https://api.github.com/users/dynamoosejs/following{/other_user}","gists_url":"https://api.github.com/users/dynamoosejs/gists{/gist_id}","starred_url":"https://api.github.com/users/dynamoosejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dynamoosejs/subscriptions","organizations_url":"https://api.github.com/users/dynamoosejs/orgs","repos_url":"https://api.github.com/users/dynamoosejs/repos","events_url":"https://api.github.com/users/dynamoosejs/events{/privacy}","received_events_url":"https://api.github.com/users/dynamoosejs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dynamoosejs/dynamoose","description":"Dynamoose is a modeling tool for Amazon's DynamoDB","fork":false,"url":"https://api.github.com/repos/dynamoosejs/dynamoose","forks_url":"https://api.github.com/repos/dynamoosejs/dynamoose/forks","keys_url":"https://api.github.com/repos/dynamoosejs/dynamoose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dynamoosejs/dynamoose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dynamoosejs/dynamoose/teams","hooks_url":"https://api.github.com/repos/dynamoosejs/dynamoose/hooks","issue_events_url":"https://api.github.com/repos/dynamoosejs/dynamoose/issues/events{/number}","events_url":"https://api.github.com/repos/dynamoosejs/dynamoose/events","assignees_url":"https://api.github.com/repos/dynamoosejs/dynamoose/assignees{/user}","branches_url":"https://api.github.com/repos/dynamoosejs/dynamoose/branches{/branch}","tags_url":"https://api.github.com/repos/dynamoosejs/dynamoose/tags","blobs_url":"https://api.github.com/repos/dynamoosejs/dynamoose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dynamoosejs/dynamoose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dynamoosejs/dynamoose/git/refs{/sha}","trees_url":"https://api.github.com/repos/dynamoosejs/dynamoose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dynamoosejs/dynamoose/statuses/{sha}","languages_url":"https://api.github.com/repos/dynamoosejs/dynamoose/languages","stargazers_url":"https://api.github.com/repos/dynamoosejs/dynamoose/stargazers","contributors_url":"https://api.github.com/repos/dynamoosejs/dynamoose/contributors","subscribers_url":"https://api.github.com/repos/dynamoosejs/dynamoose/subscribers","subscription_url":"https://api.github.com/repos/dynamoosejs/dynamoose/subscription","commits_url":"https://api.github.com/repos/dynamoosejs/dynamoose/commits{/sha}","git_commits_url":"https://api.github.com/repos/dynamoosejs/dynamoose/git/commits{/sha}","comments_url":"https://api.github.com/repos/dynamoosejs/dynamoose/comments{/number}","issue_comment_url":"https://api.github.com/repos/dynamoosejs/dynamoose/issues/comments{/number}","contents_url":"https://api.github.com/repos/dynamoosejs/dynamoose/contents/{+path}","compare_url":"https://api.github.com/repos/dynamoosejs/dynamoose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dynamoosejs/dynamoose/merges","archive_url":"https://api.github.com/repos/dynamoosejs/dynamoose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dynamoosejs/dynamoose/downloads","issues_url":"https://api.github.com/repos/dynamoosejs/dynamoose/issues{/number}","pulls_url":"https://api.github.com/repos/dynamoosejs/dynamoose/pulls{/number}","milestones_url":"https://api.github.com/repos/dynamoosejs/dynamoose/milestones{/number}","notifications_url":"https://api.github.com/repos/dynamoosejs/dynamoose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dynamoosejs/dynamoose/labels{/name}","releases_url":"https://api.github.com/repos/dynamoosejs/dynamoose/releases{/id}","deployments_url":"https://api.github.com/repos/dynamoosejs/dynamoose/deployments","created_at":"2014-02-18T20:24:54Z","updated_at":"2019-08-25T01:27:57Z","pushed_at":"2019-08-25T01:27:54Z","git_url":"git://github.com/dynamoosejs/dynamoose.git","ssh_url":"git@github.com:dynamoosejs/dynamoose.git","clone_url":"https://github.com/dynamoosejs/dynamoose.git","svn_url":"https://github.com/dynamoosejs/dynamoose","homepage":"https://dynamoosejs.com","size":3968,"stargazers_count":980,"watchers_count":980,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":199,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":72,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":199,"open_issues":72,"watchers":980,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dynamoosejs/dynamoose/pulls/663"},"html":{"href":"https://github.com/dynamoosejs/dynamoose/pull/663"},"issue":{"href":"https://api.github.com/repos/dynamoosejs/dynamoose/issues/663"},"comments":{"href":"https://api.github.com/repos/dynamoosejs/dynamoose/issues/663/comments"},"review_comments":{"href":"https://api.github.com/repos/dynamoosejs/dynamoose/pulls/663/comments"},"review_comment":{"href":"https://api.github.com/repos/dynamoosejs/dynamoose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dynamoosejs/dynamoose/pulls/663/commits"},"statuses":{"href":"https://api.github.com/repos/dynamoosejs/dynamoose/statuses/a31f48e32f8c4767d08b2d442ace6c4141942909"}},"author_association":"NONE","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"clean","merged_by":null,"comments":3,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":2,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"fishcharlie"}}