Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rest-api-client): add method of plugin.updatePlugin #2918

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

shabaraba
Copy link
Member

@shabaraba shabaraba commented Aug 2, 2024

Why

  • Support plugin.updatePlugin method to be able to update an imported plug-in in the Kintone environment.

What

  • Add a document for the new method.
  • Add new unit tests.

How to test

  1. prepare a zip file for a plug-in and installe it in Kintone.
  2. run below code and check logs:
import {KintoneRestAPIClient} from '@kintone/rest-api-client';

const client = new KintoneRestAPIClient();

const fileKey = (await client.file.uploadFile({
  file: {
    path: "./files/plugin.zip"
  }
})).fileKey;

if (typeof fileKey == "string") {
  const pluginId = (await client.app.getPlugins({app: 42})).plugins[0].id;
  console.log(await client.plugin.updatePlugin({id: pluginId, fileKey: fileKey}));
  console.log(await client.app.getPlugins({app: 42, preview: true}));
}

Checklist

  • Read CONTRIBUTING.md
  • Updated documentation if it is required.
  • Added tests if it is required.
  • Passed pnpm lint and pnpm test on the root directory.

@github-actions github-actions bot added the pkg: rest-api-client @kintone/rest-api-client label Aug 2, 2024
@shabaraba shabaraba marked this pull request as ready for review August 2, 2024 07:31
Copy link
Member

@tasshi-me tasshi-me left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hisasami hisasami merged commit 305693f into main Aug 5, 2024
17 checks passed
@hisasami hisasami deleted the feat/add-method-plugin-updatePlugin branch August 5, 2024 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: rest-api-client @kintone/rest-api-client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants