social bookmarking for atproto
1/*
2 * clippr: a social bookmarking service for the AT Protocol
3 * Copyright (c) 2025 clippr contributors.
4 * SPDX-License-Identifier: AGPL-3.0-only
5 */
6
7import type { ResourceUri } from "@atcute/lexicons";
8
9export interface ErrorResponse {
10 error: string;
11 message: string;
12}
13
14export interface ProfileViewQuery {
15 actor: string;
16}
17
18export interface ClipViewQuery {
19 did: string;
20 collection: string;
21 recordKey: string;
22}
23
24export const isClipViewQuery = (query: unknown): query is ClipViewQuery => {
25 return typeof query === "object" && query !== null && "did" in query;
26};
27
28export interface TagRef {
29 $type: "com.atproto.repo.strongRef";
30 cid: string;
31 uri: ResourceUri;
32}
33
34export interface TagViewQuery {
35 did: string;
36 collection: string;
37 recordKey: string;
38}
39
40export interface AppviewStatsQuery {
41 knownUsers: number;
42 knownClips: number;
43 knownTags: number;
44}