@llun/activities.schema 0.2.22 → 0.2.24

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.
@@ -25,7 +25,7 @@ exports.BaseMediaAttachment = zod_1.z.object({
25
25
  description: "Alternate text that describes what is in the media attachment, to be used for the visually impaired or when media attachments do not load",
26
26
  })
27
27
  .nullable(),
28
- bluehash: zod_1.z
28
+ blurhash: zod_1.z
29
29
  .string({
30
30
  description: "hash computed by the [BlurHash algorithm](https://github.com/woltapp/blurhash), for generating colorful preview thumbnails when media has not been downloaded yet.",
31
31
  })
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MediaAttachment = void 0;
3
+ exports.MediaAttachment = exports.MediaTypes = void 0;
4
4
  // This schema is base on https://docs.joinmastodon.org/entities/MediaAttachment/
5
5
  const zod_1 = require("zod");
6
6
  const gifv_js_1 = require("./gifv.js");
@@ -8,4 +8,11 @@ const image_js_1 = require("./image.js");
8
8
  const video_js_1 = require("./video.js");
9
9
  const audio_js_1 = require("./audio.js");
10
10
  const unknown_js_1 = require("./unknown.js");
11
+ exports.MediaTypes = {
12
+ Gifv: gifv_js_1.Gifv,
13
+ Image: image_js_1.Image,
14
+ Video: video_js_1.Video,
15
+ Audio: audio_js_1.Audio,
16
+ Unknown: unknown_js_1.Unknown,
17
+ };
11
18
  exports.MediaAttachment = zod_1.z.union([image_js_1.Image, gifv_js_1.Gifv, video_js_1.Video, audio_js_1.Audio, unknown_js_1.Unknown]);
@@ -22,7 +22,7 @@ export const BaseMediaAttachment = z.object({
22
22
  description: "Alternate text that describes what is in the media attachment, to be used for the visually impaired or when media attachments do not load",
23
23
  })
24
24
  .nullable(),
25
- bluehash: z
25
+ blurhash: z
26
26
  .string({
27
27
  description: "hash computed by the [BlurHash algorithm](https://github.com/woltapp/blurhash), for generating colorful preview thumbnails when media has not been downloaded yet.",
28
28
  })
@@ -5,4 +5,11 @@ import { Image } from "./image.js";
5
5
  import { Video } from "./video.js";
6
6
  import { Audio } from "./audio.js";
7
7
  import { Unknown } from "./unknown.js";
8
+ export const MediaTypes = {
9
+ Gifv,
10
+ Image,
11
+ Video,
12
+ Audio,
13
+ Unknown,
14
+ };
8
15
  export const MediaAttachment = z.union([Image, Gifv, Video, Audio, Unknown]);
