@llun/activities.schema 0.2.29 → 0.2.30

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.
Binary file
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Relationship = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Represents the relationship between accounts in Mastodon, such as following, blocking, muting, etc.
7
+ * @see https://docs.joinmastodon.org/entities/Relationship/
8
+ */
9
+ exports.Relationship = zod_1.z.object({
10
+ // The account ID (cast from integer but not guaranteed to be a number)
11
+ id: zod_1.z.string(),
12
+ // Are you following this user?
13
+ following: zod_1.z.boolean(),
14
+ // Are you receiving this user's boosts in your home timeline?
15
+ showing_reblogs: zod_1.z.boolean(),
16
+ // Have you enabled notifications for this user?
17
+ notifying: zod_1.z.boolean(),
18
+ // Which languages are you following from this user?
19
+ languages: zod_1.z.array(zod_1.z.string()),
20
+ // Are you followed by this user?
21
+ followed_by: zod_1.z.boolean(),
22
+ // Are you blocking this user?
23
+ blocking: zod_1.z.boolean(),
24
+ // Is this user blocking you?
25
+ blocked_by: zod_1.z.boolean(),
26
+ // Are you muting this user?
27
+ muting: zod_1.z.boolean(),
28
+ // Are you muting notifications from this user?
29
+ muting_notifications: zod_1.z.boolean(),
30
+ // Do you have a pending follow request for this user?
31
+ requested: zod_1.z.boolean(),
32
+ // Has this user requested to follow you?
33
+ requested_by: zod_1.z.boolean(),
34
+ // Are you blocking this user's domain?
35
+ domain_blocking: zod_1.z.boolean(),
36
+ // Are you featuring this user on your profile?
37
+ endorsed: zod_1.z.boolean(),
38
+ // This user's profile bio
39
+ note: zod_1.z.string(),
40
+ });
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./account.js"), exports);
18
18
  __exportStar(require("./account/field.js"), exports);
19
19
  __exportStar(require("./account/source.js"), exports);
20
+ __exportStar(require("./account/relationship.js"), exports);
20
21
  __exportStar(require("./customEmoji.js"), exports);
21
22
  __exportStar(require("./filterResult.js"), exports);
22
23
  __exportStar(require("./previewCard.js"), exports);
@@ -0,0 +1,37 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Represents the relationship between accounts in Mastodon, such as following, blocking, muting, etc.
4
+ * @see https://docs.joinmastodon.org/entities/Relationship/
5
+ */
6
+ export const Relationship = z.object({
7
+ // The account ID (cast from integer but not guaranteed to be a number)
8
+ id: z.string(),
9
+ // Are you following this user?
10
+ following: z.boolean(),
11
+ // Are you receiving this user's boosts in your home timeline?
12
+ showing_reblogs: z.boolean(),
13
+ // Have you enabled notifications for this user?
14
+ notifying: z.boolean(),
15
+ // Which languages are you following from this user?
16
+ languages: z.array(z.string()),
17
+ // Are you followed by this user?
18
+ followed_by: z.boolean(),
19
+ // Are you blocking this user?
20
+ blocking: z.boolean(),
21
+ // Is this user blocking you?
22
+ blocked_by: z.boolean(),
23
+ // Are you muting this user?
24
+ muting: z.boolean(),
25
+ // Are you muting notifications from this user?
26
+ muting_notifications: z.boolean(),
27
+ // Do you have a pending follow request for this user?
28
+ requested: z.boolean(),
29
+ // Has this user requested to follow you?
30
+ requested_by: z.boolean(),
31
+ // Are you blocking this user's domain?
32
+ domain_blocking: z.boolean(),
33
+ // Are you featuring this user on your profile?
34
+ endorsed: z.boolean(),
35
+ // This user's profile bio
36
+ note: z.string(),
37
+ });
@@ -1,6 +1,7 @@
1
1
  export * from "./account.js";
2
2
  export * from "./account/field.js";
3
3
  export * from "./account/source.js";
4
+ export * from "./account/relationship.js";
4
5
  export * from "./customEmoji.js";
5
6
  export * from "./filterResult.js";
6
7
  export * from "./previewCard.js";
