@llun/activities.schema 0.0.8 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/install-state.gz +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/like.d.ts +16 -125
- package/dist/mastodon/account.d.ts +327 -0
- package/dist/mastodon/account.js +87 -0
- package/dist/mastodon/accountField.d.ts +15 -0
- package/dist/mastodon/accountField.js +15 -0
- package/dist/mastodon/customEmoji.d.ts +21 -0
- package/dist/mastodon/customEmoji.js +21 -0
- package/dist/mastodon/filter/index.d.ts +62 -0
- package/dist/mastodon/filter/index.js +24 -0
- package/dist/mastodon/filter/keyword.d.ts +15 -0
- package/dist/mastodon/filter/keyword.js +9 -0
- package/dist/mastodon/filter/status.d.ts +12 -0
- package/dist/mastodon/filter/status.js +8 -0
- package/dist/mastodon/filterResult.d.ts +104 -0
- package/dist/mastodon/filterResult.js +16 -0
- package/dist/mastodon/index.d.ts +3 -0
- package/dist/mastodon/index.js +3 -0
- package/dist/mastodon/mediaAttachment/audio.d.ts +87 -0
- package/dist/mastodon/mediaAttachment/audio.js +17 -0
- package/dist/mastodon/mediaAttachment/base.d.ts +24 -0
- package/dist/mastodon/mediaAttachment/base.js +26 -0
- package/dist/mastodon/mediaAttachment/gifv.d.ts +158 -0
- package/dist/mastodon/mediaAttachment/gifv.js +37 -0
- package/dist/mastodon/mediaAttachment/image.d.ts +142 -0
- package/dist/mastodon/mediaAttachment/image.js +30 -0
- package/dist/mastodon/mediaAttachment/index.d.ts +576 -0
- package/dist/mastodon/mediaAttachment/index.js +8 -0
- package/dist/mastodon/mediaAttachment/unknown.d.ts +28 -0
- package/dist/mastodon/mediaAttachment/unknown.js +8 -0
- package/dist/mastodon/mediaAttachment/video.d.ts +173 -0
- package/dist/mastodon/mediaAttachment/video.js +38 -0
- package/dist/mastodon/poll/index.d.ts +81 -0
- package/dist/mastodon/poll/index.js +27 -0
- package/dist/mastodon/poll/option.d.ts +12 -0
- package/dist/mastodon/poll/option.js +10 -0
- package/dist/mastodon/previewCard.d.ts +48 -0
- package/dist/mastodon/previewCard.js +34 -0
- package/dist/mastodon/status/application.d.ts +12 -0
- package/dist/mastodon/status/application.js +12 -0
- package/dist/mastodon/status/base.d.ts +1738 -0
- package/dist/mastodon/status/base.js +96 -0
- package/dist/mastodon/status/index.d.ts +4035 -0
- package/dist/mastodon/status/index.js +4 -0
- package/dist/mastodon/status/mention.d.ts +18 -0
- package/dist/mastodon/status/mention.js +12 -0
- package/dist/mastodon/status/tag.d.ts +12 -0
- package/dist/mastodon/status/tag.js +10 -0
- package/dist/mastodon/status/visibility.d.ts +3 -0
- package/dist/mastodon/status/visibility.js +3 -0
- package/dist/note/baseContent.d.ts +251 -0
- package/dist/note/baseContent.js +24 -0
- package/dist/note.d.ts +8 -7
- package/dist/note.js +1 -23
- package/dist/undo.d.ts +24 -243
- package/package.json +4 -4
- package/src/mastodon/filter/index.ts +31 -0
- package/src/mastodon/filter/keyword.ts +12 -0
- package/src/mastodon/filter/status.ts +10 -0
- package/src/mastodon/filterResult.ts +18 -0
- package/src/mastodon/mediaAttachment/audio.ts +19 -0
- package/src/mastodon/mediaAttachment/base.ts +34 -0
- package/src/mastodon/mediaAttachment/gifv.ts +41 -0
- package/src/mastodon/mediaAttachment/image.ts +32 -0
- package/src/mastodon/mediaAttachment/index.ts +10 -0
- package/src/mastodon/mediaAttachment/unknown.ts +12 -0
- package/src/mastodon/mediaAttachment/video.ts +43 -0
- package/src/mastodon/poll/index.ts +35 -0
- package/src/mastodon/poll/option.ts +13 -0
- package/src/mastodon/previewCard.ts +41 -0
- package/src/mastodon/status/application.ts +15 -0
- package/src/mastodon/status/base.ts +125 -0
- package/src/mastodon/status/index.ts +8 -0
- package/src/mastodon/status/mention.ts +15 -0
- package/src/mastodon/status/tag.ts +12 -0
- package/src/mastodon/status/visibility.ts +5 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// This schema is base on https://docs.joinmastodon.org/entities/Status/
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { Account } from "../account.js";
|
|
4
|
+
import { Visibility } from "./visibility.js";
|
|
5
|
+
import { MediaAttachment } from "../mediaAttachment/index.js";
|
|
6
|
+
import { Application } from "./application.js";
|
|
7
|
+
import { CustomEmoji } from "../customEmoji.js";
|
|
8
|
+
import { Poll } from "../poll/index.js";
|
|
9
|
+
import { PreviewCard } from "../previewCard.js";
|
|
10
|
+
import { FilterResult } from "../filterResult.js";
|
|
11
|
+
export const BaseStatus = z.object({
|
|
12
|
+
id: z.string({
|
|
13
|
+
description: "ID of the status in the database, for Mastodon, it is numeric casting to string. For Activities.next, this is equal to status URI",
|
|
14
|
+
}),
|
|
15
|
+
uri: z.string({
|
|
16
|
+
description: "URI of the status used for federation",
|
|
17
|
+
}),
|
|
18
|
+
account: Account.describe("The actor that authored the status"),
|
|
19
|
+
content: z.string({ description: "HTML-encoded status content" }),
|
|
20
|
+
visibility: Visibility.describe("Visibility of this status"),
|
|
21
|
+
sensitive: z.boolean({
|
|
22
|
+
description: "Is this status marked as sensitive content?",
|
|
23
|
+
}),
|
|
24
|
+
spoiler_text: z.string({
|
|
25
|
+
description: "Subject or summary line, below which status content is collapsed until expanded",
|
|
26
|
+
}),
|
|
27
|
+
media_attachments: MediaAttachment.array(),
|
|
28
|
+
application: Application.optional(),
|
|
29
|
+
emojis: CustomEmoji.array().describe("Custom emoji to be used when rendering status content"),
|
|
30
|
+
reblogs_count: z.number({
|
|
31
|
+
description: "How many boosts this status has received",
|
|
32
|
+
}),
|
|
33
|
+
favourites_count: z.number({
|
|
34
|
+
description: "How many favourites this status has received",
|
|
35
|
+
}),
|
|
36
|
+
replies_count: z.number({
|
|
37
|
+
description: "How many replies this status has received",
|
|
38
|
+
}),
|
|
39
|
+
url: z
|
|
40
|
+
.string({ description: "A link to the status’s HTML representation" })
|
|
41
|
+
.nullable(),
|
|
42
|
+
in_reply_to_id: z
|
|
43
|
+
.string({ description: "ID of the status being replied to" })
|
|
44
|
+
.nullable(),
|
|
45
|
+
in_reply_to_account_id: z
|
|
46
|
+
.string({
|
|
47
|
+
description: "ID of the actor that authored the status being replied to",
|
|
48
|
+
})
|
|
49
|
+
.nullable(),
|
|
50
|
+
poll: Poll.nullable().describe("The poll attached to the status"),
|
|
51
|
+
card: PreviewCard.nullable().describe("Preview card for links included within status content"),
|
|
52
|
+
language: z
|
|
53
|
+
.string({
|
|
54
|
+
description: "Primary language of this status in ISO 639 Part 1 two-letter language code",
|
|
55
|
+
})
|
|
56
|
+
.nullable(),
|
|
57
|
+
text: z
|
|
58
|
+
.string({
|
|
59
|
+
description: "Plain-text source of a status. Returned instead of `content` when status is deleted, so the user may redraft from the source text without the client having to reverse-engineer the original text from the HTML content",
|
|
60
|
+
})
|
|
61
|
+
.nullable(),
|
|
62
|
+
created_at: z.string({
|
|
63
|
+
description: "The date when this status was created in ISO 8601 Datetime format",
|
|
64
|
+
}),
|
|
65
|
+
edited_at: z
|
|
66
|
+
.string({
|
|
67
|
+
description: "Timestamp of when the status was last edited in ISO 8601 Datetime format",
|
|
68
|
+
})
|
|
69
|
+
.nullable(),
|
|
70
|
+
favourited: z
|
|
71
|
+
.boolean({
|
|
72
|
+
description: "If the current token has an authorized user: Have you favourited this status?",
|
|
73
|
+
})
|
|
74
|
+
.optional(),
|
|
75
|
+
reblogged: z
|
|
76
|
+
.boolean({
|
|
77
|
+
description: "If the current token has an authorized user: Have you boosted this status?",
|
|
78
|
+
})
|
|
79
|
+
.optional(),
|
|
80
|
+
muted: z
|
|
81
|
+
.boolean({
|
|
82
|
+
description: "If the current token has an authorized user: Have you muted notifications for this status’s conversation?",
|
|
83
|
+
})
|
|
84
|
+
.optional(),
|
|
85
|
+
bookmarked: z
|
|
86
|
+
.boolean({
|
|
87
|
+
description: "If the current token has an authorized user: Have you bookmarked this status?",
|
|
88
|
+
})
|
|
89
|
+
.optional(),
|
|
90
|
+
pinned: z
|
|
91
|
+
.boolean({
|
|
92
|
+
description: "If the current token has an authorized user: Have you pinned this status? Only appears if the status is pinnable",
|
|
93
|
+
})
|
|
94
|
+
.optional(),
|
|
95
|
+
filtered: FilterResult.optional().describe("If the current token has an authorized user: The filter and keywords that matched this status"),
|
|
96
|
+
});
|