@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.
@@ -1,60 +1,22 @@
1
- import { z } from 'zod';
1
+ import { z } from 'zod/v4';
2
2
  export declare const notificationDetailsSchema: z.ZodObject<{
3
3
  url: z.ZodString;
4
4
  token: z.ZodString;
5
- }, "strip", z.ZodTypeAny, {
6
- url: string;
7
- token: string;
8
- }, {
9
- url: string;
10
- token: string;
11
- }>;
5
+ }, z.core.$strip>;
12
6
  export type FrameNotificationDetails = z.infer<typeof notificationDetailsSchema>;
13
7
  export declare const sendNotificationRequestSchema: z.ZodObject<{
14
8
  notificationId: z.ZodString;
15
9
  title: z.ZodString;
16
10
  body: z.ZodString;
17
- targetUrl: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
18
- tokens: z.ZodArray<z.ZodString, "many">;
19
- }, "strip", z.ZodTypeAny, {
20
- title: string;
21
- notificationId: string;
22
- body: string;
23
- targetUrl: string;
24
- tokens: string[];
25
- }, {
26
- title: string;
27
- notificationId: string;
28
- body: string;
29
- targetUrl: string;
30
- tokens: string[];
31
- }>;
11
+ targetUrl: z.ZodString;
12
+ tokens: z.ZodArray<z.ZodString>;
13
+ }, z.core.$strip>;
32
14
  export type SendNotificationRequest = z.infer<typeof sendNotificationRequestSchema>;
33
15
  export declare const sendNotificationResponseSchema: z.ZodObject<{
34
16
  result: z.ZodObject<{
35
- successfulTokens: z.ZodArray<z.ZodString, "many">;
36
- invalidTokens: z.ZodArray<z.ZodString, "many">;
37
- rateLimitedTokens: z.ZodArray<z.ZodString, "many">;
38
- }, "strip", z.ZodTypeAny, {
39
- successfulTokens: string[];
40
- invalidTokens: string[];
41
- rateLimitedTokens: string[];
42
- }, {
43
- successfulTokens: string[];
44
- invalidTokens: string[];
45
- rateLimitedTokens: string[];
46
- }>;
47
- }, "strip", z.ZodTypeAny, {
48
- result: {
49
- successfulTokens: string[];
50
- invalidTokens: string[];
51
- rateLimitedTokens: string[];
52
- };
53
- }, {
54
- result: {
55
- successfulTokens: string[];
56
- invalidTokens: string[];
57
- rateLimitedTokens: string[];
58
- };
59
- }>;
17
+ successfulTokens: z.ZodArray<z.ZodString>;
18
+ invalidTokens: z.ZodArray<z.ZodString>;
19
+ rateLimitedTokens: z.ZodArray<z.ZodString>;
20
+ }, z.core.$strip>;
21
+ }, z.core.$strip>;
60
22
  export type SendNotificationResponse = z.infer<typeof sendNotificationResponseSchema>;
@@ -1,23 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sendNotificationResponseSchema = exports.sendNotificationRequestSchema = exports.notificationDetailsSchema = void 0;
4
- const zod_1 = require("zod");
4
+ const v4_1 = require("zod/v4");
5
5
  const shared_ts_1 = require("./shared.js");
