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 Dashboard!)
As you can see, the Cosmic NPM module gives you a lot of power to manage your Cosmic Bucket contents. Let me know if you have any questions about Bucket lifecycle methods. Join the Cosmic community on Slack and follow us on Twitter.