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): update space.getSpace method #2876

Merged
merged 6 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/rest-api-client/docs/space.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Gets general information of a space.
| body | String | The HTML of the Space body. |
| useMultiThread | Boolean | The "Enable multiple threads." setting.<br /><strong>true</strong>: The Space is a Multi-threaded Space.<br /><strong>false</strong>: The Space is a Single-threaded Space. |
| isGuest | Boolean | The Guest Space setting.<br /><strong>true</strong>: The Space is a Guest Space.<br /><strong>false</strong>: The Space is not a Guest Space. |
| attachedApps | Object | A list of Apps that are in the thread.<br />This does not include Apps that are not live yet. |
| attachedApps | Array | A list of Apps that are in the thread.<br />This does not include Apps that are not live yet. |
| attachedApps[].threadId | String | The Thread ID of the thread that the App was created in.<br />Apps that are created inside Spaces using the GUI will be automatically allocated to the default Thread. |
| attachedApps[].appId | String | The App ID. |
| attachedApps[].code | String | The App Code of the App.<br />An empty string is returned if an App Code is not set in the App's settings. |
Expand All @@ -84,6 +84,8 @@ Gets general information of a space.
| showAppList | Boolean | The display status for the Apps widget.<br /><strong>true</strong>: The Apps widget is displayed.<br /><strong>false</strong>: The Apps widget is not displayed.<br /><strong>null</strong> is returned for Spaces with the Enable multiple threads option turned off. |
| showMemberList | Boolean | The display status for the People widget.<br /><strong>true</strong>: The People widget is displayed.<br /><strong>false</strong>: The People widget is not displayed.<br /><strong>null</strong> is returned for Spaces with the Enable multiple threads option turned off. |
| showRelatedLinkList | Boolean | The display status for the Related Apps & Spaces widget.<br /><strong>true</strong>: The Related Apps & Spaces widget is displayed.<br /><strong>false</strong>: The Related Apps & Spaces widget is not displayed.<br /><strong>null</strong> is returned for Spaces with the Enable multiple threads option turned off. |
| permissions | Object | An object containing information of the space's permission settings. |
| permissions.createApp | String | The option set for the Only Allow Space Administrators to Create Apps setting. <br /><strong>EVERYONE</strong>: all users can create Apps. <br /><strong>ADMIN</strong>: only administrators can create Apps. |

#### Reference

Expand Down
10 changes: 10 additions & 0 deletions packages/rest-api-client/src/client/types/space/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ type AttachedApp = Pick<
| "modifier"
>;

type Permissions = {
createApp: "EVERYONE" | "ADMIN";
};

export type Space = {
id: string;
name: string;
Expand All @@ -31,6 +35,12 @@ export type Space = {
isGuest: boolean;
attachedApps: AttachedApp[];
fixedMember: boolean;
showAnnouncement: boolean;
showThreadList: boolean;
showAppList: boolean;
showMemberList: boolean;
showRelatedLinkList: boolean;
tasshi-me marked this conversation as resolved.
Show resolved Hide resolved
permissions: Permissions;
tasshi-me marked this conversation as resolved.
Show resolved Hide resolved
};

export type SpaceMemberForResponse = {
Expand Down