@llun/activities.schema 0.2.16 → 0.2.18
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/collection.js +5 -5
- package/dist/cjs/index.js +1 -0
- package/dist/esm/collection.js +2 -2
- package/dist/esm/index.js +1 -0
- package/dist/types/collection.d.ts +56 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/collection.ts +4 -2
- package/src/index.ts +1 -0
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/dist/cjs/collection.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Collection = void 0;
|
|
3
|
+
exports.Collection = exports.CollectionWithItems = exports.CollectionWithFirstPage = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
5
|
+
exports.CollectionWithFirstPage = zod_1.z.object({
|
|
6
6
|
id: zod_1.z.string(),
|
|
7
7
|
type: zod_1.z.literal("Collection"),
|
|
8
8
|
first: zod_1.z.object({
|
|
@@ -12,13 +12,13 @@ const CollectionWithFirstPage = zod_1.z.object({
|
|
|
12
12
|
items: zod_1.z.array(zod_1.z.any()),
|
|
13
13
|
}),
|
|
14
14
|
});
|
|
15
|
-
|
|
15
|
+
exports.CollectionWithItems = zod_1.z.object({
|
|
16
16
|
id: zod_1.z.string(),
|
|
17
17
|
type: zod_1.z.literal("Collection"),
|
|
18
18
|
totalItems: zod_1.z.number(),
|
|
19
19
|
items: zod_1.z.array(zod_1.z.any()),
|
|
20
20
|
});
|
|
21
21
|
exports.Collection = zod_1.z.union([
|
|
22
|
-
CollectionWithFirstPage,
|
|
23
|
-
CollectionWithItems,
|
|
22
|
+
exports.CollectionWithFirstPage,
|
|
23
|
+
exports.CollectionWithItems,
|
|
24
24
|
]);
|
package/dist/cjs/index.js
CHANGED
|
@@ -19,6 +19,7 @@ __exportStar(require("./accept.js"), exports);
|
|
|
19
19
|
__exportStar(require("./follow.js"), exports);
|
|
20
20
|
__exportStar(require("./like.js"), exports);
|
|
21
21
|
__exportStar(require("./note.js"), exports);
|
|
22
|
+
__exportStar(require("./collection.js"), exports);
|
|
22
23
|
__exportStar(require("./question.js"), exports);
|
|
23
24
|
__exportStar(require("./reject.js"), exports);
|
|
24
25
|
__exportStar(require("./undo.js"), exports);
|
package/dist/esm/collection.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
const CollectionWithFirstPage = z.object({
|
|
2
|
+
export const CollectionWithFirstPage = z.object({
|
|
3
3
|
id: z.string(),
|
|
4
4
|
type: z.literal("Collection"),
|
|
5
5
|
first: z.object({
|
|
@@ -9,7 +9,7 @@ const CollectionWithFirstPage = z.object({
|
|
|
9
9
|
items: z.array(z.any()),
|
|
10
10
|
}),
|
|
11
11
|
});
|
|
12
|
-
const CollectionWithItems = z.object({
|
|
12
|
+
export const CollectionWithItems = z.object({
|
|
13
13
|
id: z.string(),
|
|
14
14
|
type: z.literal("Collection"),
|
|
15
15
|
totalItems: z.number(),
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,60 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const CollectionWithFirstPage: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"Collection">;
|
|
5
|
+
first: z.ZodObject<{
|
|
6
|
+
type: z.ZodLiteral<"CollectionPage">;
|
|
7
|
+
next: z.ZodString;
|
|
8
|
+
partOf: z.ZodString;
|
|
9
|
+
items: z.ZodArray<z.ZodAny, "many">;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
type: "CollectionPage";
|
|
12
|
+
next: string;
|
|
13
|
+
partOf: string;
|
|
14
|
+
items: any[];
|
|
15
|
+
}, {
|
|
16
|
+
type: "CollectionPage";
|
|
17
|
+
next: string;
|
|
18
|
+
partOf: string;
|
|
19
|
+
items: any[];
|
|
20
|
+
}>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
id: string;
|
|
23
|
+
type: "Collection";
|
|
24
|
+
first: {
|
|
25
|
+
type: "CollectionPage";
|
|
26
|
+
next: string;
|
|
27
|
+
partOf: string;
|
|
28
|
+
items: any[];
|
|
29
|
+
};
|
|
30
|
+
}, {
|
|
31
|
+
id: string;
|
|
32
|
+
type: "Collection";
|
|
33
|
+
first: {
|
|
34
|
+
type: "CollectionPage";
|
|
35
|
+
next: string;
|
|
36
|
+
partOf: string;
|
|
37
|
+
items: any[];
|
|
38
|
+
};
|
|
39
|
+
}>;
|
|
40
|
+
export type CollectionWithFirstPage = z.infer<typeof CollectionWithFirstPage>;
|
|
41
|
+
export declare const CollectionWithItems: z.ZodObject<{
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
type: z.ZodLiteral<"Collection">;
|
|
44
|
+
totalItems: z.ZodNumber;
|
|
45
|
+
items: z.ZodArray<z.ZodAny, "many">;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
id: string;
|
|
48
|
+
type: "Collection";
|
|
49
|
+
items: any[];
|
|
50
|
+
totalItems: number;
|
|
51
|
+
}, {
|
|
52
|
+
id: string;
|
|
53
|
+
type: "Collection";
|
|
54
|
+
items: any[];
|
|
55
|
+
totalItems: number;
|
|
56
|
+
}>;
|
|
57
|
+
export type CollectionWithItems = z.infer<typeof CollectionWithItems>;
|
|
2
58
|
export declare const Collection: z.ZodUnion<[z.ZodObject<{
|
|
3
59
|
id: z.ZodString;
|
|
4
60
|
type: z.ZodLiteral<"Collection">;
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
package/src/collection.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
-
const CollectionWithFirstPage = z.object({
|
|
3
|
+
export const CollectionWithFirstPage = z.object({
|
|
4
4
|
id: z.string(),
|
|
5
5
|
type: z.literal("Collection"),
|
|
6
6
|
first: z.object({
|
|
@@ -10,13 +10,15 @@ const CollectionWithFirstPage = z.object({
|
|
|
10
10
|
items: z.array(z.any()),
|
|
11
11
|
}),
|
|
12
12
|
});
|
|
13
|
+
export type CollectionWithFirstPage = z.infer<typeof CollectionWithFirstPage>;
|
|
13
14
|
|
|
14
|
-
const CollectionWithItems = z.object({
|
|
15
|
+
export const CollectionWithItems = z.object({
|
|
15
16
|
id: z.string(),
|
|
16
17
|
type: z.literal("Collection"),
|
|
17
18
|
totalItems: z.number(),
|
|
18
19
|
items: z.array(z.any()),
|
|
19
20
|
});
|
|
21
|
+
export type CollectionWithItems = z.infer<typeof CollectionWithItems>;
|
|
20
22
|
|
|
21
23
|
export const Collection = z.union([
|
|
22
24
|
CollectionWithFirstPage,
|
package/src/index.ts
CHANGED