@llun/activities.schema 0.1.1 → 0.2.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/dist/cjs/accept.js +11 -0
- package/dist/cjs/follow.js +10 -0
- package/dist/cjs/index.js +24 -0
- package/dist/cjs/like.js +11 -0
- package/dist/cjs/mastodon/account.js +90 -0
- package/dist/cjs/mastodon/accountField.js +18 -0
- package/dist/cjs/mastodon/customEmoji.js +24 -0
- package/dist/cjs/mastodon/filter/index.js +27 -0
- package/dist/cjs/mastodon/filter/keyword.js +12 -0
- package/dist/cjs/mastodon/filter/status.js +11 -0
- package/dist/cjs/mastodon/filterResult.js +19 -0
- package/dist/cjs/mastodon/index.js +25 -0
- package/dist/cjs/mastodon/mediaAttachment/audio.js +20 -0
- package/dist/cjs/mastodon/mediaAttachment/base.js +29 -0
- package/dist/cjs/mastodon/mediaAttachment/gifv.js +40 -0
- package/dist/cjs/mastodon/mediaAttachment/image.js +33 -0
- package/dist/cjs/mastodon/mediaAttachment/index.js +11 -0
- package/dist/cjs/mastodon/mediaAttachment/unknown.js +11 -0
- package/dist/cjs/mastodon/mediaAttachment/video.js +41 -0
- package/dist/cjs/mastodon/poll/index.js +30 -0
- package/dist/cjs/mastodon/poll/option.js +13 -0
- package/dist/cjs/mastodon/previewCard.js +37 -0
- package/dist/cjs/mastodon/status/application.js +15 -0
- package/dist/cjs/mastodon/status/base.js +99 -0
- package/dist/cjs/mastodon/status/index.js +7 -0
- package/dist/cjs/mastodon/status/mention.js +15 -0
- package/dist/cjs/mastodon/status/tag.js +13 -0
- package/dist/cjs/mastodon/status/visibility.js +6 -0
- package/dist/cjs/note/attachment.js +7 -0
- package/dist/cjs/note/baseContent.js +27 -0
- package/dist/cjs/note/document.js +14 -0
- package/dist/cjs/note/emoji.js +11 -0
- package/dist/cjs/note/image.js +9 -0
- package/dist/cjs/note/mention.js +9 -0
- package/dist/cjs/note/propertyValue.js +9 -0
- package/dist/cjs/note.js +8 -0
- package/dist/cjs/reject.js +11 -0
- package/dist/cjs/undo.js +12 -0
- package/dist/{mastodon → esm/mastodon}/account.js +2 -2
- package/dist/{mastodon → types/mastodon}/account.d.ts +20 -20
- package/dist/{mastodon → types/mastodon}/status/base.d.ts +34 -34
- package/dist/{mastodon → types/mastodon}/status/index.d.ts +82 -82
- package/package.json +12 -4
- package/src/mastodon/account.ts +2 -2
- package/tsconfig.json +0 -3
- /package/dist/{accept.js → esm/accept.js} +0 -0
- /package/dist/{follow.js → esm/follow.js} +0 -0
- /package/dist/{index.js → esm/index.js} +0 -0
- /package/dist/{like.js → esm/like.js} +0 -0
- /package/dist/{mastodon → esm/mastodon}/accountField.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/customEmoji.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/filter/index.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/filter/keyword.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/filter/status.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/filterResult.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/index.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/mediaAttachment/audio.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/mediaAttachment/base.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/mediaAttachment/gifv.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/mediaAttachment/image.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/mediaAttachment/index.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/mediaAttachment/unknown.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/mediaAttachment/video.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/poll/index.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/poll/option.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/previewCard.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/status/application.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/status/base.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/status/index.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/status/mention.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/status/tag.js +0 -0
- /package/dist/{mastodon → esm/mastodon}/status/visibility.js +0 -0
- /package/dist/{note → esm/note}/attachment.js +0 -0
- /package/dist/{note → esm/note}/baseContent.js +0 -0
- /package/dist/{note → esm/note}/document.js +0 -0
- /package/dist/{note → esm/note}/emoji.js +0 -0
- /package/dist/{note → esm/note}/image.js +0 -0
- /package/dist/{note → esm/note}/mention.js +0 -0
- /package/dist/{note → esm/note}/propertyValue.js +0 -0
- /package/dist/{note.js → esm/note.js} +0 -0
- /package/dist/{reject.js → esm/reject.js} +0 -0
- /package/dist/{undo.js → esm/undo.js} +0 -0
- /package/dist/{accept.d.ts → types/accept.d.ts} +0 -0
- /package/dist/{follow.d.ts → types/follow.d.ts} +0 -0
- /package/dist/{index.d.ts → types/index.d.ts} +0 -0
- /package/dist/{like.d.ts → types/like.d.ts} +0 -0
- /package/dist/{mastodon → types/mastodon}/accountField.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/customEmoji.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/filter/index.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/filter/keyword.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/filter/status.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/filterResult.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/index.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/mediaAttachment/audio.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/mediaAttachment/base.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/mediaAttachment/gifv.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/mediaAttachment/image.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/mediaAttachment/index.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/mediaAttachment/unknown.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/mediaAttachment/video.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/poll/index.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/poll/option.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/previewCard.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/status/application.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/status/mention.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/status/tag.d.ts +0 -0
- /package/dist/{mastodon → types/mastodon}/status/visibility.d.ts +0 -0
- /package/dist/{note → types/note}/attachment.d.ts +0 -0
- /package/dist/{note → types/note}/baseContent.d.ts +0 -0
- /package/dist/{note → types/note}/document.d.ts +0 -0
- /package/dist/{note → types/note}/emoji.d.ts +0 -0
- /package/dist/{note → types/note}/image.d.ts +0 -0
- /package/dist/{note → types/note}/mention.d.ts +0 -0
- /package/dist/{note → types/note}/propertyValue.d.ts +0 -0
- /package/dist/{note.d.ts → types/note.d.ts} +0 -0
- /package/dist/{reject.d.ts → types/reject.d.ts} +0 -0
- /package/dist/{undo.d.ts → types/undo.d.ts} +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseStatus = void 0;
|
|
4
|
+
// This schema is base on https://docs.joinmastodon.org/entities/Status/
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const account_js_1 = require("../account.js");
|
|
7
|
+
const visibility_js_1 = require("./visibility.js");
|
|
8
|
+
const index_js_1 = require("../mediaAttachment/index.js");
|
|
9
|
+
const application_js_1 = require("./application.js");
|
|
10
|
+
const customEmoji_js_1 = require("../customEmoji.js");
|
|
11
|
+
const index_js_2 = require("../poll/index.js");
|
|
12
|
+
const previewCard_js_1 = require("../previewCard.js");
|
|
13
|
+
const filterResult_js_1 = require("../filterResult.js");
|
|
14
|
+
exports.BaseStatus = zod_1.z.object({
|
|
15
|
+
id: zod_1.z.string({
|
|
16
|
+
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",
|
|
17
|
+
}),
|
|
18
|
+
uri: zod_1.z.string({
|
|
19
|
+
description: "URI of the status used for federation",
|
|
20
|
+
}),
|
|
21
|
+
account: account_js_1.Account.describe("The actor that authored the status"),
|
|
22
|
+
content: zod_1.z.string({ description: "HTML-encoded status content" }),
|
|
23
|
+
visibility: visibility_js_1.Visibility.describe("Visibility of this status"),
|
|
24
|
+
sensitive: zod_1.z.boolean({
|
|
25
|
+
description: "Is this status marked as sensitive content?",
|
|
26
|
+
}),
|
|
27
|
+
spoiler_text: zod_1.z.string({
|
|
28
|
+
description: "Subject or summary line, below which status content is collapsed until expanded",
|
|
29
|
+
}),
|
|
30
|
+
media_attachments: index_js_1.MediaAttachment.array(),
|
|
31
|
+
application: application_js_1.Application.optional(),
|
|
32
|
+
emojis: customEmoji_js_1.CustomEmoji.array().describe("Custom emoji to be used when rendering status content"),
|
|
33
|
+
reblogs_count: zod_1.z.number({
|
|
34
|
+
description: "How many boosts this status has received",
|
|
35
|
+
}),
|
|
36
|
+
favourites_count: zod_1.z.number({
|
|
37
|
+
description: "How many favourites this status has received",
|
|
38
|
+
}),
|
|
39
|
+
replies_count: zod_1.z.number({
|
|
40
|
+
description: "How many replies this status has received",
|
|
41
|
+
}),
|
|
42
|
+
url: zod_1.z
|
|
43
|
+
.string({ description: "A link to the status’s HTML representation" })
|
|
44
|
+
.nullable(),
|
|
45
|
+
in_reply_to_id: zod_1.z
|
|
46
|
+
.string({ description: "ID of the status being replied to" })
|
|
47
|
+
.nullable(),
|
|
48
|
+
in_reply_to_account_id: zod_1.z
|
|
49
|
+
.string({
|
|
50
|
+
description: "ID of the actor that authored the status being replied to",
|
|
51
|
+
})
|
|
52
|
+
.nullable(),
|
|
53
|
+
poll: index_js_2.Poll.nullable().describe("The poll attached to the status"),
|
|
54
|
+
card: previewCard_js_1.PreviewCard.nullable().describe("Preview card for links included within status content"),
|
|
55
|
+
language: zod_1.z
|
|
56
|
+
.string({
|
|
57
|
+
description: "Primary language of this status in ISO 639 Part 1 two-letter language code",
|
|
58
|
+
})
|
|
59
|
+
.nullable(),
|
|
60
|
+
text: zod_1.z
|
|
61
|
+
.string({
|
|
62
|
+
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",
|
|
63
|
+
})
|
|
64
|
+
.nullable(),
|
|
65
|
+
created_at: zod_1.z.string({
|
|
66
|
+
description: "The date when this status was created in ISO 8601 Datetime format",
|
|
67
|
+
}),
|
|
68
|
+
edited_at: zod_1.z
|
|
69
|
+
.string({
|
|
70
|
+
description: "Timestamp of when the status was last edited in ISO 8601 Datetime format",
|
|
71
|
+
})
|
|
72
|
+
.nullable(),
|
|
73
|
+
favourited: zod_1.z
|
|
74
|
+
.boolean({
|
|
75
|
+
description: "If the current token has an authorized user: Have you favourited this status?",
|
|
76
|
+
})
|
|
77
|
+
.optional(),
|
|
78
|
+
reblogged: zod_1.z
|
|
79
|
+
.boolean({
|
|
80
|
+
description: "If the current token has an authorized user: Have you boosted this status?",
|
|
81
|
+
})
|
|
82
|
+
.optional(),
|
|
83
|
+
muted: zod_1.z
|
|
84
|
+
.boolean({
|
|
85
|
+
description: "If the current token has an authorized user: Have you muted notifications for this status’s conversation?",
|
|
86
|
+
})
|
|
87
|
+
.optional(),
|
|
88
|
+
bookmarked: zod_1.z
|
|
89
|
+
.boolean({
|
|
90
|
+
description: "If the current token has an authorized user: Have you bookmarked this status?",
|
|
91
|
+
})
|
|
92
|
+
.optional(),
|
|
93
|
+
pinned: zod_1.z
|
|
94
|
+
.boolean({
|
|
95
|
+
description: "If the current token has an authorized user: Have you pinned this status? Only appears if the status is pinnable",
|
|
96
|
+
})
|
|
97
|
+
.optional(),
|
|
98
|
+
filtered: filterResult_js_1.FilterResult.optional().describe("If the current token has an authorized user: The filter and keywords that matched this status"),
|
|
99
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Status = void 0;
|
|
4
|
+
const base_js_1 = require("./base.js");
|
|
5
|
+
exports.Status = base_js_1.BaseStatus.extend({
|
|
6
|
+
reblog: base_js_1.BaseStatus.nullable().describe("The status being reblogged"),
|
|
7
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Mention = void 0;
|
|
4
|
+
// This schema is base on https://docs.joinmastodon.org/entities/Status/#Mention
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.Mention = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.string({ description: "The actor ID of the mentioned user" }),
|
|
8
|
+
username: zod_1.z.string({ description: "The username of the mentioned user" }),
|
|
9
|
+
url: zod_1.z.string({
|
|
10
|
+
description: "The location of the mentioned user’s profile",
|
|
11
|
+
}),
|
|
12
|
+
acct: zod_1.z.string({
|
|
13
|
+
description: "The webfinger acct: URI of the mentioned user. Equivalent to `username` for local users, or `username@domain` for remote users",
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Tag = void 0;
|
|
4
|
+
// This schema is base on https://docs.joinmastodon.org/entities/Status/#Tag
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.Tag = zod_1.z.object({
|
|
7
|
+
name: zod_1.z.string({
|
|
8
|
+
description: "The value of the hashtag after the `#` sign",
|
|
9
|
+
}),
|
|
10
|
+
url: zod_1.z.string({
|
|
11
|
+
description: "A link to the hashtag on the instance",
|
|
12
|
+
}),
|
|
13
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Visibility = void 0;
|
|
4
|
+
// This schema is base on https://docs.joinmastodon.org/entities/Status/#visibility
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.Visibility = zod_1.z.enum(["public", "unlist", "private", "direct"]);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Attachment = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const document_js_1 = require("./document.js");
|
|
6
|
+
const propertyValue_js_1 = require("./propertyValue.js");
|
|
7
|
+
exports.Attachment = zod_1.z.union([propertyValue_js_1.PropertyValue, document_js_1.Document]);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseContent = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const attachment_js_1 = require("./attachment.js");
|
|
6
|
+
const emoji_js_1 = require("./emoji.js");
|
|
7
|
+
const mention_js_1 = require("./mention.js");
|
|
8
|
+
exports.BaseContent = zod_1.z.object({
|
|
9
|
+
id: zod_1.z.string(),
|
|
10
|
+
url: zod_1.z.string({ description: "Note URL" }),
|
|
11
|
+
attributedTo: zod_1.z.string({ description: "Note publisher" }),
|
|
12
|
+
to: zod_1.z.union([zod_1.z.string(), zod_1.z.string().array()]),
|
|
13
|
+
cc: zod_1.z.union([zod_1.z.string(), zod_1.z.string().array()]),
|
|
14
|
+
inReplyTo: zod_1.z.string().nullable(),
|
|
15
|
+
summary: zod_1.z.string({ description: "Note short summary" }).optional(),
|
|
16
|
+
summaryMap: zod_1.z
|
|
17
|
+
.record(zod_1.z.string(), { description: "Note short summary in each locale" })
|
|
18
|
+
.optional(),
|
|
19
|
+
content: zod_1.z.string({ description: "Note content" }).optional(),
|
|
20
|
+
contentMap: zod_1.z
|
|
21
|
+
.record(zod_1.z.string(), { description: "Note content in each locale" })
|
|
22
|
+
.optional(),
|
|
23
|
+
attachment: zod_1.z.union([attachment_js_1.Attachment, attachment_js_1.Attachment.array()]).optional(),
|
|
24
|
+
tag: zod_1.z.union([mention_js_1.Mention, emoji_js_1.Emoji]).array(),
|
|
25
|
+
published: zod_1.z.string({ description: "Object published datetime" }),
|
|
26
|
+
updated: zod_1.z.string({ description: "Object updated datetime" }).optional(),
|
|
27
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Document = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.Document = zod_1.z.object({
|
|
6
|
+
type: zod_1.z.literal("Document"),
|
|
7
|
+
mediaType: zod_1.z.string(),
|
|
8
|
+
url: zod_1.z.string(),
|
|
9
|
+
blurhash: zod_1.z.string().optional(),
|
|
10
|
+
width: zod_1.z.number().optional(),
|
|
11
|
+
height: zod_1.z.number().optional(),
|
|
12
|
+
name: zod_1.z.string().optional().nullable(),
|
|
13
|
+
focalPoint: zod_1.z.tuple([zod_1.z.number(), zod_1.z.number()]).optional(),
|
|
14
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Emoji = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const image_js_1 = require("./image.js");
|
|
6
|
+
exports.Emoji = zod_1.z.object({
|
|
7
|
+
type: zod_1.z.literal("Emoji"),
|
|
8
|
+
name: zod_1.z.string(),
|
|
9
|
+
updated: zod_1.z.string(),
|
|
10
|
+
icon: image_js_1.Image,
|
|
11
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Image = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.Image = zod_1.z.object({
|
|
6
|
+
type: zod_1.z.literal("Image"),
|
|
7
|
+
mediaType: zod_1.z.string(),
|
|
8
|
+
url: zod_1.z.string(),
|
|
9
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Mention = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.Mention = zod_1.z.object({
|
|
6
|
+
type: zod_1.z.literal("Mention"),
|
|
7
|
+
href: zod_1.z.string(),
|
|
8
|
+
name: zod_1.z.string(),
|
|
9
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PropertyValue = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PropertyValue = zod_1.z.object({
|
|
6
|
+
type: zod_1.z.literal("PropertyValue"),
|
|
7
|
+
name: zod_1.z.string(),
|
|
8
|
+
value: zod_1.z.string(),
|
|
9
|
+
});
|
package/dist/cjs/note.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Note = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const baseContent_js_1 = require("./note/baseContent.js");
|
|
6
|
+
exports.Note = baseContent_js_1.BaseContent.extend({
|
|
7
|
+
type: zod_1.z.literal("Note"),
|
|
8
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Reject = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const follow_js_1 = require("./follow.js");
|
|
6
|
+
exports.Reject = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.string(),
|
|
8
|
+
actor: zod_1.z.string(),
|
|
9
|
+
type: zod_1.z.literal("Reject"),
|
|
10
|
+
object: follow_js_1.Follow,
|
|
11
|
+
});
|
package/dist/cjs/undo.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Undo = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const follow_js_1 = require("./follow.js");
|
|
6
|
+
const like_js_1 = require("./like.js");
|
|
7
|
+
exports.Undo = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.string(),
|
|
9
|
+
actor: zod_1.z.string(),
|
|
10
|
+
type: zod_1.z.literal("Undo"),
|
|
11
|
+
object: zod_1.z.union([like_js_1.Like, follow_js_1.Follow]),
|
|
12
|
+
});
|
|
@@ -33,7 +33,7 @@ const BaseAccount = z.object({
|
|
|
33
33
|
header_static: z.string({
|
|
34
34
|
description: "A static version of the `header`. Equal to `header` if its value is a static image; different if `header` is an animated GIF",
|
|
35
35
|
}),
|
|
36
|
-
|
|
36
|
+
locked: z.boolean({
|
|
37
37
|
description: "Whether the actor manually approves follow requests",
|
|
38
38
|
}),
|
|
39
39
|
fields: AccountField.array().describe("Additional metadata attached to a profile as name-value pairs"),
|
|
@@ -83,5 +83,5 @@ const BaseAccount = z.object({
|
|
|
83
83
|
}),
|
|
84
84
|
});
|
|
85
85
|
export const Account = BaseAccount.extend({
|
|
86
|
-
moved: BaseAccount.
|
|
86
|
+
moved: BaseAccount.nullish().describe("Indicates that the profile is currently inactive and that its user has moved to a new account"),
|
|
87
87
|
});
|
|
@@ -10,7 +10,7 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
10
10
|
avatar_static: z.ZodString;
|
|
11
11
|
header: z.ZodString;
|
|
12
12
|
header_static: z.ZodString;
|
|
13
|
-
|
|
13
|
+
locked: z.ZodBoolean;
|
|
14
14
|
fields: z.ZodArray<z.ZodObject<{
|
|
15
15
|
name: z.ZodString;
|
|
16
16
|
value: z.ZodString;
|
|
@@ -55,7 +55,7 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
55
55
|
followers_count: z.ZodNumber;
|
|
56
56
|
following_count: z.ZodNumber;
|
|
57
57
|
}, {
|
|
58
|
-
moved: z.ZodNullable<z.ZodObject<{
|
|
58
|
+
moved: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
59
59
|
id: z.ZodString;
|
|
60
60
|
username: z.ZodString;
|
|
61
61
|
acct: z.ZodString;
|
|
@@ -66,7 +66,7 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
66
66
|
avatar_static: z.ZodString;
|
|
67
67
|
header: z.ZodString;
|
|
68
68
|
header_static: z.ZodString;
|
|
69
|
-
|
|
69
|
+
locked: z.ZodBoolean;
|
|
70
70
|
fields: z.ZodArray<z.ZodObject<{
|
|
71
71
|
name: z.ZodString;
|
|
72
72
|
value: z.ZodString;
|
|
@@ -121,7 +121,7 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
121
121
|
avatar_static: string;
|
|
122
122
|
header: string;
|
|
123
123
|
header_static: string;
|
|
124
|
-
|
|
124
|
+
locked: boolean;
|
|
125
125
|
fields: {
|
|
126
126
|
value: string;
|
|
127
127
|
name: string;
|
|
@@ -156,7 +156,7 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
156
156
|
avatar_static: string;
|
|
157
157
|
header: string;
|
|
158
158
|
header_static: string;
|
|
159
|
-
|
|
159
|
+
locked: boolean;
|
|
160
160
|
fields: {
|
|
161
161
|
value: string;
|
|
162
162
|
name: string;
|
|
@@ -180,7 +180,7 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
180
180
|
noindex?: boolean | null | undefined;
|
|
181
181
|
suspended?: boolean | undefined;
|
|
182
182
|
limited?: boolean | undefined;
|
|
183
|
-
}
|
|
183
|
+
}>>>;
|
|
184
184
|
}>, "strip", z.ZodTypeAny, {
|
|
185
185
|
id: string;
|
|
186
186
|
url: string;
|
|
@@ -192,7 +192,7 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
192
192
|
avatar_static: string;
|
|
193
193
|
header: string;
|
|
194
194
|
header_static: string;
|
|
195
|
-
|
|
195
|
+
locked: boolean;
|
|
196
196
|
fields: {
|
|
197
197
|
value: string;
|
|
198
198
|
name: string;
|
|
@@ -213,7 +213,10 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
213
213
|
statuses_count: number;
|
|
214
214
|
followers_count: number;
|
|
215
215
|
following_count: number;
|
|
216
|
-
|
|
216
|
+
noindex?: boolean | null | undefined;
|
|
217
|
+
suspended?: boolean | undefined;
|
|
218
|
+
limited?: boolean | undefined;
|
|
219
|
+
moved?: {
|
|
217
220
|
id: string;
|
|
218
221
|
url: string;
|
|
219
222
|
username: string;
|
|
@@ -224,7 +227,7 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
224
227
|
avatar_static: string;
|
|
225
228
|
header: string;
|
|
226
229
|
header_static: string;
|
|
227
|
-
|
|
230
|
+
locked: boolean;
|
|
228
231
|
fields: {
|
|
229
232
|
value: string;
|
|
230
233
|
name: string;
|
|
@@ -248,10 +251,7 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
248
251
|
noindex?: boolean | null | undefined;
|
|
249
252
|
suspended?: boolean | undefined;
|
|
250
253
|
limited?: boolean | undefined;
|
|
251
|
-
} | null;
|
|
252
|
-
noindex?: boolean | null | undefined;
|
|
253
|
-
suspended?: boolean | undefined;
|
|
254
|
-
limited?: boolean | undefined;
|
|
254
|
+
} | null | undefined;
|
|
255
255
|
}, {
|
|
256
256
|
id: string;
|
|
257
257
|
url: string;
|
|
@@ -263,7 +263,7 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
263
263
|
avatar_static: string;
|
|
264
264
|
header: string;
|
|
265
265
|
header_static: string;
|
|
266
|
-
|
|
266
|
+
locked: boolean;
|
|
267
267
|
fields: {
|
|
268
268
|
value: string;
|
|
269
269
|
name: string;
|
|
@@ -284,7 +284,10 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
284
284
|
statuses_count: number;
|
|
285
285
|
followers_count: number;
|
|
286
286
|
following_count: number;
|
|
287
|
-
|
|
287
|
+
noindex?: boolean | null | undefined;
|
|
288
|
+
suspended?: boolean | undefined;
|
|
289
|
+
limited?: boolean | undefined;
|
|
290
|
+
moved?: {
|
|
288
291
|
id: string;
|
|
289
292
|
url: string;
|
|
290
293
|
username: string;
|
|
@@ -295,7 +298,7 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
295
298
|
avatar_static: string;
|
|
296
299
|
header: string;
|
|
297
300
|
header_static: string;
|
|
298
|
-
|
|
301
|
+
locked: boolean;
|
|
299
302
|
fields: {
|
|
300
303
|
value: string;
|
|
301
304
|
name: string;
|
|
@@ -319,9 +322,6 @@ export declare const Account: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
319
322
|
noindex?: boolean | null | undefined;
|
|
320
323
|
suspended?: boolean | undefined;
|
|
321
324
|
limited?: boolean | undefined;
|
|
322
|
-
} | null;
|
|
323
|
-
noindex?: boolean | null | undefined;
|
|
324
|
-
suspended?: boolean | undefined;
|
|
325
|
-
limited?: boolean | undefined;
|
|
325
|
+
} | null | undefined;
|
|
326
326
|
}>;
|
|
327
327
|
export type Account = z.infer<typeof Account>;
|
|
@@ -13,7 +13,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
13
13
|
avatar_static: z.ZodString;
|
|
14
14
|
header: z.ZodString;
|
|
15
15
|
header_static: z.ZodString;
|
|
16
|
-
|
|
16
|
+
locked: z.ZodBoolean;
|
|
17
17
|
fields: z.ZodArray<z.ZodObject<{
|
|
18
18
|
name: z.ZodString;
|
|
19
19
|
value: z.ZodString;
|
|
@@ -58,7 +58,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
58
58
|
followers_count: z.ZodNumber;
|
|
59
59
|
following_count: z.ZodNumber;
|
|
60
60
|
}, {
|
|
61
|
-
moved: z.ZodNullable<z.ZodObject<{
|
|
61
|
+
moved: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
62
62
|
id: z.ZodString;
|
|
63
63
|
username: z.ZodString;
|
|
64
64
|
acct: z.ZodString;
|
|
@@ -69,7 +69,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
69
69
|
avatar_static: z.ZodString;
|
|
70
70
|
header: z.ZodString;
|
|
71
71
|
header_static: z.ZodString;
|
|
72
|
-
|
|
72
|
+
locked: z.ZodBoolean;
|
|
73
73
|
fields: z.ZodArray<z.ZodObject<{
|
|
74
74
|
name: z.ZodString;
|
|
75
75
|
value: z.ZodString;
|
|
@@ -124,7 +124,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
124
124
|
avatar_static: string;
|
|
125
125
|
header: string;
|
|
126
126
|
header_static: string;
|
|
127
|
-
|
|
127
|
+
locked: boolean;
|
|
128
128
|
fields: {
|
|
129
129
|
value: string;
|
|
130
130
|
name: string;
|
|
@@ -159,7 +159,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
159
159
|
avatar_static: string;
|
|
160
160
|
header: string;
|
|
161
161
|
header_static: string;
|
|
162
|
-
|
|
162
|
+
locked: boolean;
|
|
163
163
|
fields: {
|
|
164
164
|
value: string;
|
|
165
165
|
name: string;
|
|
@@ -183,7 +183,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
183
183
|
noindex?: boolean | null | undefined;
|
|
184
184
|
suspended?: boolean | undefined;
|
|
185
185
|
limited?: boolean | undefined;
|
|
186
|
-
}
|
|
186
|
+
}>>>;
|
|
187
187
|
}>, "strip", z.ZodTypeAny, {
|
|
188
188
|
id: string;
|
|
189
189
|
url: string;
|
|
@@ -195,7 +195,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
195
195
|
avatar_static: string;
|
|
196
196
|
header: string;
|
|
197
197
|
header_static: string;
|
|
198
|
-
|
|
198
|
+
locked: boolean;
|
|
199
199
|
fields: {
|
|
200
200
|
value: string;
|
|
201
201
|
name: string;
|
|
@@ -216,7 +216,10 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
216
216
|
statuses_count: number;
|
|
217
217
|
followers_count: number;
|
|
218
218
|
following_count: number;
|
|
219
|
-
|
|
219
|
+
noindex?: boolean | null | undefined;
|
|
220
|
+
suspended?: boolean | undefined;
|
|
221
|
+
limited?: boolean | undefined;
|
|
222
|
+
moved?: {
|
|
220
223
|
id: string;
|
|
221
224
|
url: string;
|
|
222
225
|
username: string;
|
|
@@ -227,7 +230,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
227
230
|
avatar_static: string;
|
|
228
231
|
header: string;
|
|
229
232
|
header_static: string;
|
|
230
|
-
|
|
233
|
+
locked: boolean;
|
|
231
234
|
fields: {
|
|
232
235
|
value: string;
|
|
233
236
|
name: string;
|
|
@@ -251,10 +254,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
251
254
|
noindex?: boolean | null | undefined;
|
|
252
255
|
suspended?: boolean | undefined;
|
|
253
256
|
limited?: boolean | undefined;
|
|
254
|
-
} | null;
|
|
255
|
-
noindex?: boolean | null | undefined;
|
|
256
|
-
suspended?: boolean | undefined;
|
|
257
|
-
limited?: boolean | undefined;
|
|
257
|
+
} | null | undefined;
|
|
258
258
|
}, {
|
|
259
259
|
id: string;
|
|
260
260
|
url: string;
|
|
@@ -266,7 +266,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
266
266
|
avatar_static: string;
|
|
267
267
|
header: string;
|
|
268
268
|
header_static: string;
|
|
269
|
-
|
|
269
|
+
locked: boolean;
|
|
270
270
|
fields: {
|
|
271
271
|
value: string;
|
|
272
272
|
name: string;
|
|
@@ -287,7 +287,10 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
287
287
|
statuses_count: number;
|
|
288
288
|
followers_count: number;
|
|
289
289
|
following_count: number;
|
|
290
|
-
|
|
290
|
+
noindex?: boolean | null | undefined;
|
|
291
|
+
suspended?: boolean | undefined;
|
|
292
|
+
limited?: boolean | undefined;
|
|
293
|
+
moved?: {
|
|
291
294
|
id: string;
|
|
292
295
|
url: string;
|
|
293
296
|
username: string;
|
|
@@ -298,7 +301,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
298
301
|
avatar_static: string;
|
|
299
302
|
header: string;
|
|
300
303
|
header_static: string;
|
|
301
|
-
|
|
304
|
+
locked: boolean;
|
|
302
305
|
fields: {
|
|
303
306
|
value: string;
|
|
304
307
|
name: string;
|
|
@@ -322,10 +325,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
322
325
|
noindex?: boolean | null | undefined;
|
|
323
326
|
suspended?: boolean | undefined;
|
|
324
327
|
limited?: boolean | undefined;
|
|
325
|
-
} | null;
|
|
326
|
-
noindex?: boolean | null | undefined;
|
|
327
|
-
suspended?: boolean | undefined;
|
|
328
|
-
limited?: boolean | undefined;
|
|
328
|
+
} | null | undefined;
|
|
329
329
|
}>;
|
|
330
330
|
content: z.ZodString;
|
|
331
331
|
visibility: z.ZodEnum<["public", "unlist", "private", "direct"]>;
|
|
@@ -1199,7 +1199,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
1199
1199
|
avatar_static: string;
|
|
1200
1200
|
header: string;
|
|
1201
1201
|
header_static: string;
|
|
1202
|
-
|
|
1202
|
+
locked: boolean;
|
|
1203
1203
|
fields: {
|
|
1204
1204
|
value: string;
|
|
1205
1205
|
name: string;
|
|
@@ -1220,7 +1220,10 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
1220
1220
|
statuses_count: number;
|
|
1221
1221
|
followers_count: number;
|
|
1222
1222
|
following_count: number;
|
|
1223
|
-
|
|
1223
|
+
noindex?: boolean | null | undefined;
|
|
1224
|
+
suspended?: boolean | undefined;
|
|
1225
|
+
limited?: boolean | undefined;
|
|
1226
|
+
moved?: {
|
|
1224
1227
|
id: string;
|
|
1225
1228
|
url: string;
|
|
1226
1229
|
username: string;
|
|
@@ -1231,7 +1234,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
1231
1234
|
avatar_static: string;
|
|
1232
1235
|
header: string;
|
|
1233
1236
|
header_static: string;
|
|
1234
|
-
|
|
1237
|
+
locked: boolean;
|
|
1235
1238
|
fields: {
|
|
1236
1239
|
value: string;
|
|
1237
1240
|
name: string;
|
|
@@ -1255,10 +1258,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
1255
1258
|
noindex?: boolean | null | undefined;
|
|
1256
1259
|
suspended?: boolean | undefined;
|
|
1257
1260
|
limited?: boolean | undefined;
|
|
1258
|
-
} | null;
|
|
1259
|
-
noindex?: boolean | null | undefined;
|
|
1260
|
-
suspended?: boolean | undefined;
|
|
1261
|
-
limited?: boolean | undefined;
|
|
1261
|
+
} | null | undefined;
|
|
1262
1262
|
};
|
|
1263
1263
|
uri: string;
|
|
1264
1264
|
visibility: "public" | "unlist" | "private" | "direct";
|
|
@@ -1478,7 +1478,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
1478
1478
|
avatar_static: string;
|
|
1479
1479
|
header: string;
|
|
1480
1480
|
header_static: string;
|
|
1481
|
-
|
|
1481
|
+
locked: boolean;
|
|
1482
1482
|
fields: {
|
|
1483
1483
|
value: string;
|
|
1484
1484
|
name: string;
|
|
@@ -1499,7 +1499,10 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
1499
1499
|
statuses_count: number;
|
|
1500
1500
|
followers_count: number;
|
|
1501
1501
|
following_count: number;
|
|
1502
|
-
|
|
1502
|
+
noindex?: boolean | null | undefined;
|
|
1503
|
+
suspended?: boolean | undefined;
|
|
1504
|
+
limited?: boolean | undefined;
|
|
1505
|
+
moved?: {
|
|
1503
1506
|
id: string;
|
|
1504
1507
|
url: string;
|
|
1505
1508
|
username: string;
|
|
@@ -1510,7 +1513,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
1510
1513
|
avatar_static: string;
|
|
1511
1514
|
header: string;
|
|
1512
1515
|
header_static: string;
|
|
1513
|
-
|
|
1516
|
+
locked: boolean;
|
|
1514
1517
|
fields: {
|
|
1515
1518
|
value: string;
|
|
1516
1519
|
name: string;
|
|
@@ -1534,10 +1537,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
1534
1537
|
noindex?: boolean | null | undefined;
|
|
1535
1538
|
suspended?: boolean | undefined;
|
|
1536
1539
|
limited?: boolean | undefined;
|
|
1537
|
-
} | null;
|
|
1538
|
-
noindex?: boolean | null | undefined;
|
|
1539
|
-
suspended?: boolean | undefined;
|
|
1540
|
-
limited?: boolean | undefined;
|
|
1540
|
+
} | null | undefined;
|
|
1541
1541
|
};
|
|
1542
1542
|
uri: string;
|
|
1543
1543
|
visibility: "public" | "unlist" | "private" | "direct";
|