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 new properties to get/updateAppSettings #2949

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

chihiro-adachi
Copy link
Contributor

@chihiro-adachi chihiro-adachi commented Aug 29, 2024

Why

  • Add property for get/update app settings

What

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

How to test

  1. run below code and check logs:
// packages/rest-api-client/test.ts

import { KintoneRestAPIClient } from "./src";

const client = new KintoneRestAPIClient({
  baseUrl: "http://localhost",
  auth: {
    username: "Administrator",
    password: "cybozu",
  },
});

(async () => {
  // アプリを作成
  const respApp = await client.app.addApp({ name: "test app" });
  // アプリ設定を取得
  const respSettings1 = await client.app.getAppSettings({
    app: respApp.app,
    preview: true,
  });
  console.log(respSettings1);
  // アプリ設定を更新
  await client.app.updateAppSettings({
    app: respApp.app,
    name: "new name",
    description: "new description",
    titleField: {
      selectionMode: "AUTO",
    },
    enableThumbnails: false,
    enableComments: false,
  });
  // アプリ設定を取得
  const respSettings2 = await client.app.getAppSettings({
    app: respApp.app,
    preview: true,
  });
  console.log(respSettings2);
})();

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 29, 2024
}
| { type: "PRESET"; key: string };
theme?: Theme;
titleField: TitleField;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shabaraba
今回追加するパラメータはすべて省略可のようです。
https://cybozu.dev/ja/kintone/docs/rest-api/apps/settings/update-general-settings/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

修正しました。
0e75c38

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!

@tasshi-me tasshi-me changed the title feat(rest-api-client): add property for get/update app settings feat(rest-api-client): add new properties to getAppSettings and updateAppSettings Sep 4, 2024
@tasshi-me tasshi-me changed the title feat(rest-api-client): add new properties to getAppSettings and updateAppSettings feat(rest-api-client): add new properties to get/updateAppSettings Sep 4, 2024
@chihiro-adachi chihiro-adachi marked this pull request as ready for review September 5, 2024 05:08
@hisasami hisasami merged commit da91ede into main Sep 6, 2024
17 checks passed
@hisasami hisasami deleted the feat/add-property-for-get-update-app-settings branch September 6, 2024 04:22
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.

4 participants