@farcaster/miniapp-core 0.3.0 → 0.3.2
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/actions/index.d.ts +1 -1
- package/dist/actions/index.js +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/schemas/embeds.d.ts +324 -40
- package/dist/schemas/embeds.js +11 -11
- package/dist/schemas/events.d.ts +156 -24
- package/dist/schemas/events.js +14 -14
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/manifest.d.ts +750 -220
- package/dist/schemas/manifest.js +22 -16
- package/dist/schemas/notifications.d.ts +48 -10
- package/dist/schemas/notifications.js +14 -14
- package/dist/schemas/shared.d.ts +23 -7
- package/dist/schemas/shared.js +19 -19
- package/dist/solanaWire.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +2 -2
- package/esm/actions/index.d.ts +1 -1
- package/esm/actions/index.js +1 -1
- package/esm/index.d.ts +3 -3
- package/esm/index.js +3 -3
- package/esm/schemas/embeds.d.ts +324 -40
- package/esm/schemas/embeds.js +1 -1
- package/esm/schemas/events.d.ts +156 -24
- package/esm/schemas/events.js +1 -1
- package/esm/schemas/index.d.ts +1 -1
- package/esm/schemas/index.js +1 -1
- package/esm/schemas/manifest.d.ts +750 -220
- package/esm/schemas/manifest.js +7 -1
- package/esm/schemas/notifications.d.ts +48 -10
- package/esm/schemas/notifications.js +1 -1
- package/esm/schemas/shared.d.ts +23 -7
- package/esm/schemas/shared.js +2 -2
- package/esm/solanaWire.js +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/esm/types.d.ts +1 -1
- package/esm/types.js +1 -1
- package/package.json +1 -1
- package/src/actions/index.ts +1 -1
- package/src/index.ts +3 -3
- package/src/schemas/embeds.ts +1 -1
- package/src/schemas/events.ts +1 -1
- package/src/schemas/index.ts +1 -1
- package/src/schemas/manifest.ts +7 -1
- package/src/schemas/notifications.ts +1 -1
- package/src/schemas/shared.ts +6 -3
- package/src/solana.ts +1 -3
- package/src/solanaWire.ts +1 -1
- package/src/types.ts +1 -1
package/dist/schemas/events.d.ts
CHANGED
|
@@ -1,63 +1,195 @@
|
|
|
1
|
-
import { z } from 'zod
|
|
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.
|
|
8
|
-
|
|
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.
|
|
16
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
30
|
-
token: z.
|
|
31
|
-
}, z.
|
|
32
|
-
|
|
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.
|
|
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.
|
|
44
|
-
|
|
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
|
-
},
|
|
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.
|
|
50
|
-
token: z.
|
|
51
|
-
}, z.
|
|
52
|
-
|
|
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
|
-
},
|
|
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.
|
|
60
|
-
|
|
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.
|
|
190
|
+
}, "strip", z.ZodTypeAny, {
|
|
191
|
+
event: "frame_removed";
|
|
192
|
+
}, {
|
|
193
|
+
event: "frame_removed";
|
|
194
|
+
}>]>;
|
|
63
195
|
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 zod_1 = require("zod");
|
|
5
5
|
const notifications_ts_1 = require("./notifications.js");
|
|
6
|
-
exports.eventMiniAppAddedSchema =
|
|
7
|
-
event:
|
|
6
|
+
exports.eventMiniAppAddedSchema = zod_1.z.object({
|
|
7
|
+
event: zod_1.z.literal('miniapp_added'),
|
|
8
8
|
notificationDetails: notifications_ts_1.notificationDetailsSchema.optional(),
|
|
9
9
|
});
|
|
10
|
-
exports.eventFrameAddedSchema =
|
|
11
|
-
event:
|
|
10
|
+
exports.eventFrameAddedSchema = zod_1.z.object({
|
|
11
|
+
event: zod_1.z.literal('frame_added'),
|
|
12
12
|
notificationDetails: notifications_ts_1.notificationDetailsSchema.optional(),
|
|
13
13
|
});
|
|
14
|
-
exports.eventMiniAppRemovedSchema =
|
|
15
|
-
event:
|
|
14
|
+
exports.eventMiniAppRemovedSchema = zod_1.z.object({
|
|
15
|
+
event: zod_1.z.literal('miniapp_removed'),
|
|
16
16
|
});
|
|
17
|
-
exports.eventFrameRemovedSchema =
|
|
18
|
-
event:
|
|
17
|
+
exports.eventFrameRemovedSchema = zod_1.z.object({
|
|
18
|
+
event: zod_1.z.literal('frame_removed'),
|
|
19
19
|
});
|
|
20
|
-
exports.eventNotificationsEnabledSchema =
|
|
21
|
-
event:
|
|
20
|
+
exports.eventNotificationsEnabledSchema = zod_1.z.object({
|
|
21
|
+
event: zod_1.z.literal('notifications_enabled'),
|
|
22
22
|
notificationDetails: notifications_ts_1.notificationDetailsSchema.required(),
|
|
23
23
|
});
|
|
24
|
-
exports.notificationsDisabledSchema =
|
|
25
|
-
event:
|
|
24
|
+
exports.notificationsDisabledSchema = zod_1.z.object({
|
|
25
|
+
event: zod_1.z.literal('notifications_disabled'),
|
|
26
26
|
});
|
|
27
|
-
exports.serverEventSchema =
|
|
27
|
+
exports.serverEventSchema = zod_1.z.discriminatedUnion('event', [
|
|
28
28
|
exports.eventMiniAppAddedSchema,
|
|
29
29
|
exports.eventMiniAppRemovedSchema,
|
|
30
30
|
exports.eventNotificationsEnabledSchema,
|
package/dist/schemas/index.d.ts
CHANGED
package/dist/schemas/index.js
CHANGED
|
@@ -16,6 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./embeds.js"), exports);
|
|
18
18
|
__exportStar(require("./events.js"), exports);
|
|
19
|
-
__exportStar(require("./shared.js"), exports);
|
|
20
19
|
__exportStar(require("./manifest.js"), exports);
|
|
21
20
|
__exportStar(require("./notifications.js"), exports);
|
|
21
|
+
__exportStar(require("./shared.js"), exports);
|