@farcaster/frame-core 0.0.0-canary-20250630152811 → 0.0.0-canary-20250630194123
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/dist/schemas/embeds.d.ts +26 -197
- package/dist/schemas/embeds.js +9 -9
- package/dist/schemas/events.d.ts +18 -106
- package/dist/schemas/events.js +10 -10
- package/dist/schemas/manifest.d.ts +147 -335
- package/dist/schemas/manifest.js +16 -16
- package/dist/schemas/notifications.d.ts +10 -48
- package/dist/schemas/notifications.js +14 -14
- package/dist/schemas/shared.d.ts +7 -23
- package/dist/schemas/shared.js +18 -18
- package/esm/schemas/embeds.d.ts +26 -197
- package/esm/schemas/embeds.js +1 -1
- package/esm/schemas/events.d.ts +18 -106
- package/esm/schemas/events.js +1 -1
- package/esm/schemas/manifest.d.ts +147 -335
- package/esm/schemas/manifest.js +1 -1
- package/esm/schemas/notifications.d.ts +10 -48
- package/esm/schemas/notifications.js +1 -1
- package/esm/schemas/shared.d.ts +7 -23
- package/esm/schemas/shared.js +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/schemas/embeds.ts +1 -1
- package/src/schemas/events.ts +1 -1
- package/src/schemas/manifest.ts +1 -1
- package/src/schemas/notifications.ts +1 -1
- package/src/schemas/shared.ts +1 -1
package/dist/schemas/embeds.d.ts
CHANGED
|
@@ -1,228 +1,57 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
2
|
export declare const actionLaunchFrameSchema: z.ZodObject<{
|
|
3
3
|
type: z.ZodLiteral<"launch_frame">;
|
|
4
4
|
name: z.ZodString;
|
|
5
|
-
url: z.ZodOptional<z.
|
|
6
|
-
splashImageUrl: z.ZodOptional<z.
|
|
5
|
+
url: z.ZodOptional<z.ZodString>;
|
|
6
|
+
splashImageUrl: z.ZodOptional<z.ZodString>;
|
|
7
7
|
splashBackgroundColor: z.ZodOptional<z.ZodString>;
|
|
8
|
-
},
|
|
9
|
-
type: "launch_frame";
|
|
10
|
-
name: string;
|
|
11
|
-
url?: string | undefined;
|
|
12
|
-
splashImageUrl?: string | undefined;
|
|
13
|
-
splashBackgroundColor?: string | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
type: "launch_frame";
|
|
16
|
-
name: string;
|
|
17
|
-
url?: string | undefined;
|
|
18
|
-
splashImageUrl?: string | undefined;
|
|
19
|
-
splashBackgroundColor?: string | undefined;
|
|
20
|
-
}>;
|
|
8
|
+
}, z.core.$strip>;
|
|
21
9
|
export declare const actionViewTokenSchema: z.ZodObject<{
|
|
22
10
|
type: z.ZodLiteral<"view_token">;
|
|
23
11
|
token: z.ZodString;
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
token: string;
|
|
27
|
-
}, {
|
|
28
|
-
type: "view_token";
|
|
29
|
-
token: string;
|
|
30
|
-
}>;
|
|
31
|
-
export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
32
14
|
type: z.ZodLiteral<"launch_frame">;
|
|
33
15
|
name: z.ZodString;
|
|
34
|
-
url: z.ZodOptional<z.
|
|
35
|
-
splashImageUrl: z.ZodOptional<z.
|
|
16
|
+
url: z.ZodOptional<z.ZodString>;
|
|
17
|
+
splashImageUrl: z.ZodOptional<z.ZodString>;
|
|
36
18
|
splashBackgroundColor: z.ZodOptional<z.ZodString>;
|
|
37
|
-
},
|
|
38
|
-
type: "launch_frame";
|
|
39
|
-
name: string;
|
|
40
|
-
url?: string | undefined;
|
|
41
|
-
splashImageUrl?: string | undefined;
|
|
42
|
-
splashBackgroundColor?: string | undefined;
|
|
43
|
-
}, {
|
|
44
|
-
type: "launch_frame";
|
|
45
|
-
name: string;
|
|
46
|
-
url?: string | undefined;
|
|
47
|
-
splashImageUrl?: string | undefined;
|
|
48
|
-
splashBackgroundColor?: string | undefined;
|
|
49
|
-
}>, z.ZodObject<{
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
50
20
|
type: z.ZodLiteral<"view_token">;
|
|
51
21
|
token: z.ZodString;
|
|
52
|
-
},
|
|
53
|
-
type: "view_token";
|
|
54
|
-
token: string;
|
|
55
|
-
}, {
|
|
56
|
-
type: "view_token";
|
|
57
|
-
token: string;
|
|
58
|
-
}>]>;
|
|
22
|
+
}, z.core.$strip>]>;
|
|
59
23
|
export declare const buttonSchema: z.ZodObject<{
|
|
60
24
|
title: z.ZodString;
|
|
61
|
-
action: z.ZodDiscriminatedUnion<
|
|
25
|
+
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
62
26
|
type: z.ZodLiteral<"launch_frame">;
|
|
63
27
|
name: z.ZodString;
|
|
64
|
-
url: z.ZodOptional<z.
|
|
65
|
-
splashImageUrl: z.ZodOptional<z.
|
|
28
|
+
url: z.ZodOptional<z.ZodString>;
|
|
29
|
+
splashImageUrl: z.ZodOptional<z.ZodString>;
|
|
66
30
|
splashBackgroundColor: z.ZodOptional<z.ZodString>;
|
|
67
|
-
},
|
|
68
|
-
type: "launch_frame";
|
|
69
|
-
name: string;
|
|
70
|
-
url?: string | undefined;
|
|
71
|
-
splashImageUrl?: string | undefined;
|
|
72
|
-
splashBackgroundColor?: string | undefined;
|
|
73
|
-
}, {
|
|
74
|
-
type: "launch_frame";
|
|
75
|
-
name: string;
|
|
76
|
-
url?: string | undefined;
|
|
77
|
-
splashImageUrl?: string | undefined;
|
|
78
|
-
splashBackgroundColor?: string | undefined;
|
|
79
|
-
}>, z.ZodObject<{
|
|
31
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
80
32
|
type: z.ZodLiteral<"view_token">;
|
|
81
33
|
token: z.ZodString;
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
token: string;
|
|
85
|
-
}, {
|
|
86
|
-
type: "view_token";
|
|
87
|
-
token: string;
|
|
88
|
-
}>]>;
|
|
89
|
-
}, "strip", z.ZodTypeAny, {
|
|
90
|
-
title: string;
|
|
91
|
-
action: {
|
|
92
|
-
type: "launch_frame";
|
|
93
|
-
name: string;
|
|
94
|
-
url?: string | undefined;
|
|
95
|
-
splashImageUrl?: string | undefined;
|
|
96
|
-
splashBackgroundColor?: string | undefined;
|
|
97
|
-
} | {
|
|
98
|
-
type: "view_token";
|
|
99
|
-
token: string;
|
|
100
|
-
};
|
|
101
|
-
}, {
|
|
102
|
-
title: string;
|
|
103
|
-
action: {
|
|
104
|
-
type: "launch_frame";
|
|
105
|
-
name: string;
|
|
106
|
-
url?: string | undefined;
|
|
107
|
-
splashImageUrl?: string | undefined;
|
|
108
|
-
splashBackgroundColor?: string | undefined;
|
|
109
|
-
} | {
|
|
110
|
-
type: "view_token";
|
|
111
|
-
token: string;
|
|
112
|
-
};
|
|
113
|
-
}>;
|
|
34
|
+
}, z.core.$strip>]>;
|
|
35
|
+
}, z.core.$strip>;
|
|
114
36
|
export declare const frameEmbedNextSchema: z.ZodObject<{
|
|
115
37
|
version: z.ZodLiteral<"next">;
|
|
116
|
-
imageUrl: z.
|
|
117
|
-
aspectRatio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>>;
|
|
38
|
+
imageUrl: z.ZodString;
|
|
39
|
+
aspectRatio: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>>;
|
|
118
40
|
button: z.ZodObject<{
|
|
119
41
|
title: z.ZodString;
|
|
120
|
-
action: z.ZodDiscriminatedUnion<
|
|
42
|
+
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
121
43
|
type: z.ZodLiteral<"launch_frame">;
|
|
122
44
|
name: z.ZodString;
|
|
123
|
-
url: z.ZodOptional<z.
|
|
124
|
-
splashImageUrl: z.ZodOptional<z.
|
|
45
|
+
url: z.ZodOptional<z.ZodString>;
|
|
46
|
+
splashImageUrl: z.ZodOptional<z.ZodString>;
|
|
125
47
|
splashBackgroundColor: z.ZodOptional<z.ZodString>;
|
|
126
|
-
},
|
|
127
|
-
type: "launch_frame";
|
|
128
|
-
name: string;
|
|
129
|
-
url?: string | undefined;
|
|
130
|
-
splashImageUrl?: string | undefined;
|
|
131
|
-
splashBackgroundColor?: string | undefined;
|
|
132
|
-
}, {
|
|
133
|
-
type: "launch_frame";
|
|
134
|
-
name: string;
|
|
135
|
-
url?: string | undefined;
|
|
136
|
-
splashImageUrl?: string | undefined;
|
|
137
|
-
splashBackgroundColor?: string | undefined;
|
|
138
|
-
}>, z.ZodObject<{
|
|
48
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
139
49
|
type: z.ZodLiteral<"view_token">;
|
|
140
50
|
token: z.ZodString;
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
type: "view_token";
|
|
146
|
-
token: string;
|
|
147
|
-
}>]>;
|
|
148
|
-
}, "strip", z.ZodTypeAny, {
|
|
149
|
-
title: string;
|
|
150
|
-
action: {
|
|
151
|
-
type: "launch_frame";
|
|
152
|
-
name: string;
|
|
153
|
-
url?: string | undefined;
|
|
154
|
-
splashImageUrl?: string | undefined;
|
|
155
|
-
splashBackgroundColor?: string | undefined;
|
|
156
|
-
} | {
|
|
157
|
-
type: "view_token";
|
|
158
|
-
token: string;
|
|
159
|
-
};
|
|
160
|
-
}, {
|
|
161
|
-
title: string;
|
|
162
|
-
action: {
|
|
163
|
-
type: "launch_frame";
|
|
164
|
-
name: string;
|
|
165
|
-
url?: string | undefined;
|
|
166
|
-
splashImageUrl?: string | undefined;
|
|
167
|
-
splashBackgroundColor?: string | undefined;
|
|
168
|
-
} | {
|
|
169
|
-
type: "view_token";
|
|
170
|
-
token: string;
|
|
171
|
-
};
|
|
172
|
-
}>;
|
|
173
|
-
}, "strip", z.ZodTypeAny, {
|
|
174
|
-
version: "next";
|
|
175
|
-
imageUrl: string;
|
|
176
|
-
button: {
|
|
177
|
-
title: string;
|
|
178
|
-
action: {
|
|
179
|
-
type: "launch_frame";
|
|
180
|
-
name: string;
|
|
181
|
-
url?: string | undefined;
|
|
182
|
-
splashImageUrl?: string | undefined;
|
|
183
|
-
splashBackgroundColor?: string | undefined;
|
|
184
|
-
} | {
|
|
185
|
-
type: "view_token";
|
|
186
|
-
token: string;
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
aspectRatio?: "1:1" | "3:2" | undefined;
|
|
190
|
-
}, {
|
|
191
|
-
version: "next";
|
|
192
|
-
imageUrl: string;
|
|
193
|
-
button: {
|
|
194
|
-
title: string;
|
|
195
|
-
action: {
|
|
196
|
-
type: "launch_frame";
|
|
197
|
-
name: string;
|
|
198
|
-
url?: string | undefined;
|
|
199
|
-
splashImageUrl?: string | undefined;
|
|
200
|
-
splashBackgroundColor?: string | undefined;
|
|
201
|
-
} | {
|
|
202
|
-
type: "view_token";
|
|
203
|
-
token: string;
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
aspectRatio?: "1:1" | "3:2" | undefined;
|
|
207
|
-
}>;
|
|
208
|
-
export declare const safeParseFrameEmbed: (rawResponse: unknown) => z.SafeParseReturnType<{
|
|
209
|
-
version: "next";
|
|
210
|
-
imageUrl: string;
|
|
211
|
-
button: {
|
|
212
|
-
title: string;
|
|
213
|
-
action: {
|
|
214
|
-
type: "launch_frame";
|
|
215
|
-
name: string;
|
|
216
|
-
url?: string | undefined;
|
|
217
|
-
splashImageUrl?: string | undefined;
|
|
218
|
-
splashBackgroundColor?: string | undefined;
|
|
219
|
-
} | {
|
|
220
|
-
type: "view_token";
|
|
221
|
-
token: string;
|
|
222
|
-
};
|
|
223
|
-
};
|
|
224
|
-
aspectRatio?: "1:1" | "3:2" | undefined;
|
|
225
|
-
}, {
|
|
51
|
+
}, z.core.$strip>]>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export declare const safeParseFrameEmbed: (rawResponse: unknown) => z.ZodSafeParseResult<{
|
|
226
55
|
version: "next";
|
|
227
56
|
imageUrl: string;
|
|
228
57
|
button: {
|
package/dist/schemas/embeds.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.safeParseFrameEmbed = exports.frameEmbedNextSchema = exports.buttonSchema = exports.actionSchema = exports.actionViewTokenSchema = exports.actionLaunchFrameSchema = void 0;
|
|
4
|
-
const
|
|
4
|
+
const v4_1 = require("zod/v4");
|
|
5
5
|
const shared_ts_1 = require("./shared.js");
|
|
6
|
-
exports.actionLaunchFrameSchema =
|
|
7
|
-
type:
|
|
6
|
+
exports.actionLaunchFrameSchema = v4_1.z.object({
|
|
7
|
+
type: v4_1.z.literal('launch_frame'),
|
|
8
8
|
name: shared_ts_1.frameNameSchema,
|
|
9
9
|
url: shared_ts_1.secureUrlSchema.optional(),
|
|
10
10
|
splashImageUrl: shared_ts_1.secureUrlSchema.optional(),
|
|
11
11
|
splashBackgroundColor: shared_ts_1.hexColorSchema.optional(),
|
|
12
12
|
});
|
|
13
|
-
exports.actionViewTokenSchema =
|
|
14
|
-
type:
|
|
13
|
+
exports.actionViewTokenSchema = v4_1.z.object({
|
|
14
|
+
type: v4_1.z.literal('view_token'),
|
|
15
15
|
token: shared_ts_1.caip19TokenSchema,
|
|
16
16
|
});
|
|
17
|
-
exports.actionSchema =
|
|
17
|
+
exports.actionSchema = v4_1.z.discriminatedUnion('type', [
|
|
18
18
|
exports.actionLaunchFrameSchema,
|
|
19
19
|
exports.actionViewTokenSchema,
|
|
20
20
|
]);
|
|
21
|
-
exports.buttonSchema =
|
|
21
|
+
exports.buttonSchema = v4_1.z.object({
|
|
22
22
|
title: shared_ts_1.buttonTitleSchema,
|
|
23
23
|
action: exports.actionSchema,
|
|
24
24
|
});
|
|
25
|
-
exports.frameEmbedNextSchema =
|
|
26
|
-
version:
|
|
25
|
+
exports.frameEmbedNextSchema = v4_1.z.object({
|
|
26
|
+
version: v4_1.z.literal('next'),
|
|
27
27
|
imageUrl: shared_ts_1.secureUrlSchema,
|
|
28
28
|
aspectRatio: shared_ts_1.aspectRatioSchema.optional(),
|
|
29
29
|
button: exports.buttonSchema,
|
package/dist/schemas/events.d.ts
CHANGED
|
@@ -1,131 +1,43 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
2
|
export declare const eventFrameAddedSchema: z.ZodObject<{
|
|
3
3
|
event: z.ZodLiteral<"frame_added">;
|
|
4
4
|
notificationDetails: z.ZodOptional<z.ZodObject<{
|
|
5
5
|
url: z.ZodString;
|
|
6
6
|
token: z.ZodString;
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
token: string;
|
|
10
|
-
}, {
|
|
11
|
-
url: string;
|
|
12
|
-
token: string;
|
|
13
|
-
}>>;
|
|
14
|
-
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
event: "frame_added";
|
|
16
|
-
notificationDetails?: {
|
|
17
|
-
url: string;
|
|
18
|
-
token: string;
|
|
19
|
-
} | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
event: "frame_added";
|
|
22
|
-
notificationDetails?: {
|
|
23
|
-
url: string;
|
|
24
|
-
token: string;
|
|
25
|
-
} | undefined;
|
|
26
|
-
}>;
|
|
7
|
+
}, z.core.$strip>>;
|
|
8
|
+
}, z.core.$strip>;
|
|
27
9
|
export type EventFrameAdded = z.infer<typeof eventFrameAddedSchema>;
|
|
28
10
|
export declare const eventFrameRemovedSchema: z.ZodObject<{
|
|
29
11
|
event: z.ZodLiteral<"frame_removed">;
|
|
30
|
-
},
|
|
31
|
-
event: "frame_removed";
|
|
32
|
-
}, {
|
|
33
|
-
event: "frame_removed";
|
|
34
|
-
}>;
|
|
12
|
+
}, z.core.$strip>;
|
|
35
13
|
export type EventFrameRemoved = z.infer<typeof eventFrameRemovedSchema>;
|
|
36
14
|
export declare const eventNotificationsEnabledSchema: z.ZodObject<{
|
|
37
15
|
event: z.ZodLiteral<"notifications_enabled">;
|
|
38
16
|
notificationDetails: z.ZodObject<{
|
|
39
|
-
url: z.ZodString
|
|
40
|
-
token: z.ZodString
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
token: string;
|
|
44
|
-
}, {
|
|
45
|
-
url: string;
|
|
46
|
-
token: string;
|
|
47
|
-
}>;
|
|
48
|
-
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
event: "notifications_enabled";
|
|
50
|
-
notificationDetails: {
|
|
51
|
-
url: string;
|
|
52
|
-
token: string;
|
|
53
|
-
};
|
|
54
|
-
}, {
|
|
55
|
-
event: "notifications_enabled";
|
|
56
|
-
notificationDetails: {
|
|
57
|
-
url: string;
|
|
58
|
-
token: string;
|
|
59
|
-
};
|
|
60
|
-
}>;
|
|
17
|
+
url: z.ZodNonOptional<z.ZodString>;
|
|
18
|
+
token: z.ZodNonOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
}, z.core.$strip>;
|
|
61
21
|
export type EventNotificationsEnabled = z.infer<typeof eventNotificationsEnabledSchema>;
|
|
62
22
|
export declare const notificationsDisabledSchema: z.ZodObject<{
|
|
63
23
|
event: z.ZodLiteral<"notifications_disabled">;
|
|
64
|
-
},
|
|
65
|
-
event: "notifications_disabled";
|
|
66
|
-
}, {
|
|
67
|
-
event: "notifications_disabled";
|
|
68
|
-
}>;
|
|
24
|
+
}, z.core.$strip>;
|
|
69
25
|
export type EventNotificationsDisabled = z.infer<typeof notificationsDisabledSchema>;
|
|
70
|
-
export declare const serverEventSchema: z.ZodDiscriminatedUnion<
|
|
26
|
+
export declare const serverEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
71
27
|
event: z.ZodLiteral<"frame_added">;
|
|
72
28
|
notificationDetails: z.ZodOptional<z.ZodObject<{
|
|
73
29
|
url: z.ZodString;
|
|
74
30
|
token: z.ZodString;
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
token: string;
|
|
78
|
-
}, {
|
|
79
|
-
url: string;
|
|
80
|
-
token: string;
|
|
81
|
-
}>>;
|
|
82
|
-
}, "strip", z.ZodTypeAny, {
|
|
83
|
-
event: "frame_added";
|
|
84
|
-
notificationDetails?: {
|
|
85
|
-
url: string;
|
|
86
|
-
token: string;
|
|
87
|
-
} | undefined;
|
|
88
|
-
}, {
|
|
89
|
-
event: "frame_added";
|
|
90
|
-
notificationDetails?: {
|
|
91
|
-
url: string;
|
|
92
|
-
token: string;
|
|
93
|
-
} | undefined;
|
|
94
|
-
}>, z.ZodObject<{
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
95
33
|
event: z.ZodLiteral<"frame_removed">;
|
|
96
|
-
},
|
|
97
|
-
event: "frame_removed";
|
|
98
|
-
}, {
|
|
99
|
-
event: "frame_removed";
|
|
100
|
-
}>, z.ZodObject<{
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
35
|
event: z.ZodLiteral<"notifications_enabled">;
|
|
102
36
|
notificationDetails: z.ZodObject<{
|
|
103
|
-
url: z.ZodString
|
|
104
|
-
token: z.ZodString
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
token: string;
|
|
108
|
-
}, {
|
|
109
|
-
url: string;
|
|
110
|
-
token: string;
|
|
111
|
-
}>;
|
|
112
|
-
}, "strip", z.ZodTypeAny, {
|
|
113
|
-
event: "notifications_enabled";
|
|
114
|
-
notificationDetails: {
|
|
115
|
-
url: string;
|
|
116
|
-
token: string;
|
|
117
|
-
};
|
|
118
|
-
}, {
|
|
119
|
-
event: "notifications_enabled";
|
|
120
|
-
notificationDetails: {
|
|
121
|
-
url: string;
|
|
122
|
-
token: string;
|
|
123
|
-
};
|
|
124
|
-
}>, z.ZodObject<{
|
|
37
|
+
url: z.ZodNonOptional<z.ZodString>;
|
|
38
|
+
token: z.ZodNonOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
125
41
|
event: z.ZodLiteral<"notifications_disabled">;
|
|
126
|
-
},
|
|
127
|
-
event: "notifications_disabled";
|
|
128
|
-
}, {
|
|
129
|
-
event: "notifications_disabled";
|
|
130
|
-
}>]>;
|
|
42
|
+
}, z.core.$strip>]>;
|
|
131
43
|
export type FrameServerEvent = z.infer<typeof serverEventSchema>;
|
package/dist/schemas/events.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.serverEventSchema = exports.notificationsDisabledSchema = exports.eventNotificationsEnabledSchema = exports.eventFrameRemovedSchema = exports.eventFrameAddedSchema = void 0;
|
|
4
|
-
const
|
|
4
|
+
const v4_1 = require("zod/v4");
|
|
5
5
|
const notifications_ts_1 = require("./notifications.js");
|
|
6
|
-
exports.eventFrameAddedSchema =
|
|
7
|
-
event:
|
|
6
|
+
exports.eventFrameAddedSchema = v4_1.z.object({
|
|
7
|
+
event: v4_1.z.literal('frame_added'),
|
|
8
8
|
notificationDetails: notifications_ts_1.notificationDetailsSchema.optional(),
|
|
9
9
|
});
|
|
10
|
-
exports.eventFrameRemovedSchema =
|
|
11
|
-
event:
|
|
10
|
+
exports.eventFrameRemovedSchema = v4_1.z.object({
|
|
11
|
+
event: v4_1.z.literal('frame_removed'),
|
|
12
12
|
});
|
|
13
|
-
exports.eventNotificationsEnabledSchema =
|
|
14
|
-
event:
|
|
13
|
+
exports.eventNotificationsEnabledSchema = v4_1.z.object({
|
|
14
|
+
event: v4_1.z.literal('notifications_enabled'),
|
|
15
15
|
notificationDetails: notifications_ts_1.notificationDetailsSchema.required(),
|
|
16
16
|
});
|
|
17
|
-
exports.notificationsDisabledSchema =
|
|
18
|
-
event:
|
|
17
|
+
exports.notificationsDisabledSchema = v4_1.z.object({
|
|
18
|
+
event: v4_1.z.literal('notifications_disabled'),
|
|
19
19
|
});
|
|
20
|
-
exports.serverEventSchema =
|
|
20
|
+
exports.serverEventSchema = v4_1.z.discriminatedUnion('event', [
|
|
21
21
|
exports.eventFrameAddedSchema,
|
|
22
22
|
exports.eventFrameRemovedSchema,
|
|
23
23
|
exports.eventNotificationsEnabledSchema,
|