@@ -0,0 +1,55 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Represents the relationship between accounts in Mastodon, such as following, blocking, muting, etc.
4
+ * @see https://docs.joinmastodon.org/entities/Relationship/
5
+ */
6
+ export declare const Relationship: z.ZodObject<{
7
+ id: z.ZodString;
8
+ following: z.ZodBoolean;
9
+ showing_reblogs: z.ZodBoolean;
10
+ notifying: z.ZodBoolean;
11
+ languages: z.ZodArray<z.ZodString, "many">;
12
+ followed_by: z.ZodBoolean;
13
+ blocking: z.ZodBoolean;
14
+ blocked_by: z.ZodBoolean;
15
+ muting: z.ZodBoolean;
16
+ muting_notifications: z.ZodBoolean;
17
+ requested: z.ZodBoolean;
18
+ requested_by: z.ZodBoolean;
19
+ domain_blocking: z.ZodBoolean;
20
+ endorsed: z.ZodBoolean;
21
+ note: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ id: string;
24
+ following: boolean;
25
+ note: string;
26
+ showing_reblogs: boolean;
27
+ notifying: boolean;
28
+ languages: string[];
29
+ followed_by: boolean;
30
+ blocking: boolean;
31
+ blocked_by: boolean;
32
+ muting: boolean;
33
+ muting_notifications: boolean;
34
+ requested: boolean;
35
+ requested_by: boolean;
36
+ domain_blocking: boolean;
37
+ endorsed: boolean;
38
+ }, {
39
+ id: string;
40
+ following: boolean;
41
+ note: string;
42
+ showing_reblogs: boolean;
43
+ notifying: boolean;
44
+ languages: string[];
45
+ followed_by: boolean;
46
+ blocking: boolean;
47
+ blocked_by: boolean;
48
+ muting: boolean;
49
+ muting_notifications: boolean;
50
+ requested: boolean;
51
+ requested_by: boolean;
52
+ domain_blocking: boolean;
53
+ endorsed: boolean;
54
+ }>;
55
+ export type Relationship = z.infer<typeof Relationship>;
@@ -1,6 +1,7 @@
1
1
  export * from "./account.js";
2
2
  export * from "./account/field.js";
3
3
  export * from "./account/source.js";
4
+ export * from "./account/relationship.js";
4
5
  export * from "./customEmoji.js";
5
6
  export * from "./filterResult.js";
6
7
  export * from "./previewCard.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llun/activities.schema",
3
- "version": "0.2.29",
3
+ "version": "0.2.30",
4
4
  "description": "Validate ActivityPub and Mastodon with Zod",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -16,7 +16,7 @@
16
16
  "zod": "^3.24.2"
17
17
  },
18
18
  "devDependencies": {
19
- "typescript": "^5.7.3"
19
+ "typescript": "^5.8.2"
20
20
  },
21
21
  "packageManager": "yarn@4.6.0"
22
22
  }
@@ -0,0 +1,54 @@
1
+ import { z } from "zod";
2
+
3
+ /**
4
+ * Represents the relationship between accounts in Mastodon, such as following, blocking, muting, etc.
5
+ * @see https://docs.joinmastodon.org/entities/Relationship/
6
+ */
7
+ export const Relationship = z.object({
8
+ // The account ID (cast from integer but not guaranteed to be a number)
9
+ id: z.string(),
10
+
11
+ // Are you following this user?
12
+ following: z.boolean(),
13
+
14
+ // Are you receiving this user's boosts in your home timeline?
15
+ showing_reblogs: z.boolean(),
16
+
17
+ // Have you enabled notifications for this user?
18
+ notifying: z.boolean(),
19
+
20
+ // Which languages are you following from this user?
21
+ languages: z.array(z.string()),
22
+
23
+ // Are you followed by this user?
24
+ followed_by: z.boolean(),
25
+
26
+ // Are you blocking this user?
27
+ blocking: z.boolean(),
28
+
29
+ // Is this user blocking you?
30
+ blocked_by: z.boolean(),
31
+
32
+ // Are you muting this user?
33
+ muting: z.boolean(),
34
+
35
+ // Are you muting notifications from this user?
36
+ muting_notifications: z.boolean(),
37
+
38
+ // Do you have a pending follow request for this user?
39
+ requested: z.boolean(),
40
+
41
+ // Has this user requested to follow you?
42
+ requested_by: z.boolean(),
43
+
44
+ // Are you blocking this user's domain?
45
+ domain_blocking: z.boolean(),
46
+
47
+ // Are you featuring this user on your profile?
48
+ endorsed: z.boolean(),
49
+
50
+ // This user's profile bio
51
+ note: z.string(),
52
+ });
53
+
54
+ export type Relationship = z.infer<typeof Relationship>;
@@ -1,6 +1,7 @@
1
1
  export * from "./account.js";
2
2
  export * from "./account/field.js";
3
3
  export * from "./account/source.js";
4
+ export * from "./account/relationship.js";
4
5
  export * from "./customEmoji.js";
5
6
  export * from "./filterResult.js";
6
7
  export * from "./previewCard.js";