@farcaster/miniapp-core 0.0.0-canary-20250630212339 → 0.0.0-canary-20250630230419

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.
@@ -1,87 +1,284 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
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.ZodString>;
6
- splashImageUrl: z.ZodOptional<z.ZodString>;
5
+ url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
6
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
7
7
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
8
- }, z.core.$strip>;
8
+ }, "strip", z.ZodTypeAny, {
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
+ }>;
9
21
  export declare const actionLaunchMiniAppSchema: z.ZodObject<{
10
22
  type: z.ZodLiteral<"launch_miniapp">;
11
23
  name: z.ZodString;
12
- url: z.ZodOptional<z.ZodString>;
13
- splashImageUrl: z.ZodOptional<z.ZodString>;
24
+ url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
25
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
14
26
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
15
- }, z.core.$strip>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ type: "launch_miniapp";
29
+ name: string;
30
+ url?: string | undefined;
31
+ splashImageUrl?: string | undefined;
32
+ splashBackgroundColor?: string | undefined;
33
+ }, {
34
+ type: "launch_miniapp";
35
+ name: string;
36
+ url?: string | undefined;
37
+ splashImageUrl?: string | undefined;
38
+ splashBackgroundColor?: string | undefined;
39
+ }>;
16
40
  export declare const actionViewTokenSchema: z.ZodObject<{
17
41
  type: z.ZodLiteral<"view_token">;
18
42
  token: z.ZodString;
19
- }, z.core.$strip>;
20
- export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
43
+ }, "strip", z.ZodTypeAny, {
44
+ type: "view_token";
45
+ token: string;
46
+ }, {
47
+ type: "view_token";
48
+ token: string;
49
+ }>;
50
+ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
21
51
  type: z.ZodLiteral<"launch_miniapp">;
22
52
  name: z.ZodString;
