From: MTRNord Date: Mon, 13 Jan 2025 10:46:35 +0000 (+0100) Subject: Provide patch for miro api package X-Git-Url: https://gerrit.midnightthoughts.space/gitweb?a=commitdiff_plain;h=2839fa0a3fc62816b3b82147fad144b4ea78f640;p=neoboard-miro-converter.git Provide patch for miro api package Change-Id: Ie58584ab7e3131a484b4153e9cde8c76e982731f --- diff --git a/README.md b/README.md index ed02e28..becc0da 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ The Miro to Neoboard Converter is designed to help users seamlessly transition t ```sh pnpm install + # Miro api package is partially broken so we patch it + patch -p1 < miro_api_styles_fix.patch ``` ## Usage diff --git a/miro_api_styles_fix.patch b/miro_api_styles_fix.patch new file mode 100644 index 0000000..2ac8fe4 --- /dev/null +++ b/miro_api_styles_fix.patch @@ -0,0 +1,34 @@ +diff --git a/./node_modules/@mirohq/miro-api/dist/api/apis.js b/./node_modules/@mirohq/miro-api/dist/api/apis_fixed.js +index 2b6e0e3..d3a6a89 100644 +--- a/./node_modules/@mirohq/miro-api/dist/api/apis.js ++++ b/./node_modules/@mirohq/miro-api/dist/api/apis_fixed.js +@@ -1972,6 +1972,10 @@ class MiroApi { + urlResource.search = localVarQueryParameters.toString(); + const { response, bodyAsJson } = await makeJsonRequest(typeof this.accessToken === 'function' ? await this.accessToken() : this.accessToken, 'GET', urlResource, undefined, this.logger); + const body = models_1.ObjectSerializer.deserialize(bodyAsJson, 'GenericItemCursorPaged'); ++ // Copy the style for each item from the bodyAsJson.items to the body.items ++ for (let i = 0; i < body.data.length; i++) { ++ body.data[i].style = bodyAsJson.data[i].style; ++ } + return { response, body }; + } + /** +@@ -2010,6 +2014,10 @@ class MiroApi { + urlResource.search = localVarQueryParameters.toString(); + const { response, bodyAsJson } = await makeJsonRequest(typeof this.accessToken === 'function' ? await this.accessToken() : this.accessToken, 'GET', urlResource, undefined, this.logger); + const body = models_1.ObjectSerializer.deserialize(bodyAsJson, 'GenericItemCursorPaged'); ++ // Copy the style for each item from the bodyAsJson.items to the body.items ++ for (let i = 0; i < body.data.length; i++) { ++ body.data[i].style = bodyAsJson.data[i].style; ++ } + return { response, body }; + } + /** +@@ -2035,6 +2043,7 @@ class MiroApi { + urlResource.search = localVarQueryParameters.toString(); + const { response, bodyAsJson } = await makeJsonRequest(typeof this.accessToken === 'function' ? await this.accessToken() : this.accessToken, 'GET', urlResource, undefined, this.logger); + const body = models_1.ObjectSerializer.deserialize(bodyAsJson, 'GenericItem'); ++ body.style = bodyAsJson.style; + return { response, body }; + } + /**