mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 22:09:16 +01:00
refactor(api): ♻️ Replace old client library with new version (@versia/client)
This commit is contained in:
parent
7708bff31f
commit
fbe86043b7
45 changed files with 51 additions and 54 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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<{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue