feat(web): add dm.spaceInvite() api client method
This commit is contained in:
@@ -63,6 +63,8 @@ import type {
|
|||||||
ReinstateInviteRequest,
|
ReinstateInviteRequest,
|
||||||
ReinstateInviteResponse,
|
ReinstateInviteResponse,
|
||||||
CheckInviteResponse,
|
CheckInviteResponse,
|
||||||
|
SpaceInviteRequest,
|
||||||
|
SpaceInviteResponse,
|
||||||
} from '@backspace/shared';
|
} from '@backspace/shared';
|
||||||
|
|
||||||
export type { FederationPeer, ApprovalRequest, PeeringSubscription, PeeringNotification };
|
export type { FederationPeer, ApprovalRequest, PeeringSubscription, PeeringNotification };
|
||||||
@@ -166,6 +168,7 @@ export class BackspaceApiClient {
|
|||||||
deleteMessage: (id: string) => Promise<{ success: boolean }>;
|
deleteMessage: (id: string) => Promise<{ success: boolean }>;
|
||||||
addMember: (dmChannelId: string, data: AddDmMemberRequest) => Promise<DmChannel>;
|
addMember: (dmChannelId: string, data: AddDmMemberRequest) => Promise<DmChannel>;
|
||||||
leave: (dmChannelId: string) => Promise<{ success: boolean }>;
|
leave: (dmChannelId: string) => Promise<{ success: boolean }>;
|
||||||
|
spaceInvite: (body: SpaceInviteRequest) => Promise<SpaceInviteResponse>;
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly social: {
|
readonly social: {
|
||||||
@@ -563,6 +566,8 @@ export class BackspaceApiClient {
|
|||||||
request<DmChannel>('POST', `/dm/${dmChannelId}/members`, data),
|
request<DmChannel>('POST', `/dm/${dmChannelId}/members`, data),
|
||||||
leave: (dmChannelId: string) =>
|
leave: (dmChannelId: string) =>
|
||||||
request<{ success: boolean }>('DELETE', `/dm/${dmChannelId}/members`),
|
request<{ success: boolean }>('DELETE', `/dm/${dmChannelId}/members`),
|
||||||
|
spaceInvite: (body) =>
|
||||||
|
request<SpaceInviteResponse>('POST', '/dm/space-invite', body),
|
||||||
};
|
};
|
||||||
|
|
||||||
this.social = {
|
this.social = {
|
||||||
|
|||||||
Reference in New Issue
Block a user