23
- url: z.ZodOptional<z.ZodString>;
24
- splashImageUrl: z.ZodOptional<z.ZodString>;
53
+ url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
54
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
25
55
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
26
- }, z.core.$strip>, z.ZodObject<{
56
+ }, "strip", z.ZodTypeAny, {
57
+ type: "launch_miniapp";
58
+ name: string;
59
+ url?: string | undefined;
60
+ splashImageUrl?: string | undefined;
61
+ splashBackgroundColor?: string | undefined;
62
+ }, {
63
+ type: "launch_miniapp";
64
+ name: string;
65
+ url?: string | undefined;
66
+ splashImageUrl?: string | undefined;
67
+ splashBackgroundColor?: string | undefined;
68
+ }>, z.ZodObject<{
27
69
  type: z.ZodLiteral<"view_token">;
28
70
  token: z.ZodString;
29
- }, z.core.$strip>, z.ZodObject<{
71
+ }, "strip", z.ZodTypeAny, {
72
+ type: "view_token";
73
+ token: string;
74
+ }, {
75
+ type: "view_token";
76
+ token: string;
77
+ }>, z.ZodObject<{
30
78
  type: z.ZodLiteral<"launch_frame">;
31
79
  name: z.ZodString;
32
- url: z.ZodOptional<z.ZodString>;
33
- splashImageUrl: z.ZodOptional<z.ZodString>;
80
+ url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
81
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
34
82
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
35
- }, z.core.$strip>]>;
83
+ }, "strip", z.ZodTypeAny, {
84
+ type: "launch_frame";
85
+ name: string;
86
+ url?: string | undefined;
87
+ splashImageUrl?: string | undefined;
88
+ splashBackgroundColor?: string | undefined;
89
+ }, {
90
+ type: "launch_frame";
91
+ name: string;
92
+ url?: string | undefined;
93
+ splashImageUrl?: string | undefined;
94
+ splashBackgroundColor?: string | undefined;
95
+ }>]>;
36
96
  export declare const buttonSchema: z.ZodObject<{
37
97
  title: z.ZodString;
38
- action: z.ZodDiscriminatedUnion<[z.ZodObject<{
98
+ action: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
39
99
  type: z.ZodLiteral<"launch_miniapp">;
40
100
  name: z.ZodString;
41
- url: z.ZodOptional<z.ZodString>;
42
- splashImageUrl: z.ZodOptional<z.ZodString>;
101
+ url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
102
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
43
103
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
44
- }, z.core.$strip>, z.ZodObject<{
104
+ }, "strip", z.ZodTypeAny, {
105
+ type: "launch_miniapp";
106
+ name: string;
107
+ url?: string | undefined;
108
+ splashImageUrl?: string | undefined;
109
+ splashBackgroundColor?: string | undefined;
110
+ }, {
111
+ type: "launch_miniapp";
112
+ name: string;
113
+ url?: string | undefined;
114
+ splashImageUrl?: string | undefined;
115
+ splashBackgroundColor?: string | undefined;
116
+ }>, z.ZodObject<{
45
117
  type: z.ZodLiteral<"view_token">;
46
118
  token: z.ZodString;
47
- }, z.core.$strip>, z.ZodObject<{
119
+ }, "strip", z.ZodTypeAny, {
120
+ type: "view_token";
121
+ token: string;
122
+ }, {
123
+ type: "view_token";
124
+ token: string;
125
+ }>, z.ZodObject<{
48
126
  type: z.ZodLiteral<"launch_frame">;
49
127
  name: z.ZodString;
50
- url: z.ZodOptional<z.ZodString>;
51
- splashImageUrl: z.ZodOptional<z.ZodString>;
128
+ url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
129
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
52
130
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
53
- }, z.core.$strip>]>;
54
- }, z.core.$strip>;
131
+ }, "strip", z.ZodTypeAny, {
132
+ type: "launch_frame";
133
+ name: string;
134
+ url?: string | undefined;
135
+ splashImageUrl?: string | undefined;
136
+ splashBackgroundColor?: string | undefined;
137
+ }, {
138
+ type: "launch_frame";
139
+ name: string;
140
+ url?: string | undefined;
141
+ splashImageUrl?: string | undefined;
142
+ splashBackgroundColor?: string | undefined;
143
+ }>]>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ title: string;
146
+ action: {
147
+ type: "launch_frame";
148
+ name: string;
149
+ url?: string | undefined;
150
+ splashImageUrl?: string | undefined;
151
+ splashBackgroundColor?: string | undefined;
152
+ } | {
153
+ type: "launch_miniapp";
154
+ name: string;
155
+ url?: string | undefined;
156
+ splashImageUrl?: string | undefined;
157
+ splashBackgroundColor?: string | undefined;
158
+ } | {
159
+ type: "view_token";
160
+ token: string;
161
+ };
162
+ }, {
163
+ title: string;
164
+ action: {
165
+ type: "launch_frame";
166
+ name: string;
167
+ url?: string | undefined;
168
+ splashImageUrl?: string | undefined;
169
+ splashBackgroundColor?: string | undefined;
170
+ } | {
171
+ type: "launch_miniapp";
172
+ name: string;
173
+ url?: string | undefined;
174
+ splashImageUrl?: string | undefined;
175
+ splashBackgroundColor?: string | undefined;
176
+ } | {
177
+ type: "view_token";
178
+ token: string;
179
+ };
180
+ }>;
55
181
  export declare const miniAppEmbedNextSchema: z.ZodObject<{
56
182
  version: z.ZodLiteral<"next">;
57
- imageUrl: z.ZodString;
58
- aspectRatio: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>>;
183
+ imageUrl: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
184
+ aspectRatio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>>;
59
185
  button: z.ZodObject<{
60
186
  title: z.ZodString;
61
- action: z.ZodDiscriminatedUnion<[z.ZodObject<{
187
+ action: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
62
188
  type: z.ZodLiteral<"launch_miniapp">;
63
189
  name: z.ZodString;
64
- url: z.ZodOptional<z.ZodString>;
65
- splashImageUrl: z.ZodOptional<z.ZodString>;
190
+ url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
191
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
66
192
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
67
- }, z.core.$strip>, z.ZodObject<{
193
+ }, "strip", z.ZodTypeAny, {
194
+ type: "launch_miniapp";
195
+ name: string;
196
+ url?: string | undefined;
197
+ splashImageUrl?: string | undefined;
198
+ splashBackgroundColor?: string | undefined;
199
+ }, {
200
+ type: "launch_miniapp";
201
+ name: string;
202
+ url?: string | undefined;
203
+ splashImageUrl?: string | undefined;
204
+ splashBackgroundColor?: string | undefined;
205
+ }>, z.ZodObject<{
68
206
  type: z.ZodLiteral<"view_token">;
69
207
  token: z.ZodString;
70
- }, z.core.$strip>, z.ZodObject<{
208
+ }, "strip", z.ZodTypeAny, {
209
+ type: "view_token";
210
+ token: string;
211
+ }, {
212
+ type: "view_token";
213
+ token: string;
214
+ }>, z.ZodObject<{
71
215
  type: z.ZodLiteral<"launch_frame">;
72
216
  name: z.ZodString;
73
- url: z.ZodOptional<z.ZodString>;
74
- splashImageUrl: z.ZodOptional<z.ZodString>;
217
+ url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
218
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
75
219
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
76
- }, z.core.$strip>]>;
77
- }, z.core.$strip>;
78
- }, z.core.$strip>;
79
- export declare const safeParseMiniAppEmbed: (rawResponse: unknown) => z.ZodSafeParseResult<{
220
+ }, "strip", z.ZodTypeAny, {
221
+ type: "launch_frame";
222
+ name: string;
223
+ url?: string | undefined;
224
+ splashImageUrl?: string | undefined;
225
+ splashBackgroundColor?: string | undefined;
226
+ }, {
227
+ type: "launch_frame";
228
+ name: string;
229
+ url?: string | undefined;
230
+ splashImageUrl?: string | undefined;
231
+ splashBackgroundColor?: string | undefined;
232
+ }>]>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ title: string;
235
+ action: {
236
+ type: "launch_frame";
237
+ name: string;
238
+ url?: string | undefined;
239
+ splashImageUrl?: string | undefined;
240
+ splashBackgroundColor?: string | undefined;
241
+ } | {
242
+ type: "launch_miniapp";
243
+ name: string;
244
+ url?: string | undefined;
245
+ splashImageUrl?: string | undefined;
246
+ splashBackgroundColor?: string | undefined;
247
+ } | {
248
+ type: "view_token";
249
+ token: string;
250
+ };
251
+ }, {
252
+ title: string;
253
+ action: {
254
+ type: "launch_frame";
255
+ name: string;
256
+ url?: string | undefined;
257
+ splashImageUrl?: string | undefined;
258
+ splashBackgroundColor?: string | undefined;
259
+ } | {
260
+ type: "launch_miniapp";
261
+ name: string;
262
+ url?: string | undefined;
263
+ splashImageUrl?: string | undefined;
264
+ splashBackgroundColor?: string | undefined;
265
+ } | {
266
+ type: "view_token";
267
+ token: string;
268
+ };
269
+ }>;
270
+ }, "strip", z.ZodTypeAny, {
80
271
  version: "next";
81
272
  imageUrl: string;
82
273
  button: {
83
274
  title: string;
84
275
  action: {
276
+ type: "launch_frame";
277
+ name: string;
278
+ url?: string | undefined;
279
+ splashImageUrl?: string | undefined;
280
+ splashBackgroundColor?: string | undefined;
281
+ } | {
85
282
  type: "launch_miniapp";
86
283
  name: string;
87
284
  url?: string | undefined;
@@ -90,22 +287,45 @@ export declare const safeParseMiniAppEmbed: (rawResponse: unknown) => z.ZodSafeP
90
287
  } | {
91
288
  type: "view_token";
92
289
  token: string;
93
- } | {
290
+ };
291
+ };
292
+ aspectRatio?: "1:1" | "3:2" | undefined;
293
+ }, {
294
+ version: "next";
295
+ imageUrl: string;
296
+ button: {
297
+ title: string;
298
+ action: {
94
299
  type: "launch_frame";
95
300
  name: string;
96
301
  url?: string | undefined;
97
302
  splashImageUrl?: string | undefined;
98
303
  splashBackgroundColor?: string | undefined;
304
+ } | {
305
+ type: "launch_miniapp";
306
+ name: string;
307
+ url?: string | undefined;
308
+ splashImageUrl?: string | undefined;
309
+ splashBackgroundColor?: string | undefined;
310
+ } | {
311
+ type: "view_token";
312
+ token: string;
99
313
  };
100
314
  };
101
315
  aspectRatio?: "1:1" | "3:2" | undefined;
102
316
  }>;
