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 space.addSpaceFromTemplate() method #2638

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

hung-cybo
Copy link
Contributor

Why

  • Support addSpaceFromTemplate method to be able to add a new Space from Space Template.

What

  • Add new method addSpaceFromTemplate
  • Add unit test
  • Add demo script

How to test

  • Check test spec

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.

@hung-cybo hung-cybo requested review from a team and tasshi-me and removed request for a team March 20, 2024 11:12
@github-actions github-actions bot added the pkg: rest-api-client @kintone/rest-api-client label Mar 20, 2024
@@ -19,4 +19,8 @@ export abstract class BaseClient {
guestSpaceId: this.guestSpaceId,
});
}

protected buildPath(params: { endpointName: string; preview?: boolean }) {
Copy link
Member

Choose a reason for hiding this comment

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

It's difficult to understand that the buildPath() doesn't regard guestSpaceId from its name.

Please add a doc comment or rename this function.

@@ -33,6 +33,15 @@ export type Space = {
fixedMember: boolean;
};

export type SpaceTemplate = {
Copy link
Member

Choose a reason for hiding this comment

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

This type is not a Space template.
The space template is in the kintone and referenced by id.

Copy link
Member

Choose a reason for hiding this comment

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

You can extract this type to params directly.

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!

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 merged commit 4df57dd into master Mar 27, 2024
10 checks passed
@tasshi-me tasshi-me deleted the feat/add-addSpaceFromTemplate-method branch March 27, 2024 05:11
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.

2 participants