2025-11-21 08:31:02 +01:00
|
|
|
import { z } from "zod";
|
2025-02-12 23:04:44 +01:00
|
|
|
import { Account } from "./account.ts";
|
|
|
|
|
import { Status } from "./status.ts";
|
|
|
|
|
import { Tag } from "./tag.ts";
|
|
|
|
|
|
|
|
|
|
export const Search = z
|
|
|
|
|
.object({
|
2025-07-07 03:42:35 +02:00
|
|
|
accounts: z.array(Account).meta({
|
2025-02-12 23:04:44 +01:00
|
|
|
description: "Accounts which match the given query",
|
|
|
|
|
}),
|
2025-07-07 03:42:35 +02:00
|
|
|
statuses: z.array(Status).meta({
|
2025-02-12 23:04:44 +01:00
|
|
|
description: "Statuses which match the given query",
|
|
|
|
|
}),
|
2025-07-07 03:42:35 +02:00
|
|
|
hashtags: z.array(Tag).meta({
|
2025-02-12 23:04:44 +01:00
|
|
|
description: "Hashtags which match the given query",
|
|
|
|
|
}),
|
|
|
|
|
})
|
2025-07-07 03:42:35 +02:00
|
|
|
.meta({
|
2025-02-12 23:04:44 +01:00
|
|
|
description: "Represents the results of a search.",
|
|
|
|
|
externalDocs: {
|
|
|
|
|
url: "https://docs.joinmastodon.org/entities/Search",
|
|
|
|
|
},
|
2025-07-07 03:42:35 +02:00
|
|
|
id: "Search",
|
2025-02-12 23:04:44 +01:00
|
|
|
});
|