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 for uninstall plugin #2950

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

shabaraba
Copy link
Member

@shabaraba shabaraba commented Aug 30, 2024

Why

  • Support plugin.uninstallPlugin method to be able to uninstalls a plug-in from 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.
  2. run below code and check logs:
import {KintoneRestAPIClient} from '@kintone/rest-api-client';

const client = new KintoneRestAPIClient();

// Upload a file and attach it to a record
const resp = await client.file.uploadFile({
  file: {
    path: "./files/plugin.zip"
  }
});

const fileKey = resp.fileKey;
console.log(fileKey);

if (typeof fileKey == "string") {
  const pluginId = (await client.plugin.installPlugin({fileKey: fileKey})).id;
  console.log(pluginId);
  console.log(await client.plugin.getPlugins({}));

  await client.plugin.uninstallPlugin({id: pluginId});
  console.log(await client.plugin.getPlugins({}));
}

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 30, 2024
@shabaraba shabaraba changed the title Feat/add method for uninstall plugin feat(rest-api-client): Add method for uninstall plugin Aug 30, 2024
@shabaraba shabaraba marked this pull request as ready for review August 30, 2024 07:55
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 4bcc99b into main Sep 5, 2024
17 checks passed
@hisasami hisasami deleted the feat/add-method-for-uninstallPlugin branch September 5, 2024 06:54
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