103
- export declare const safeParseFrameEmbed: (rawResponse: unknown) => z.ZodSafeParseResult<{
317
+ export declare const safeParseMiniAppEmbed: (rawResponse: unknown) => z.SafeParseReturnType<{
104
318
  version: "next";
105
319
  imageUrl: string;
106
320
  button: {
107
321
  title: string;
108
322
  action: {
323
+ type: "launch_frame";
324
+ name: string;
325
+ url?: string | undefined;
326
+ splashImageUrl?: string | undefined;
327
+ splashBackgroundColor?: string | undefined;
328
+ } | {
109
329
  type: "launch_miniapp";
110
330
  name: string;
111
331
  url?: string | undefined;
@@ -114,12 +334,76 @@ export declare const safeParseFrameEmbed: (rawResponse: unknown) => z.ZodSafePar
114
334
  } | {
115
335
  type: "view_token";
116
336
  token: string;
337
+ };
338
+ };
339
+ aspectRatio?: "1:1" | "3:2" | undefined;
340
+ }, {
341
+ version: "next";
342
+ imageUrl: string;
343
+ button: {
344
+ title: string;
345
+ action: {
346
+ type: "launch_frame";
347
+ name: string;
348
+ url?: string | undefined;
349
+ splashImageUrl?: string | undefined;
350
+ splashBackgroundColor?: string | undefined;
117
351
  } | {
352
+ type: "launch_miniapp";
353
+ name: string;
354
+ url?: string | undefined;
355
+ splashImageUrl?: string | undefined;
356
+ splashBackgroundColor?: string | undefined;
357
+ } | {
358
+ type: "view_token";
359
+ token: string;
360
+ };
361
+ };
362
+ aspectRatio?: "1:1" | "3:2" | undefined;
363
+ }>;
364
+ export declare const safeParseFrameEmbed: (rawResponse: unknown) => z.SafeParseReturnType<{
365
+ version: "next";
366
+ imageUrl: string;
367
+ button: {
368
+ title: string;
369
+ action: {
370
+ type: "launch_frame";
371
+ name: string;
372
+ url?: string | undefined;
373
+ splashImageUrl?: string | undefined;
374
+ splashBackgroundColor?: string | undefined;
375
+ } | {
376
+ type: "launch_miniapp";
377
+ name: string;
378
+ url?: string | undefined;
379
+ splashImageUrl?: string | undefined;
380
+ splashBackgroundColor?: string | undefined;
381
+ } | {
382
+ type: "view_token";
383
+ token: string;
384
+ };
385
+ };
386
+ aspectRatio?: "1:1" | "3:2" | undefined;
387
+ }, {
388
+ version: "next";
389
+ imageUrl: string;
390
+ button: {
391
+ title: string;
392
+ action: {
118
393
  type: "launch_frame";
119
394
  name: string;
120
395
  url?: string | undefined;
121
396
  splashImageUrl?: string | undefined;
122
397
  splashBackgroundColor?: string | undefined;
398
+ } | {
399
+ type: "launch_miniapp";
400
+ name: string;
401
+ url?: string | undefined;
402
+ splashImageUrl?: string | undefined;
403
+ splashBackgroundColor?: string | undefined;
404
+ } | {
405
+ type: "view_token";
406
+ token: string;
123
407
  };
124
408
  };
125
409
  aspectRatio?: "1:1" | "3:2" | undefined;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
2
2
  import { aspectRatioSchema, buttonTitleSchema, caip19TokenSchema, hexColorSchema, miniAppNameSchema, secureUrlSchema, } from "./shared.js";
3
3
  export const actionLaunchFrameSchema = z.object({
4
4
  type: z.literal('launch_frame'),
@@ -1,63 +1,195 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
2
2
  export declare const eventMiniAppAddedSchema: z.ZodObject<{
3
3
  event: z.ZodLiteral<"miniapp_added">;
4
4
  notificationDetails: z.ZodOptional<z.ZodObject<{
5
5
  url: z.ZodString;
6
6
  token: z.ZodString;
7
- }, z.core.$strip>>;
8
- }, z.core.$strip>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ url: string;
9
+ token: string;
10
+ }, {
11
+ url: string;
12
+ token: string;
13
+ }>>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ event: "miniapp_added";
16
+ notificationDetails?: {
17
+ url: string;
18
+ token: string;
19
+ } | undefined;
20
+ }, {
21
+ event: "miniapp_added";
22
+ notificationDetails?: {
23
+ url: string;
24
+ token: string;
25
+ } | undefined;
26
+ }>;
9
27
  export type EventMiniAppAdded = z.infer<typeof eventMiniAppAddedSchema>;
10
28
  export declare const eventFrameAddedSchema: z.ZodObject<{
11
29
  event: z.ZodLiteral<"frame_added">;
12
30
  notificationDetails: z.ZodOptional<z.ZodObject<{
13
31
  url: z.ZodString;
14
32
  token: z.ZodString;
15
- }, z.core.$strip>>;
16
- }, z.core.$strip>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ url: string;
35
+ token: string;
36
+ }, {
37
+ url: string;
38
+ token: string;
39
+ }>>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ event: "frame_added";
42
+ notificationDetails?: {
43
+ url: string;
44
+ token: string;
45
+ } | undefined;
46
+ }, {
47
+ event: "frame_added";
48
+ notificationDetails?: {
49
+ url: string;
50
+ token: string;
51
+ } | undefined;
52
+ }>;
17
53
  export type EventFrameAdded = z.infer<typeof eventFrameAddedSchema>;
