@farcaster/miniapp-core 0.0.0-canary-20250630230419 → 0.3.0
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 +40 -324
- package/dist/schemas/embeds.js +11 -11
- package/dist/schemas/events.d.ts +24 -156
- package/dist/schemas/events.js +14 -14
- package/dist/schemas/manifest.d.ts +220 -634
- 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 +40 -324
- package/esm/schemas/embeds.js +1 -1
- package/esm/schemas/events.d.ts +24 -156
- package/esm/schemas/events.js +1 -1
- package/esm/schemas/manifest.d.ts +220 -634
- 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 +1 -1
- 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/events.d.ts
CHANGED
|
@@ -1,195 +1,63 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod/v4';
|
|
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
|
-
},
|
|
8
|
-
|
|
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
|
-
}>;
|
|
7
|
+
}, z.core.$strip>>;
|
|
8
|
+
}, z.core.$strip>;
|
|
27
9
|
export type EventMiniAppAdded = z.infer<typeof eventMiniAppAddedSchema>;
|
|
28
10
|
export declare const eventFrameAddedSchema: z.ZodObject<{
|
|
29
11
|
event: z.ZodLiteral<"frame_added">;
|
|
30
12
|
notificationDetails: z.ZodOptional<z.ZodObject<{
|
|
31
13
|
url: z.ZodString;
|
|
32
14
|
token: z.ZodString;
|
|
33
|
-
},
|
|
34
|
-
|
|
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
|
-
}>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
53
17
|
export type EventFrameAdded = z.infer<typeof eventFrameAddedSchema>;
|
|
54
18
|
export declare const eventMiniAppRemovedSchema: z.ZodObject<{
|
|
55
19
|
event: z.ZodLiteral<"miniapp_removed">;
|
|
56
|
-
},
|
|
57
|
-
event: "miniapp_removed";
|
|
58
|
-
}, {
|
|
59
|
-
event: "miniapp_removed";
|
|
60
|
-
}>;
|
|
20
|
+
}, z.core.$strip>;
|
|
61
21
|
export type EventMiniAppRemoved = z.infer<typeof eventMiniAppRemovedSchema>;
|
|
62
22
|
export declare const eventFrameRemovedSchema: z.ZodObject<{
|
|
63
23
|
event: z.ZodLiteral<"frame_removed">;
|
|
64
|
-
},
|
|
65
|
-
event: "frame_removed";
|
|
66
|
-
}, {
|
|
67
|
-
event: "frame_removed";
|
|
68
|
-
}>;
|
|
24
|
+
}, z.core.$strip>;
|
|
69
25
|
export type EventFrameRemoved = z.infer<typeof eventFrameRemovedSchema>;
|
|
70
26
|
export declare const eventNotificationsEnabledSchema: z.ZodObject<{
|
|
71
27
|
event: z.ZodLiteral<"notifications_enabled">;
|
|
72
28
|
notificationDetails: z.ZodObject<{
|
|
73
|
-
url: z.ZodString
|
|
74
|
-
token: z.ZodString
|
|
75
|
-
},
|
|
76
|
-
|
|
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
|
-
}>;
|
|
29
|
+
url: z.ZodNonOptional<z.ZodString>;
|
|
30
|
+
token: z.ZodNonOptional<z.ZodString>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
}, z.core.$strip>;
|
|
95
33
|
export type EventNotificationsEnabled = z.infer<typeof eventNotificationsEnabledSchema>;
|
|
96
34
|
export declare const notificationsDisabledSchema: z.ZodObject<{
|
|
97
35
|
event: z.ZodLiteral<"notifications_disabled">;
|
|
98
|
-
},
|
|
99
|
-
event: "notifications_disabled";
|
|
100
|
-
}, {
|
|
101
|
-
event: "notifications_disabled";
|
|
102
|
-
}>;
|
|
36
|
+
}, z.core.$strip>;
|
|
103
37
|
export type EventNotificationsDisabled = z.infer<typeof notificationsDisabledSchema>;
|
|
104
|
-
export declare const serverEventSchema: z.ZodDiscriminatedUnion<
|
|
38
|
+
export declare const serverEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
105
39
|
event: z.ZodLiteral<"miniapp_added">;
|
|
106
40
|
notificationDetails: z.ZodOptional<z.ZodObject<{
|
|
107
41
|
url: z.ZodString;
|
|
108
42
|
token: z.ZodString;
|
|
109
|
-
},
|
|
110
|
-
|
|
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<{
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
129
45
|
event: z.ZodLiteral<"miniapp_removed">;
|
|
130
|
-
},
|
|
131
|
-
event: "miniapp_removed";
|
|
132
|
-
}, {
|
|
133
|
-
event: "miniapp_removed";
|
|
134
|
-
}>, z.ZodObject<{
|
|
46
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
135
47
|
event: z.ZodLiteral<"notifications_enabled">;
|
|
136
48
|
notificationDetails: z.ZodObject<{
|
|
137
|
-
url: z.ZodString
|
|
138
|
-
token: z.ZodString
|
|
139
|
-
},
|
|
140
|
-
|
|
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<{
|
|
49
|
+
url: z.ZodNonOptional<z.ZodString>;
|
|
50
|
+
token: z.ZodNonOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
159
53
|
event: z.ZodLiteral<"notifications_disabled">;
|
|
160
|
-
},
|
|
161
|
-
event: "notifications_disabled";
|
|
162
|
-
}, {
|
|
163
|
-
event: "notifications_disabled";
|
|
164
|
-
}>, z.ZodObject<{
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
165
55
|
event: z.ZodLiteral<"frame_added">;
|
|
166
56
|
notificationDetails: z.ZodOptional<z.ZodObject<{
|
|
167
57
|
url: z.ZodString;
|
|
168
58
|
token: z.ZodString;
|
|
169
|
-
},
|
|
170
|
-
|
|
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<{
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
189
61
|
event: z.ZodLiteral<"frame_removed">;
|
|
190
|
-
},
|
|
191
|
-
event: "frame_removed";
|
|
192
|
-
}, {
|
|
193
|
-
event: "frame_removed";
|
|
194
|
-
}>]>;
|
|
62
|
+
}, z.core.$strip>]>;
|
|
195
63
|
export type MiniAppServerEvent = z.infer<typeof serverEventSchema>;
|
package/dist/schemas/events.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.serverEventSchema = exports.notificationsDisabledSchema = exports.eventNotificationsEnabledSchema = exports.eventFrameRemovedSchema = exports.eventMiniAppRemovedSchema = exports.eventFrameAddedSchema = exports.eventMiniAppAddedSchema = void 0;
|
|
4
|
-
const
|
|
4
|
+
const v4_1 = require("zod/v4");
|
|
5
5
|
const notifications_ts_1 = require("./notifications.js");
|
|
6
|
-
exports.eventMiniAppAddedSchema =
|
|
7
|
-
event:
|
|
6
|
+
exports.eventMiniAppAddedSchema = v4_1.z.object({
|
|
7
|
+
event: v4_1.z.literal('miniapp_added'),
|
|
8
8
|
notificationDetails: notifications_ts_1.notificationDetailsSchema.optional(),
|
|
9
9
|
});
|
|
10
|
-
exports.eventFrameAddedSchema =
|
|
11
|
-
event:
|
|
10
|
+
exports.eventFrameAddedSchema = v4_1.z.object({
|
|
11
|
+
event: v4_1.z.literal('frame_added'),
|
|
12
12
|
notificationDetails: notifications_ts_1.notificationDetailsSchema.optional(),
|
|
13
13
|
});
|
|
14
|
-
exports.eventMiniAppRemovedSchema =
|
|
15
|
-
event:
|
|
14
|
+
exports.eventMiniAppRemovedSchema = v4_1.z.object({
|
|
15
|
+
event: v4_1.z.literal('miniapp_removed'),
|
|
16
16
|
});
|
|
17
|
-
exports.eventFrameRemovedSchema =
|
|
18
|
-
event:
|
|
17
|
+
exports.eventFrameRemovedSchema = v4_1.z.object({
|
|
18
|
+
event: v4_1.z.literal('frame_removed'),
|
|
19
19
|
});
|
|
20
|
-
exports.eventNotificationsEnabledSchema =
|
|
21
|
-
event:
|
|
20
|
+
exports.eventNotificationsEnabledSchema = v4_1.z.object({
|
|
21
|
+
event: v4_1.z.literal('notifications_enabled'),
|
|
22
22
|
notificationDetails: notifications_ts_1.notificationDetailsSchema.required(),
|
|
23
23
|
});
|
|
24
|
-
exports.notificationsDisabledSchema =
|
|
25
|
-
event:
|
|
24
|
+
exports.notificationsDisabledSchema = v4_1.z.object({
|
|
25
|
+
event: v4_1.z.literal('notifications_disabled'),
|
|
26
26
|
});
|
|
27
|
-
exports.serverEventSchema =
|
|
27
|
+
exports.serverEventSchema = v4_1.z.discriminatedUnion('event', [
|
|
28
28
|
exports.eventMiniAppAddedSchema,
|
|
29
29
|
exports.eventMiniAppRemovedSchema,
|
|
30
30
|
exports.eventNotificationsEnabledSchema,
|