If you haven’t upgraded to 0.9.0 please read the upgrading guide.

Update getPageSnapshot Parameters

  export async function getStaticProps(ctx) {
   const makeswift = new Makeswift(process.env.MAKESWIFT_SITE_API_KEY, { runtime })

   const snapshot = await makeswift.getPageSnapshot(path, {
-    preview: ctx.preview,
+    siteVersion: Makeswift.getSiteVersion(ctx.previewData),
     locale: ctx.locale,
   });
  }

For users who are using versioning

1

Remove the siteVersion parameter from the Makeswift constructor

  const makeswift = new Makeswift(process.env.MAKESWIFT_SITE_API_KEY, {
    runtime: runtime,
--  siteVersion: Makeswift.getSiteVersion(ctx.previewData),
  });
2

Remove the siteVersion parameter from the MakeswiftApiHandler

export default MakeswiftApiHandler(process.env.MAKESWIFT_SITE_API_KEY, {
--  siteVersions: true,
});

If you use client.getPage, you need to also update the parameters

 const page = await client.getPage(path, {
--  preview,
++  siteVersion: Makeswift.getSiteVersion(ctx.previewData),
    locale
 })

Here is the link to the official release notes.