18
54
  export declare const eventMiniAppRemovedSchema: z.ZodObject<{
19
55
  event: z.ZodLiteral<"miniapp_removed">;
20
- }, z.core.$strip>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ event: "miniapp_removed";
58
+ }, {
59
+ event: "miniapp_removed";
60
+ }>;
21
61
  export type EventMiniAppRemoved = z.infer<typeof eventMiniAppRemovedSchema>;
22
62
  export declare const eventFrameRemovedSchema: z.ZodObject<{
23
63
  event: z.ZodLiteral<"frame_removed">;
24
- }, z.core.$strip>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ event: "frame_removed";
66
+ }, {
67
+ event: "frame_removed";
68
+ }>;
25
69
  export type EventFrameRemoved = z.infer<typeof eventFrameRemovedSchema>;
26
70
  export declare const eventNotificationsEnabledSchema: z.ZodObject<{
27
71
  event: z.ZodLiteral<"notifications_enabled">;
28
72
  notificationDetails: z.ZodObject<{
29
- url: z.ZodNonOptional<z.ZodString>;
30
- token: z.ZodNonOptional<z.ZodString>;
31
- }, z.core.$strip>;
32
- }, z.core.$strip>;
73
+ url: z.ZodString;
74
+ token: z.ZodString;
75
+ }, "strip", z.ZodTypeAny, {
76
+ url: string;
77
+ token: string;
78
+ }, {
79
+ url: string;
80
+ token: string;
81
+ }>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ event: "notifications_enabled";
84
+ notificationDetails: {
85
+ url: string;
86
+ token: string;
87
+ };
88
+ }, {
89
+ event: "notifications_enabled";
90
+ notificationDetails: {
91
+ url: string;
92
+ token: string;
93
+ };
94
+ }>;
33
95
  export type EventNotificationsEnabled = z.infer<typeof eventNotificationsEnabledSchema>;
