mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Update Mastodon API types
This commit is contained in:
parent
58cd284a84
commit
82c6dc17a8
107 changed files with 577 additions and 89 deletions
|
|
@ -3,8 +3,8 @@ import { config } from "config-manager";
|
|||
import { eq } from "drizzle-orm";
|
||||
import { db } from "~drizzle/db";
|
||||
import { emoji } from "~drizzle/schema";
|
||||
import type { APIEmoji } from "~types/entities/emoji";
|
||||
import type { APIInstance } from "~types/entities/instance";
|
||||
import type { Emoji as APIEmoji } from "~types/mastodon/emoji";
|
||||
import type { Instance as APIInstance } from "~types/mastodon/instance";
|
||||
import { getTestUsers, sendTestRequest, wrapRelativeUrl } from "./utils";
|
||||
|
||||
const base_url = config.http.base_url;
|
||||
|
|
@ -44,7 +44,6 @@ describe("API Tests", () => {
|
|||
// expect(instance.contact_account).toBeDefined();
|
||||
expect(instance.rules).toBeDefined();
|
||||
expect(instance.approval_required).toBeDefined();
|
||||
expect(instance.max_toot_chars).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
|
||||
import { afterAll, describe, expect, test } from "bun:test";
|
||||
import { config } from "config-manager";
|
||||
import { getTestUsers, sendTestRequest, wrapRelativeUrl } from "~tests/utils";
|
||||
import type { APIAccount } from "~types/entities/account";
|
||||
import type { APIRelationship } from "~types/entities/relationship";
|
||||
import type { APIStatus } from "~types/entities/status";
|
||||
import type { Account as APIAccount } from "~types/mastodon/account";
|
||||
import type { Relationship as APIRelationship } from "~types/mastodon/relationship";
|
||||
import type { Status as APIStatus } from "~types/mastodon/status";
|
||||
|
||||
const base_url = config.http.base_url;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,10 @@
|
|||
import { afterAll, describe, expect, test } from "bun:test";
|
||||
import { config } from "config-manager";
|
||||
import { statusToAPI } from "~database/entities/Status";
|
||||
import {
|
||||
getTestStatuses,
|
||||
getTestUsers,
|
||||
sendTestRequest,
|
||||
wrapRelativeUrl,
|
||||
} from "~tests/utils";
|
||||
import type { APIAccount } from "~types/entities/account";
|
||||
import type { APIAsyncAttachment } from "~types/entities/async_attachment";
|
||||
import type { APIContext } from "~types/entities/context";
|
||||
import type { APIStatus } from "~types/entities/status";
|
||||
import { getTestUsers, sendTestRequest, wrapRelativeUrl } from "~tests/utils";
|
||||
import type { Account as APIAccount } from "~types/mastodon/account";
|
||||
import type { AsyncAttachment as APIAsyncAttachment } from "~types/mastodon/async_attachment";
|
||||
import type { Context as APIContext } from "~types/mastodon/context";
|
||||
import type { Status as APIStatus } from "~types/mastodon/status";
|
||||
|
||||
const base_url = config.http.base_url;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { afterAll, describe, expect, test } from "bun:test";
|
||||
import type { APIApplication } from "~types/entities/application";
|
||||
import type { APIToken } from "~types/entities/token";
|
||||
import type { Application as APIApplication } from "~types/mastodon/application";
|
||||
import type { Token as APIToken } from "~types/mastodon/token";
|
||||
import {
|
||||
deleteOldTestUsers,
|
||||
getTestUsers,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue