diff --git a/examples/rest-api-client-demo/src/app.ts b/examples/rest-api-client-demo/src/app.ts index 5c9d9c6e05..3c1a3f6037 100644 --- a/examples/rest-api-client-demo/src/app.ts +++ b/examples/rest-api-client-demo/src/app.ts @@ -765,11 +765,9 @@ export class App { } } - public async moveToSpace() { + public async move() { try { - console.log( - await this.client.app.moveToSpace({ app: APP_ID, space: SPACE_ID }), - ); + console.log(await this.client.app.move({ app: APP_ID, space: SPACE_ID })); } catch (error) { console.log(error); } diff --git a/packages/rest-api-client/docs/app.md b/packages/rest-api-client/docs/app.md index 6b9972696c..19709f8dc9 100644 --- a/packages/rest-api-client/docs/app.md +++ b/packages/rest-api-client/docs/app.md @@ -36,7 +36,7 @@ - [updateReports](#updateReports) - [getAppActions](#getAppActions) - [updateAppActions](#updateAppActions) -- [moveToSpace](#moveToSpace) +- [move](#move) - [getPlugins](#getPlugins) ## Overview @@ -1356,7 +1356,7 @@ Updates the [Action](https://get.kintone.help/k/en/user/app_settings/appaction/s - https://kintone.dev/en/docs/kintone/rest-api/apps/update-action-settings/ -### moveToSpace +### move Changes the Space to which an App belongs. diff --git a/packages/rest-api-client/src/client/AppClient.ts b/packages/rest-api-client/src/client/AppClient.ts index 5ecc9ead90..ce94d9acf0 100644 --- a/packages/rest-api-client/src/client/AppClient.ts +++ b/packages/rest-api-client/src/client/AppClient.ts @@ -620,10 +620,7 @@ export class AppClient extends BaseClient { return this.client.put(path, params); } - public moveToSpace(params: { - app: AppID; - space: SpaceID | null; - }): Promise<{}> { + public move(params: { app: AppID; space: SpaceID | null }): Promise<{}> { const path = this.buildPath({ endpointName: "app/move", }); diff --git a/packages/rest-api-client/src/client/__tests__/AppClient.test.ts b/packages/rest-api-client/src/client/__tests__/AppClient.test.ts index e7f858a3ca..3be1bc3cbd 100644 --- a/packages/rest-api-client/src/client/__tests__/AppClient.test.ts +++ b/packages/rest-api-client/src/client/__tests__/AppClient.test.ts @@ -1312,7 +1312,7 @@ describe("AppClient", () => { }); }); -describe("AppClient: moveToSpace", () => { +describe("AppClient: move", () => { let mockClient: MockClient; let appClient: AppClient; @@ -1324,10 +1324,10 @@ describe("AppClient: moveToSpace", () => { mockClient = buildMockClient(requestConfigBuilder); appClient = new AppClient(mockClient); }); - describe("moveToSpace", () => { + describe("move", () => { const params = { app: APP_ID, space: 1 } as const; beforeEach(async () => { - await appClient.moveToSpace(params); + await appClient.move(params); }); it("should pass the path to the http client", () => { expect(mockClient.getLogs()[0].path).toBe("/k/v1/app/move.json");