@llun/activities.schema 0.2.12 → 0.2.14

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
package/dist/cjs/index.js CHANGED
@@ -23,6 +23,7 @@ __exportStar(require("./question.js"), exports);
23
23
  __exportStar(require("./reject.js"), exports);
24
24
  __exportStar(require("./undo.js"), exports);
25
25
  __exportStar(require("./announce.js"), exports);
26
+ __exportStar(require("./tombstone.js"), exports);
26
27
  __exportStar(require("./note/emoji.js"), exports);
27
28
  __exportStar(require("./note/mention.js"), exports);
28
29
  __exportStar(require("./note/hashtag.js"), exports);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tombstone = exports.ENTITY_TYPE_TOMBSTONE = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ENTITY_TYPE_TOMBSTONE = "Tombstone";
6
+ exports.Tombstone = zod_1.z.object({
7
+ type: zod_1.z.literal(exports.ENTITY_TYPE_TOMBSTONE),
8
+ id: zod_1.z.string(),
9
+ });
package/dist/esm/index.js CHANGED
@@ -6,6 +6,7 @@ export * from "./question.js";
6
6
  export * from "./reject.js";
7
7
  export * from "./undo.js";
8
8
  export * from "./announce.js";
9
+ export * from "./tombstone.js";
9
10
  export * from "./note/emoji.js";
10
11
  export * from "./note/mention.js";
11
12
  export * from "./note/hashtag.js";
@@ -0,0 +1,6 @@
1
+ import { z } from "zod";
2
+ export const ENTITY_TYPE_TOMBSTONE = "Tombstone";
3
+ export const Tombstone = z.object({
4
+ type: z.literal(ENTITY_TYPE_TOMBSTONE),
5
+ id: z.string(),
6
+ });
@@ -6,6 +6,7 @@ export * from "./question.js";
6
6
  export * from "./reject.js";
7
7
  export * from "./undo.js";
8
8
  export * from "./announce.js";
9
+ export * from "./tombstone.js";
9
10
  export * from "./note/emoji.js";
10
11
  export * from "./note/mention.js";
11
12
  export * from "./note/hashtag.js";
@@ -0,0 +1,13 @@
1
+ import { z } from "zod";
2
+ export declare const ENTITY_TYPE_TOMBSTONE = "Tombstone";
3
+ export declare const Tombstone: z.ZodObject<{
4
+ type: z.ZodLiteral<"Tombstone">;
5
+ id: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ id: string;
8
+ type: "Tombstone";
9
+ }, {
10
+ id: string;
11
+ type: "Tombstone";
12
+ }>;
13
+ export type Tombstone = z.infer<typeof Tombstone>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llun/activities.schema",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
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": "^3.23.8"
16
+ "zod": "^3.24.1"
17
17
  },
18
18
  "devDependencies": {
19
- "typescript": "^5.5.4"
19
+ "typescript": "^5.7.2"
20
20
  },
21
- "packageManager": "yarn@4.4.1"
21
+ "packageManager": "yarn@4.5.3"
22
22
  }
package/src/index.ts CHANGED
@@ -6,6 +6,7 @@ export * from "./question.js";
6
6
  export * from "./reject.js";
7
7
  export * from "./undo.js";
8
8
  export * from "./announce.js";
9
+ export * from "./tombstone.js";
9
10
 
10
11
  export * from "./note/emoji.js";
11
12
  export * from "./note/mention.js";
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+
3
+ export const ENTITY_TYPE_TOMBSTONE = "Tombstone";
4
+ export const Tombstone = z.object({
5
+ type: z.literal(ENTITY_TYPE_TOMBSTONE),
6
+ id: z.string(),
7
+ });
8
+ export type Tombstone = z.infer<typeof Tombstone>;