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