feat: add deleteFederationIdentity API client method
This commit is contained in:
@@ -50,6 +50,8 @@ import type {
|
|||||||
InvitePreview,
|
InvitePreview,
|
||||||
GifResult,
|
GifResult,
|
||||||
FederationRegistryEntry,
|
FederationRegistryEntry,
|
||||||
|
FederationIdentityDeleteRequest,
|
||||||
|
FederationIdentityDeleteResponse,
|
||||||
} from '@backspace/shared';
|
} from '@backspace/shared';
|
||||||
|
|
||||||
export class RateLimitError extends Error {
|
export class RateLimitError extends Error {
|
||||||
@@ -93,6 +95,7 @@ export class BackspaceApiClient {
|
|||||||
getMutuals: (id: string, homeUserId?: string) => Promise<{ mutualFriends: User[]; mutualSpaces: { id: string; name: string; icon: string | null; avatarColor: string | null }[] }>;
|
getMutuals: (id: string, homeUserId?: string) => Promise<{ mutualFriends: User[]; mutualSpaces: { id: string; name: string; icon: string | null; avatarColor: string | null }[] }>;
|
||||||
getFederationRegistry: () => Promise<{ registry: FederationRegistryEntry[]; updatedAt: number }>;
|
getFederationRegistry: () => Promise<{ registry: FederationRegistryEntry[]; updatedAt: number }>;
|
||||||
putFederationRegistry: (data: { registry: FederationRegistryEntry[]; updatedAt: number }) => Promise<{ ok: boolean; updatedAt: number }>;
|
putFederationRegistry: (data: { registry: FederationRegistryEntry[]; updatedAt: number }) => Promise<{ ok: boolean; updatedAt: number }>;
|
||||||
|
deleteFederationIdentity: (data: FederationIdentityDeleteRequest) => Promise<FederationIdentityDeleteResponse>;
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly spaceLayout: {
|
readonly spaceLayout: {
|
||||||
@@ -417,6 +420,10 @@ export class BackspaceApiClient {
|
|||||||
request<{ ok: boolean; updatedAt: number }>(
|
request<{ ok: boolean; updatedAt: number }>(
|
||||||
'PUT', '/users/@me/federation-registry', data
|
'PUT', '/users/@me/federation-registry', data
|
||||||
),
|
),
|
||||||
|
deleteFederationIdentity: (data: FederationIdentityDeleteRequest) =>
|
||||||
|
request<FederationIdentityDeleteResponse>(
|
||||||
|
'POST', '/users/@me/federation-identity/delete', data
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
this.spaceLayout = {
|
this.spaceLayout = {
|
||||||
|
|||||||
Reference in New Issue
Block a user