The following Gist follows the life of one John Bucket. It does the following:
1. Creates a Bucket
2. Adds Object Types (People)
3. Adds Objects (in John's life with relationships)
4. Deletes the Bucket (commented out so you can see the result in your Cosmic JS Dashboard!)
As you can see, the Cosmic JS NPM module gives you a lot of power to manage your Cosmic JS Bucket contents. Let me know if you have any questions about Bucket lifecycle methods. Join the Cosmic JS community on Slack and follow us on Twitter.