Cosmic
April 04, 2023
Summary
- 🎉 The new Cosmic dashboard is now in public beta. This means everyone can now sign up and onboard.
- 📖 We have a new documentation site.
- 🛠 We have a new Cosmic JavaScript SDK.
Read below to learn about the latest changes. Note: These changes are in addition to the private beta release changelog. It is recommended you read that if you haven't already.
Dashboard changes
- 📝 New markdown metafield.
- 🗃️ Content folder updates for improved content organization.
- 🪝 Webhook payload model updates. See docs.
- 🐌 Object slugs are now unique to Object type, not Bucket.
Cosmic JavaScript SDK
Install the new Cosmic JavaScript SDK by running npm i @cosmicjs/sdk
in your terminal. You should expect the following changes:
- We've added TypeScript support. Though limited, we plan to continue to include more TypeScript support.
- Simpler config and authentication methods. See authentication in docs.
- Improved methods for working with Objects including:
findOne
now returns an Object.updateOne
only requires specifying the Object id and no longer requires the$set
declaration.deleteOne
only requires specifying the Object id.
- Legacy methods are no longer supported for
getObjects
,getMedia
etc. - Much lighter package size compared to the old NPM module (only 23kb unpacked!).
See more examples for all methods in the API reference section of the new Cosmic docs.
We hope you enjoy these updates. Sign up for the new dashboard to begin using all of the new and improved features.
You might also like