ParamsWithPagination interface is not exported which is used in list()
atifsaddique211f opened this issue · comments
Atif commented
Describe the bug
ParamsWithPagination
interface is not exported but the parameter passed to lokaliseApi.keys().list(requestBody)
expects this type.
To Reproduce
Steps to reproduce the behavior.
async fetchLokaliseKeysPage(page: number, keys?: string[]) {
const requestBody: ParamsWithPagination = { page, project_id: projectId, limit: 20 };
if (keys?.length) {
requestBody.include_translations = 1;
requestBody.filter_keys = keys?.join();
}
return await this.lokaliseApi.keys().list(requestBody);
}
Expected behavior
A clear and concise description of what you expected to happen.
interface ParamsWithPagination
is exported
Your environment:
- Node version: v16.17.0
"@lokalise/node-api": "^9.0.0"
Additional context
Add any other context about the problem here.
Elijah S. Krukowski commented
Thank you for reporting this, I'll release a new version shortly!
Atif commented
We are facing another issue, I will create a new bug for it.
Error [ERR_REQUIRE_ESM]: require() of ES Module node_modules/@lokalise/node-api/dist/main.js from lokalise.service.js not supported.
Instead change the require of main.js in lokalise.service.js to a dynamic import() which is available in all CommonJS modules.