@llun/activities.schema 0.3.0 → 0.4.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/cjs/mastodon/visibility.js +1 -1
- package/dist/esm/mastodon/visibility.js +1 -1
- package/dist/types/mastodon/account/source.d.ts +1 -1
- package/dist/types/mastodon/account.d.ts +2 -2
- package/dist/types/mastodon/status/base.d.ts +3 -3
- package/dist/types/mastodon/status/index.d.ts +6 -6
- package/dist/types/mastodon/visibility.d.ts +1 -1
- package/package.json +4 -4
- package/src/mastodon/visibility.ts +1 -1
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
|
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Visibility = void 0;
|
|
4
4
|
// This schema is base on https://docs.joinmastodon.org/entities/Status/#visibility
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
exports.Visibility = zod_1.z.enum(["public", "
|
|
6
|
+
exports.Visibility = zod_1.z.enum(["public", "unlisted", "private", "direct"]);
|
|
@@ -20,7 +20,7 @@ export declare const Account: z.ZodObject<{
|
|
|
20
20
|
}, z.core.$strip>>;
|
|
21
21
|
privacy: z.ZodEnum<{
|
|
22
22
|
public: "public";
|
|
23
|
-
|
|
23
|
+
unlisted: "unlisted";
|
|
24
24
|
private: "private";
|
|
25
25
|
direct: "direct";
|
|
26
26
|
}>;
|
|
@@ -72,7 +72,7 @@ export declare const Account: z.ZodObject<{
|
|
|
72
72
|
}, z.core.$strip>>;
|
|
73
73
|
privacy: z.ZodEnum<{
|
|
74
74
|
public: "public";
|
|
75
|
-
|
|
75
|
+
unlisted: "unlisted";
|
|
76
76
|
private: "private";
|
|
77
77
|
direct: "direct";
|
|
78
78
|
}>;
|
|
@@ -23,7 +23,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
23
23
|
}, z.core.$strip>>;
|
|
24
24
|
privacy: z.ZodEnum<{
|
|
25
25
|
public: "public";
|
|
26
|
-
|
|
26
|
+
unlisted: "unlisted";
|
|
27
27
|
private: "private";
|
|
28
28
|
direct: "direct";
|
|
29
29
|
}>;
|
|
@@ -75,7 +75,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
75
75
|
}, z.core.$strip>>;
|
|
76
76
|
privacy: z.ZodEnum<{
|
|
77
77
|
public: "public";
|
|
78
|
-
|
|
78
|
+
unlisted: "unlisted";
|
|
79
79
|
private: "private";
|
|
80
80
|
direct: "direct";
|
|
81
81
|
}>;
|
|
@@ -111,7 +111,7 @@ export declare const BaseStatus: z.ZodObject<{
|
|
|
111
111
|
content: z.ZodString;
|
|
112
112
|
visibility: z.ZodEnum<{
|
|
113
113
|
public: "public";
|
|
114
|
-
|
|
114
|
+
unlisted: "unlisted";
|
|
115
115
|
private: "private";
|
|
116
116
|
direct: "direct";
|
|
117
117
|
}>;
|
|
@@ -23,7 +23,7 @@ export declare const Status: z.ZodObject<{
|
|
|
23
23
|
}, z.core.$strip>>;
|
|
24
24
|
privacy: z.ZodEnum<{
|
|
25
25
|
public: "public";
|
|
26
|
-
|
|
26
|
+
unlisted: "unlisted";
|
|
27
27
|
private: "private";
|
|
28
28
|
direct: "direct";
|
|
29
29
|
}>;
|
|
@@ -75,7 +75,7 @@ export declare const Status: z.ZodObject<{
|
|
|
75
75
|
}, z.core.$strip>>;
|
|
76
76
|
privacy: z.ZodEnum<{
|
|
77
77
|
public: "public";
|
|
78
|
-
|
|
78
|
+
unlisted: "unlisted";
|
|
79
79
|
private: "private";
|
|
80
80
|
direct: "direct";
|
|
81
81
|
}>;
|
|
@@ -111,7 +111,7 @@ export declare const Status: z.ZodObject<{
|
|
|
111
111
|
content: z.ZodString;
|
|
112
112
|
visibility: z.ZodEnum<{
|
|
113
113
|
public: "public";
|
|
114
|
-
|
|
114
|
+
unlisted: "unlisted";
|
|
115
115
|
private: "private";
|
|
116
116
|
direct: "direct";
|
|
117
117
|
}>;
|
|
@@ -365,7 +365,7 @@ export declare const Status: z.ZodObject<{
|
|
|
365
365
|
}, z.core.$strip>>;
|
|
366
366
|
privacy: z.ZodEnum<{
|
|
367
367
|
public: "public";
|
|
368
|
-
|
|
368
|
+
unlisted: "unlisted";
|
|
369
369
|
private: "private";
|
|
370
370
|
direct: "direct";
|
|
371
371
|
}>;
|
|
@@ -417,7 +417,7 @@ export declare const Status: z.ZodObject<{
|
|
|
417
417
|
}, z.core.$strip>>;
|
|
418
418
|
privacy: z.ZodEnum<{
|
|
419
419
|
public: "public";
|
|
420
|
-
|
|
420
|
+
unlisted: "unlisted";
|
|
421
421
|
private: "private";
|
|
422
422
|
direct: "direct";
|
|
423
423
|
}>;
|
|
@@ -453,7 +453,7 @@ export declare const Status: z.ZodObject<{
|
|
|
453
453
|
content: z.ZodString;
|
|
454
454
|
visibility: z.ZodEnum<{
|
|
455
455
|
public: "public";
|
|
456
|
-
|
|
456
|
+
unlisted: "unlisted";
|
|
457
457
|
private: "private";
|
|
458
458
|
direct: "direct";
|
|
459
459
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llun/activities.schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Validate ActivityPub and Mastodon with Zod",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"author": "Maythee Anegboonlap <null@llun.dev>",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"zod": "^4.
|
|
16
|
+
"zod": "^4.2.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"typescript": "^5.
|
|
19
|
+
"typescript": "^5.9.3"
|
|
20
20
|
},
|
|
21
|
-
"packageManager": "yarn@4.
|
|
21
|
+
"packageManager": "yarn@4.12.0"
|
|
22
22
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This schema is base on https://docs.joinmastodon.org/entities/Status/#visibility
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
|
-
export const Visibility = z.enum(["public", "
|
|
4
|
+
export const Visibility = z.enum(["public", "unlisted", "private", "direct"]);
|
|
5
5
|
export type Visibility = z.infer<typeof Visibility>;
|