34
96
  export declare const notificationsDisabledSchema: z.ZodObject<{
35
97
  event: z.ZodLiteral<"notifications_disabled">;
36
- }, z.core.$strip>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ event: "notifications_disabled";
100
+ }, {
101
+ event: "notifications_disabled";
102
+ }>;
37
103
  export type EventNotificationsDisabled = z.infer<typeof notificationsDisabledSchema>;
38
- export declare const serverEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
104
+ export declare const serverEventSchema: z.ZodDiscriminatedUnion<"event", [z.ZodObject<{
39
105
  event: z.ZodLiteral<"miniapp_added">;
40
106
  notificationDetails: z.ZodOptional<z.ZodObject<{
41
107
  url: z.ZodString;
42
108
  token: z.ZodString;
43
- }, z.core.$strip>>;
44
- }, z.core.$strip>, z.ZodObject<{
109
+ }, "strip", z.ZodTypeAny, {
110
+ url: string;
111
+ token: string;
112
+ }, {
113
+ url: string;
114
+ token: string;
115
+ }>>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ event: "miniapp_added";
118
+ notificationDetails?: {
119
+ url: string;
120
+ token: string;
121
+ } | undefined;
122
+ }, {
123
+ event: "miniapp_added";
124
+ notificationDetails?: {
125
+ url: string;
126
+ token: string;
127
+ } | undefined;
128
+ }>, z.ZodObject<{
45
129
  event: z.ZodLiteral<"miniapp_removed">;
46
- }, z.core.$strip>, z.ZodObject<{
130
+ }, "strip", z.ZodTypeAny, {
131
+ event: "miniapp_removed";
132
+ }, {
133
+ event: "miniapp_removed";
134
+ }>, z.ZodObject<{
47
135
  event: z.ZodLiteral<"notifications_enabled">;
48
136
  notificationDetails: z.ZodObject<{
49
- url: z.ZodNonOptional<z.ZodString>;
50
- token: z.ZodNonOptional<z.ZodString>;
51
- }, z.core.$strip>;
52
- }, z.core.$strip>, z.ZodObject<{
137
+ url: z.ZodString;
138
+ token: z.ZodString;
139
+ }, "strip", z.ZodTypeAny, {
140
+ url: string;
141
+ token: string;
142
+ }, {
143
+ url: string;
144
+ token: string;
145
+ }>;
146
+ }, "strip", z.ZodTypeAny, {
147
+ event: "notifications_enabled";
148
+ notificationDetails: {
149
+ url: string;
150
+ token: string;
151
+ };
152
+ }, {
153
+ event: "notifications_enabled";
154
+ notificationDetails: {
155
+ url: string;
156
+ token: string;
157
+ };
158
+ }>, z.ZodObject<{
53
159
  event: z.ZodLiteral<"notifications_disabled">;
54
- }, z.core.$strip>, z.ZodObject<{
160
+ }, "strip", z.ZodTypeAny, {
161
+ event: "notifications_disabled";
162
+ }, {
163
+ event: "notifications_disabled";
164
+ }>, z.ZodObject<{
55
165
  event: z.ZodLiteral<"frame_added">;
56
166
  notificationDetails: z.ZodOptional<z.ZodObject<{
57
167
  url: z.ZodString;
58
168
  token: z.ZodString;
59
- }, z.core.$strip>>;
60
- }, z.core.$strip>, z.ZodObject<{
169
+ }, "strip", z.ZodTypeAny, {
170
+ url: string;
171
+ token: string;
172
+ }, {
173
+ url: string;
174
+ token: string;
175
+ }>>;
176
+ }, "strip", z.ZodTypeAny, {
177
+ event: "frame_added";
178
+ notificationDetails?: {
179
+ url: string;
180
+ token: string;
181
+ } | undefined;
182
+ }, {
183
+ event: "frame_added";
184
+ notificationDetails?: {
185
+ url: string;
186
+ token: string;
187
+ } | undefined;
188
+ }>, z.ZodObject<{
61
189
  event: z.ZodLiteral<"frame_removed">;
62
- }, z.core.$strip>]>;
190
+ }, "strip", z.ZodTypeAny, {
191
+ event: "frame_removed";
192
+ }, {
193
+ event: "frame_removed";
194
+ }>]>;
63
195
  export type MiniAppServerEvent = z.infer<typeof serverEventSchema>;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
2
2
  import { notificationDetailsSchema } from "./notifications.js";
3
3
  export const eventMiniAppAddedSchema = z.object({
4
4
  event: z.literal('miniapp_added'),