@@ -5,7 +5,7 @@ export declare const Audio: z.ZodObject<z.objectUtil.extendShape<{
5
5
  preview_url: z.ZodNullable<z.ZodString>;
6
6
  remote_url: z.ZodNullable<z.ZodString>;
7
7
  description: z.ZodNullable<z.ZodString>;
8
- bluehash: z.ZodNullable<z.ZodString>;
8
+ blurhash: z.ZodNullable<z.ZodString>;
9
9
  }, {
10
10
  type: z.ZodLiteral<"audio">;
11
11
  meta: z.ZodObject<{
@@ -50,9 +50,9 @@ export declare const Audio: z.ZodObject<z.objectUtil.extendShape<{
50
50
  type: "audio";
51
51
  description: string | null;
52
52
  url: string;
53
+ blurhash: string | null;
53
54
  preview_url: string | null;
54
55
  remote_url: string | null;
55
- bluehash: string | null;
56
56
  meta: {
57
57
  length: string;
58
58
  duration: number;
@@ -69,9 +69,9 @@ export declare const Audio: z.ZodObject<z.objectUtil.extendShape<{
69
69
  type: "audio";
70
70
  description: string | null;
71
71
  url: string;
72
+ blurhash: string | null;
72
73
  preview_url: string | null;
73
74
  remote_url: string | null;
74
- bluehash: string | null;
75
75
  meta: {
76
76
  length: string;
77
77
  duration: number;
@@ -5,20 +5,20 @@ export declare const BaseMediaAttachment: z.ZodObject<{
5
5
  preview_url: z.ZodNullable<z.ZodString>;
6
6
  remote_url: z.ZodNullable<z.ZodString>;
7
7
  description: z.ZodNullable<z.ZodString>;
8
- bluehash: z.ZodNullable<z.ZodString>;
8
+ blurhash: z.ZodNullable<z.ZodString>;
9
9
  }, "strip", z.ZodTypeAny, {
10
10
  id: string;
11
11
  description: string | null;
12
12
  url: string;
13
+ blurhash: string | null;
13
14
  preview_url: string | null;
14
15
  remote_url: string | null;
15
- bluehash: string | null;
16
16
  }, {
17
17
  id: string;
18
18
  description: string | null;
19
19
  url: string;
20
+ blurhash: string | null;
20
21
  preview_url: string | null;
21
22
  remote_url: string | null;
22
- bluehash: string | null;
23
23
  }>;
24
24
  export type BaseMediaAttachment = z.infer<typeof BaseMediaAttachment>;
@@ -5,7 +5,7 @@ export declare const Gifv: z.ZodObject<z.objectUtil.extendShape<{
5
5
  preview_url: z.ZodNullable<z.ZodString>;
6
6
  remote_url: z.ZodNullable<z.ZodString>;
7
7
  description: z.ZodNullable<z.ZodString>;
8
- bluehash: z.ZodNullable<z.ZodString>;
8
+ blurhash: z.ZodNullable<z.ZodString>;
9
9
  }, {
10
10
  type: z.ZodLiteral<"gifv">;
11
11
  meta: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -99,9 +99,9 @@ export declare const Gifv: z.ZodObject<z.objectUtil.extendShape<{
99
99
  type: "gifv";
100
100
  description: string | null;
101
101
  url: string;
102
+ blurhash: string | null;
102
103
  preview_url: string | null;
103
104
  remote_url: string | null;
104
- bluehash: string | null;
105
105
  meta?: {
106
106
  width: number;
107
107
  height: number;
@@ -129,9 +129,9 @@ export declare const Gifv: z.ZodObject<z.objectUtil.extendShape<{
129
129
  type: "gifv";
130
130
  description: string | null;
131
131
  url: string;
132
+ blurhash: string | null;
132
133
  preview_url: string | null;
133
134
  remote_url: string | null;
134
- bluehash: string | null;
135
135
  meta?: {
136
136
  width: number;
137
137
  height: number;
@@ -5,7 +5,7 @@ export declare const Image: z.ZodObject<z.objectUtil.extendShape<{
5
5
  preview_url: z.ZodNullable<z.ZodString>;
6
6
  remote_url: z.ZodNullable<z.ZodString>;
7
7
  description: z.ZodNullable<z.ZodString>;
8
- bluehash: z.ZodNullable<z.ZodString>;
8
+ blurhash: z.ZodNullable<z.ZodString>;
9
9
  }, {
10
10
  type: z.ZodLiteral<"image">;
11
11
  meta: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -91,9 +91,9 @@ export declare const Image: z.ZodObject<z.objectUtil.extendShape<{
91
91
  type: "image";
92
92
  description: string | null;
93
93
  url: string;
94
+ blurhash: string | null;
94
95
  preview_url: string | null;
95
96
  remote_url: string | null;
96
- bluehash: string | null;
97
97
  meta?: {
98
98
  original: {
99
99
  width: number;
@@ -117,9 +117,9 @@ export declare const Image: z.ZodObject<z.objectUtil.extendShape<{
117
117
  type: "image";
118
118
  description: string | null;
119
119
  url: string;
120
+ blurhash: string | null;
120
121
  preview_url: string | null;
121
122
  remote_url: string | null;
122
- bluehash: string | null;
123
123
  meta?: {
124
124
  original: {
125
125
  width: number;