6
- exports.notificationDetailsSchema = zod_1.z.object({
7
- url: zod_1.z.string(),
8
- token: zod_1.z.string(),
6
+ exports.notificationDetailsSchema = v4_1.z.object({
7
+ url: v4_1.z.string(),
8
+ token: v4_1.z.string(),
9
9
  });
10
- exports.sendNotificationRequestSchema = zod_1.z.object({
11
- notificationId: zod_1.z.string().max(128),
12
- title: zod_1.z.string().max(32),
13
- body: zod_1.z.string().max(128),
10
+ exports.sendNotificationRequestSchema = v4_1.z.object({
11
+ notificationId: v4_1.z.string().max(128),
12
+ title: v4_1.z.string().max(32),
13
+ body: v4_1.z.string().max(128),
14
14
  targetUrl: shared_ts_1.secureUrlSchema,
15
- tokens: zod_1.z.string().array().max(100),
15
+ tokens: v4_1.z.string().array().max(100),
16
16
  });
17
- exports.sendNotificationResponseSchema = zod_1.z.object({
18
- result: zod_1.z.object({
19
- successfulTokens: zod_1.z.array(zod_1.z.string()),
20
- invalidTokens: zod_1.z.array(zod_1.z.string()),
21
- rateLimitedTokens: zod_1.z.array(zod_1.z.string()),
17
+ exports.sendNotificationResponseSchema = v4_1.z.object({
18
+ result: v4_1.z.object({
19
+ successfulTokens: v4_1.z.array(v4_1.z.string()),
20
+ invalidTokens: v4_1.z.array(v4_1.z.string()),
21
+ rateLimitedTokens: v4_1.z.array(v4_1.z.string()),
22
22
  }),
23
23
  });
@@ -1,40 +1,24 @@
1
- import { z } from 'zod';
1
+ import { z } from 'zod/v4';
2
2
  export declare const createSimpleStringSchema: ({ max, noSpaces, }?: {
3
3
  max?: number;
4
4
  noSpaces?: boolean;
5
- }) => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
6
- export declare const secureUrlSchema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
5
+ }) => z.ZodString;
6
+ export declare const secureUrlSchema: z.ZodString;
7
7
  export declare const frameNameSchema: z.ZodString;
8
8
  export declare const buttonTitleSchema: z.ZodString;
9
9
  export declare const caip19TokenSchema: z.ZodString;
10
10
  export declare const hexColorSchema: z.ZodString;
11
- export declare const domainSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
12
- export declare const aspectRatioSchema: z.ZodUnion<[z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>;
11
+ export declare const domainSchema: z.ZodString;
12
+ export declare const aspectRatioSchema: z.ZodUnion<readonly [z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>;
13
13
  export declare const encodedJsonFarcasterSignatureSchema: z.ZodObject<{
14
14
  header: z.ZodString;
15
15
  payload: z.ZodString;
16
16
  signature: z.ZodString;
17
- }, "strip", z.ZodTypeAny, {
18
- header: string;
19
- payload: string;
20
- signature: string;
21
- }, {
22
- header: string;
23
- payload: string;
24
- signature: string;
25
- }>;
17
+ }, z.core.$strip>;
26
18
  export type EncodedJsonFarcasterSignatureSchema = z.infer<typeof encodedJsonFarcasterSignatureSchema>;
27
19
  export declare const jsonFarcasterSignatureHeaderSchema: z.ZodObject<{
28
20
  fid: z.ZodNumber;
29
21
  type: z.ZodLiteral<"app_key">;
30
22
  key: z.ZodString;
31
- }, "strip", z.ZodTypeAny, {
32
- type: "app_key";
33
- fid: number;
34
- key: string;
35
- }, {
36
- type: "app_key";
37
- fid: number;
38
- key: string;
39
- }>;
23
+ }, z.core.$strip>;
40
24
  export type JsonFarcasterSignatureHeaderSchema = z.infer<typeof jsonFarcasterSignatureHeaderSchema>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.jsonFarcasterSignatureHeaderSchema = exports.encodedJsonFarcasterSignatureSchema = exports.aspectRatioSchema = exports.domainSchema = exports.hexColorSchema = exports.caip19TokenSchema = exports.buttonTitleSchema = exports.frameNameSchema = exports.secureUrlSchema = exports.createSimpleStringSchema = void 0;
4
- const zod_1 = require("zod");
4
+ const v4_1 = require("zod/v4");
5
5
  const SPECIAL_CHARS_PATTERN = /[@#$%^&*+=\/\\|~«»]/;
6
6
  const REPEATED_PUNCTUATION_PATTERN = /(!{2,}|\?{2,}|-{2,})/;
7
7
  // Unicode ranges for emoji detection:
@@ -12,11 +12,11 @@ const REPEATED_PUNCTUATION_PATTERN = /(!{2,}|\?{2,}|-{2,})/;
12
12
  const EMOJI_PATTERN = /[\u{1F300}-\u{1F9FF}]|[\u{2702}-\u{27B0}]|[\u{2600}-\u{26FF}]|[\u{2B00}-\u{2BFF}]/u;
13
13
  const createSimpleStringSchema = ({ max, noSpaces, } = {}) => {
14
14
  const stringValidations = noSpaces
15
- ? zod_1.z
15
+ ? v4_1.z
16
16
  .string()
17
17
  .max(max ?? Number.POSITIVE_INFINITY)
18
18
  .regex(/^\S*$/, 'Spaces are not allowed')
19
- : zod_1.z.string().max(max ?? Number.POSITIVE_INFINITY);
19
+ : v4_1.z.string().max(max ?? Number.POSITIVE_INFINITY);
20
20
  return stringValidations
21
21
  .refine((value) => !EMOJI_PATTERN.test(value), {
22
22
  message: 'Emojis and symbols are not allowed',
@@ -29,7 +29,7 @@ const createSimpleStringSchema = ({ max, noSpaces, } = {}) => {
29
29
  });
30
30
  };
31
31
  exports.createSimpleStringSchema = createSimpleStringSchema;
32
- exports.secureUrlSchema = zod_1.z
32
+ exports.secureUrlSchema = v4_1.z
33
33
  .string()
34
34
  .url()
35
35
  .startsWith('https://', { message: 'Must be an https url' })
@@ -61,13 +61,13 @@ exports.secureUrlSchema = zod_1.z
61
61
  }, {
62
62
  message: 'URL must not use IP addresses or localhost',
63
63
  });
64
- exports.frameNameSchema = zod_1.z.string().max(32);
65
- exports.buttonTitleSchema = zod_1.z.string().max(32);
64
+ exports.frameNameSchema = v4_1.z.string().max(32);
65
+ exports.buttonTitleSchema = v4_1.z.string().max(32);
66
66
  const CAIP_19_REGEX = /^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/(?:[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}(?:\/[-.%a-zA-Z0-9]{1,78})?|native)$/;
67
- exports.caip19TokenSchema = zod_1.z
67
+ exports.caip19TokenSchema = v4_1.z
68
68
  .string()
69
69
  .regex(CAIP_19_REGEX, { message: 'Invalid CAIP-19 asset ID' });
70
- exports.hexColorSchema = zod_1.z
70
+ exports.hexColorSchema = v4_1.z
71
71
  .string()
72
72
  .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, {
73
73
  message: 'Invalid hex color code. It should be in the format #RRGGBB or #RGB.',
@@ -79,7 +79,7 @@ exports.hexColorSchema = zod_1.z
79
79
  // - Must have at least one dot (TLD required)
80
80
  // - TLD must be at least 2 characters and only letters
81
81
  const DOMAIN_REGEX = /^(?!.*\.\.)([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
82
- exports.domainSchema = zod_1.z
82
+ exports.domainSchema = v4_1.z
83
83
  .string()
84
84
  .max(1024)
85
85
  .regex(DOMAIN_REGEX, {
@@ -97,14 +97,14 @@ exports.domainSchema = zod_1.z
97
97
  .refine((value) => !value.includes(':'), {
98
98
  message: 'Domain must not include port numbers',
99
99
  });
100
- exports.aspectRatioSchema = zod_1.z.union([zod_1.z.literal('1:1'), zod_1.z.literal('3:2')]);
101
- exports.encodedJsonFarcasterSignatureSchema = zod_1.z.object({
102
- header: zod_1.z.string(),
103
- payload: zod_1.z.string(),
104
- signature: zod_1.z.string(),
100
+ exports.aspectRatioSchema = v4_1.z.union([v4_1.z.literal('1:1'), v4_1.z.literal('3:2')]);
101
+ exports.encodedJsonFarcasterSignatureSchema = v4_1.z.object({
102
+ header: v4_1.z.string(),
103
+ payload: v4_1.z.string(),
104
+ signature: v4_1.z.string(),
105
105
  });
106
- exports.jsonFarcasterSignatureHeaderSchema = zod_1.z.object({
107
- fid: zod_1.z.number(),
108
- type: zod_1.z.literal('app_key'),
109
- key: zod_1.z.string().startsWith('0x'),
106
+ exports.jsonFarcasterSignatureHeaderSchema = v4_1.z.object({
107
+ fid: v4_1.z.number(),
108
+ type: v4_1.z.literal('app_key'),
109
+ key: v4_1.z.string().startsWith('0x'),
110
110
  });
@@ -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.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
6
- splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
5
+ url: z.ZodOptional<z.ZodString>;
6
+ splashImageUrl: z.ZodOptional<z.ZodString>;
7
7
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
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
- }>;
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
- }, "strip", z.ZodTypeAny, {
25
- type: "view_token";
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.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
35
- splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
16
+ url: z.ZodOptional<z.ZodString>;
17
+ splashImageUrl: z.ZodOptional<z.ZodString>;
36
18
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
37
- }, "strip", z.ZodTypeAny, {
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
- }, "strip", z.ZodTypeAny, {
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<"type", [z.ZodObject<{
25
+ action: z.ZodDiscriminatedUnion<[z.ZodObject<{
62
26
  type: z.ZodLiteral<"launch_frame">;
63
27
  name: z.ZodString;
64
- url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
65
- splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
28
+ url: z.ZodOptional<z.ZodString>;
29
+ splashImageUrl: z.ZodOptional<z.ZodString>;
66
30
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
67
- }, "strip", z.ZodTypeAny, {
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
- }, "strip", z.ZodTypeAny, {
83
- type: "view_token";
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.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
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<"type", [z.ZodObject<{
42
+ action: z.ZodDiscriminatedUnion<[z.ZodObject<{
121
43
  type: z.ZodLiteral<"launch_frame">;
122
44
  name: z.ZodString;
123
- url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
124
- splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
45
+ url: z.ZodOptional<z.ZodString>;
46
+ splashImageUrl: z.ZodOptional<z.ZodString>;
125
47
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
126
- }, "strip", z.ZodTypeAny, {
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
- }, "strip", z.ZodTypeAny, {
142
- type: "view_token";
143
- token: string;
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: {
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { z } from 'zod/v4';
2
2
  import { aspectRatioSchema, buttonTitleSchema, caip19TokenSchema, frameNameSchema, hexColorSchema, secureUrlSchema, } from "./shared.js";
3
3
  export const actionLaunchFrameSchema = z.object({
4
4
  type: z.literal('launch_frame'),
@@ -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
- }, "strip", z.ZodTypeAny, {
8
- url: string;
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
- }, "strip", z.ZodTypeAny, {
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
- }, "strip", z.ZodTypeAny, {
42
- url: string;
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
- }, "strip", z.ZodTypeAny, {
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<"event", [z.ZodObject<{
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
- }, "strip", z.ZodTypeAny, {
76
- url: string;
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
- }, "strip", z.ZodTypeAny, {
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
- }, "strip", z.ZodTypeAny, {
106
- url: string;
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
- }, "strip", z.ZodTypeAny, {
127
- event: "notifications_disabled";
128
- }, {
129
- event: "notifications_disabled";
130
- }>]>;
42
+ }, z.core.$strip>]>;
131
43
  export type FrameServerEvent = z.infer<typeof serverEventSchema>;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { z } from 'zod/v4';
2
2
  import { notificationDetailsSchema } from "./notifications.js";
3
3
  export const eventFrameAddedSchema = z.object({
4
4
  event: z.literal('frame_added'),