Closed meisekimiu closed 2 years ago
I've finished up a wrapper method that lets the user call a copy
method on a ChildItemVO without having to distinguish its type by hand. This also cleans up the example code.
@meisekimiu does this need a re-review at this point?
Thanks for the review @cecilia-donnelly! Can you check the README changes I made real quick? (I think after this we should probably stop adding notes to the README but this change is a simple enough thing to document in the README).
Those README changes look great! I especially like that you noted that copying to the public root is equivalent to publishing.
What kind of change does this PR introduce? This PR adds copy/publish functionality to the node-sdk. In addition to adding copy methods for both records and folders, there's also a function to fetch the Public Root, so publishing functionality (which is just copying to Public in the back end) can be properly implemented by scripts. I've also added a function to fetch the My Files folder so that I can test copying from "My Files" to "Public".
What is the current behavior? (You can also link to an open issue here) You cannot copy, fetch the Public Root, or My Files directories.
What is the new behavior (if this is a feature change)? Adds those things.
Other information: I'm a bit unclear on the design of the architecture we want on this project... should this be how it's implemented? I kind of have to do an ugly thing in the
copy-publish.js
example file I made where I have to explicitly check whether an Item is a record or a folder before calling the exact method on it.