@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.
Files changed (51) hide show
  1. package/dist/actions/index.d.ts +1 -1
  2. package/dist/actions/index.js +2 -2
  3. package/dist/index.d.ts +3 -3
  4. package/dist/index.js +4 -4
  5. package/dist/schemas/embeds.d.ts +324 -40
  6. package/dist/schemas/embeds.js +11 -11
  7. package/dist/schemas/events.d.ts +156 -24
  8. package/dist/schemas/events.js +14 -14
  9. package/dist/schemas/index.d.ts +1 -1
  10. package/dist/schemas/index.js +1 -1
  11. package/dist/schemas/manifest.d.ts +750 -220
  12. package/dist/schemas/manifest.js +22 -16
  13. package/dist/schemas/notifications.d.ts +48 -10
  14. package/dist/schemas/notifications.js +14 -14
  15. package/dist/schemas/shared.d.ts +23 -7
  16. package/dist/schemas/shared.js +19 -19
  17. package/dist/solanaWire.js +1 -1
  18. package/dist/types.d.ts +1 -1
  19. package/dist/types.js +2 -2
  20. package/esm/actions/index.d.ts +1 -1
  21. package/esm/actions/index.js +1 -1
  22. package/esm/index.d.ts +3 -3
  23. package/esm/index.js +3 -3
  24. package/esm/schemas/embeds.d.ts +324 -40
  25. package/esm/schemas/embeds.js +1 -1
  26. package/esm/schemas/events.d.ts +156 -24
  27. package/esm/schemas/events.js +1 -1
  28. package/esm/schemas/index.d.ts +1 -1
  29. package/esm/schemas/index.js +1 -1
  30. package/esm/schemas/manifest.d.ts +750 -220
  31. package/esm/schemas/manifest.js +7 -1
  32. package/esm/schemas/notifications.d.ts +48 -10
  33. package/esm/schemas/notifications.js +1 -1
  34. package/esm/schemas/shared.d.ts +23 -7
  35. package/esm/schemas/shared.js +2 -2
  36. package/esm/solanaWire.js +1 -1
  37. package/esm/tsconfig.tsbuildinfo +1 -1
  38. package/esm/types.d.ts +1 -1
  39. package/esm/types.js +1 -1
  40. package/package.json +1 -1
  41. package/src/actions/index.ts +1 -1
  42. package/src/index.ts +3 -3
  43. package/src/schemas/embeds.ts +1 -1
  44. package/src/schemas/events.ts +1 -1
  45. package/src/schemas/index.ts +1 -1
  46. package/src/schemas/manifest.ts +7 -1
  47. package/src/schemas/notifications.ts +1 -1
  48. package/src/schemas/shared.ts +6 -3
  49. package/src/solana.ts +1 -3
  50. package/src/solanaWire.ts +1 -1
  51. package/src/types.ts +1 -1
@@ -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,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 v4_1 = require("zod/v4");
4
+ const zod_1 = require("zod");
5
5
  const notifications_ts_1 = require("./notifications.js");
6
- exports.eventMiniAppAddedSchema = v4_1.z.object({
7
- event: v4_1.z.literal('miniapp_added'),
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 = v4_1.z.object({
11
- event: v4_1.z.literal('frame_added'),
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 = v4_1.z.object({
15
- event: v4_1.z.literal('miniapp_removed'),
14
+ exports.eventMiniAppRemovedSchema = zod_1.z.object({
15
+ event: zod_1.z.literal('miniapp_removed'),
16
16
  });
17
- exports.eventFrameRemovedSchema = v4_1.z.object({
18
- event: v4_1.z.literal('frame_removed'),
17
+ exports.eventFrameRemovedSchema = zod_1.z.object({
18
+ event: zod_1.z.literal('frame_removed'),
19
19
  });
20
- exports.eventNotificationsEnabledSchema = v4_1.z.object({
21
- event: v4_1.z.literal('notifications_enabled'),
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 = v4_1.z.object({
25
- event: v4_1.z.literal('notifications_disabled'),
24
+ exports.notificationsDisabledSchema = zod_1.z.object({
25
+ event: zod_1.z.literal('notifications_disabled'),
26
26
  });
27
- exports.serverEventSchema = v4_1.z.discriminatedUnion('event', [
27
+ exports.serverEventSchema = zod_1.z.discriminatedUnion('event', [
28
28
  exports.eventMiniAppAddedSchema,
29
29
  exports.eventMiniAppRemovedSchema,
30
30
  exports.eventNotificationsEnabledSchema,
@@ -1,5 +1,5 @@
1
1
  export * from './embeds.ts';
2
2
  export * from './events.ts';
3
- export * from './shared.ts';
4
3
  export * from './manifest.ts';
5
4
  export * from './notifications.ts';
5
+ export * from './shared.ts';
@@ -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);