refactor(api): ♻️ Replace old client library with new version (@versia/client)

This commit is contained in:
Jesse Wierzbinski 2024-08-26 19:40:15 +02:00
parent 7708bff31f
commit fbe86043b7
No known key found for this signature in database
45 changed files with 51 additions and 54 deletions

View file

@ -2,7 +2,7 @@ import { proxyUrl } from "@/response";
import type {
AsyncAttachment as ApiAsyncAttachment,
Attachment as ApiAttachment,
} from "@lysand-org/client/types";
} from "@versia/client/types";
import type { ContentFormat } from "@versia/federation/types";
import {
type InferInsertModel,

View file

@ -1,6 +1,6 @@
import { emojiValidatorWithColons, emojiValidatorWithIdentifiers } from "@/api";
import { proxyUrl } from "@/response";
import type { Emoji as ApiEmoji } from "@lysand-org/client/types";
import type { Emoji as ApiEmoji } from "@versia/client/types";
import type { CustomEmojiExtension } from "@versia/federation/types";
import {
type InferInsertModel,

View file

@ -7,7 +7,7 @@ import { getLogger } from "@logtape/logtape";
import type {
Attachment as ApiAttachment,
Status as ApiStatus,
} from "@lysand-org/client/types";
} from "@versia/client/types";
import { EntityValidator } from "@versia/federation";
import type {
ContentFormat,

View file

@ -1,4 +1,4 @@
import type { Relationship as APIRelationship } from "@lysand-org/client/types";
import type { Relationship as APIRelationship } from "@versia/client/types";
import {
type InferInsertModel,
type InferSelectModel,

View file

@ -1,5 +1,5 @@
import { proxyUrl } from "@/response";
import type { RolePermission } from "@lysand-org/client/types";
import type { RolePermission } from "@versia/client/types";
import {
type InferInsertModel,
type InferSelectModel,

View file

@ -7,14 +7,14 @@ import { getLogger } from "@logtape/logtape";
import type {
Account as ApiAccount,
Mention as ApiMention,
} from "@lysand-org/client/types";
} from "@versia/client/types";
import {
EntityValidator,
FederationRequester,
type HttpVerb,
SignatureConstructor,
} from "@versia/federation";
import type { User as VersiaUser } from "@versia/federation/types";
import type { Collection, User as VersiaUser } from "@versia/federation/types";
import chalk from "chalk";
import {
type InferInsertModel,
@ -668,7 +668,7 @@ export class User extends BaseInterface<typeof Users, UserWithRelations> {
* @returns The signed string and headers to send with the request
*/
async sign(
entity: KnownEntity,
entity: KnownEntity | Collection,
signatureUrl: string | URL,
signatureMethod: HttpVerb = "POST",
): Promise<{