{"action":"closed","issue":{"url":"https://api.github.com/repos/Kashoo/synctos/issues/25","repository_url":"https://api.github.com/repos/Kashoo/synctos","labels_url":"https://api.github.com/repos/Kashoo/synctos/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/Kashoo/synctos/issues/25/comments","events_url":"https://api.github.com/repos/Kashoo/synctos/issues/25/events","html_url":"https://github.com/Kashoo/synctos/issues/25","id":165165754,"number":25,"title":"Support custom actions to be executed on a document type","user":{"login":"OldSneerJaw","id":5003870,"avatar_url":"https://avatars.githubusercontent.com/u/5003870?v=3","gravatar_id":"","url":"https://api.github.com/users/OldSneerJaw","html_url":"https://github.com/OldSneerJaw","followers_url":"https://api.github.com/users/OldSneerJaw/followers","following_url":"https://api.github.com/users/OldSneerJaw/following{/other_user}","gists_url":"https://api.github.com/users/OldSneerJaw/gists{/gist_id}","starred_url":"https://api.github.com/users/OldSneerJaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OldSneerJaw/subscriptions","organizations_url":"https://api.github.com/users/OldSneerJaw/orgs","repos_url":"https://api.github.com/users/OldSneerJaw/repos","events_url":"https://api.github.com/users/OldSneerJaw/events{/privacy}","received_events_url":"https://api.github.com/users/OldSneerJaw/received_events","type":"User","site_admin":false},"labels":[{"id":387387391,"url":"https://api.github.com/repos/Kashoo/synctos/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":{"login":"OldSneerJaw","id":5003870,"avatar_url":"https://avatars.githubusercontent.com/u/5003870?v=3","gravatar_id":"","url":"https://api.github.com/users/OldSneerJaw","html_url":"https://github.com/OldSneerJaw","followers_url":"https://api.github.com/users/OldSneerJaw/followers","following_url":"https://api.github.com/users/OldSneerJaw/following{/other_user}","gists_url":"https://api.github.com/users/OldSneerJaw/gists{/gist_id}","starred_url":"https://api.github.com/users/OldSneerJaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OldSneerJaw/subscriptions","organizations_url":"https://api.github.com/users/OldSneerJaw/orgs","repos_url":"https://api.github.com/users/OldSneerJaw/repos","events_url":"https://api.github.com/users/OldSneerJaw/events{/privacy}","received_events_url":"https://api.github.com/users/OldSneerJaw/received_events","type":"User","site_admin":false},"assignees":[{"login":"OldSneerJaw","id":5003870,"avatar_url":"https://avatars.githubusercontent.com/u/5003870?v=3","gravatar_id":"","url":"https://api.github.com/users/OldSneerJaw","html_url":"https://github.com/OldSneerJaw","followers_url":"https://api.github.com/users/OldSneerJaw/followers","following_url":"https://api.github.com/users/OldSneerJaw/following{/other_user}","gists_url":"https://api.github.com/users/OldSneerJaw/gists{/gist_id}","starred_url":"https://api.github.com/users/OldSneerJaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OldSneerJaw/subscriptions","organizations_url":"https://api.github.com/users/OldSneerJaw/orgs","repos_url":"https://api.github.com/users/OldSneerJaw/repos","events_url":"https://api.github.com/users/OldSneerJaw/events{/privacy}","received_events_url":"https://api.github.com/users/OldSneerJaw/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-07-12T19:56:27Z","updated_at":"2016-12-12T22:27:14Z","closed_at":"2016-12-12T22:27:14Z","body":"Allow a document definition to define fully custom action functions to be executed when the sync function is run. It should allow at least two different types:\n- custom functions that are run after the document's type is identified, but before user authorization is verified (e.g. `customPreAction`)\n- custom functions that are run after user authorization is verified and the document's contents pass validation, but before channels are assigned (e.g. `customPostAction`)\n\nFor example (not to be considered final):\n\n```\nmyDocType: {\n  channels: ...,\n  typeFilter: ...,\n  propertyValidators: ...,\n  customPreAction: function(doc, oldDoc) {\n    // Do something fancy before any validation is performed\n  },\n  customPostAction: function(doc, oldDoc) {\n    // Do something fancy after all validation has passed\n  }\n}\n```\n"}}
{"actor":{"display_login":"dkichler"}}