@farcaster/frame-core 0.0.29 → 0.0.32
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/README.md +13 -0
- package/dist/actions/ComposeCast.d.ts +32 -0
- package/dist/actions/ComposeCast.js +2 -0
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.js +2 -1
- package/dist/errors.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/manifest.d.ts +101 -0
- package/dist/manifest.js +2 -0
- package/dist/schemas/embeds.d.ts +20 -20
- package/dist/schemas/embeds.js +1 -1
- package/dist/schemas/manifest.d.ts +92 -6
- package/dist/schemas/manifest.js +31 -0
- package/dist/schemas/shared.d.ts +4 -0
- package/dist/schemas/shared.js +29 -2
- package/dist/types.d.ts +3 -1
- package/dist/wallet/ethereum.d.ts +5 -1
- package/esm/actions/AddFrame.d.ts +23 -27
- package/esm/actions/AddFrame.js +9 -9
- package/esm/actions/ComposeCast.d.ts +32 -0
- package/esm/actions/ComposeCast.js +1 -0
- package/esm/actions/Ready.d.ts +11 -11
- package/esm/actions/Ready.js +2 -2
- package/esm/actions/SignIn.d.ts +33 -35
- package/esm/actions/SignIn.js +5 -5
- package/esm/actions/Swap.d.ts +43 -44
- package/esm/actions/Swap.js +1 -1
- package/esm/actions/ViewProfile.d.ts +3 -3
- package/esm/actions/ViewProfile.js +1 -1
- package/esm/actions/ViewToken.d.ts +3 -3
- package/esm/actions/ViewToken.js +1 -1
- package/esm/actions/index.d.ts +7 -6
- package/esm/actions/index.js +7 -6
- package/esm/context.d.ts +61 -65
- package/esm/context.js +1 -1
- package/esm/errors.d.ts +10 -9
- package/esm/errors.js +6 -6
- package/esm/index.d.ts +7 -5
- package/esm/index.js +7 -5
- package/esm/internal/types.d.ts +7 -18
- package/esm/internal/types.js +1 -1
- package/esm/manifest.d.ts +101 -0
- package/esm/manifest.js +1 -0
- package/esm/schemas/embeds.d.ts +239 -346
- package/esm/schemas/embeds.js +23 -31
- package/esm/schemas/events.d.ts +129 -225
- package/esm/schemas/events.js +17 -17
- package/esm/schemas/index.d.ts +5 -5
- package/esm/schemas/index.js +5 -5
- package/esm/schemas/manifest.d.ts +196 -154
- package/esm/schemas/manifest.js +54 -29
- package/esm/schemas/notifications.d.ts +58 -86
- package/esm/schemas/notifications.js +17 -17
- package/esm/schemas/shared.d.ts +39 -53
- package/esm/schemas/shared.js +49 -25
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/esm/types.d.ts +53 -70
- package/esm/types.js +2 -2
- package/esm/wallet/ethereum.d.ts +39 -50
- package/esm/wallet/ethereum.js +1 -1
- package/esm/wallet/index.d.ts +1 -1
- package/esm/wallet/index.js +1 -1
- package/package.json +1 -1
- package/src/actions/ComposeCast.ts +36 -0
- package/src/actions/index.ts +1 -0
- package/src/errors.ts +4 -0
- package/src/index.ts +2 -0
- package/src/manifest.ts +113 -0
- package/src/schemas/embeds.ts +1 -1
- package/src/schemas/manifest.ts +33 -0
- package/src/schemas/shared.ts +36 -1
- package/src/types.ts +7 -0
- package/src/wallet/ethereum.ts +5 -1
|
@@ -1,156 +1,198 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const domainFrameConfigSchema: z.ZodObject<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
z.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const domainFrameConfigSchema: z.ZodObject<{
|
|
3
|
+
version: z.ZodUnion<[z.ZodLiteral<"0.0.0">, z.ZodLiteral<"0.0.1">, z.ZodLiteral<"1">, z.ZodLiteral<"next">]>;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
iconUrl: z.ZodString;
|
|
6
|
+
homeUrl: z.ZodString;
|
|
7
|
+
/** deprecated, set ogImageUrl instead */
|
|
8
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
9
|
+
/** deprecated, will rely on fc:frame meta tag */
|
|
10
|
+
buttonTitle: z.ZodOptional<z.ZodString>;
|
|
11
|
+
splashImageUrl: z.ZodOptional<z.ZodString>;
|
|
12
|
+
splashBackgroundColor: z.ZodOptional<z.ZodString>;
|
|
13
|
+
webhookUrl: z.ZodOptional<z.ZodString>;
|
|
14
|
+
/** see: https://github.com/farcasterxyz/miniapps/discussions/191 */
|
|
15
|
+
subtitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
16
|
+
description: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
17
|
+
screenshotUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
18
|
+
primaryCategory: z.ZodOptional<z.ZodEnum<["games", "social", "finance", "utility", "productivity", "health-fitness", "news-media", "music", "shopping", "education", "developer-tools", "entertainment", "art-creativity"]>>;
|
|
19
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, "many">>;
|
|
20
|
+
heroImageUrl: z.ZodOptional<z.ZodString>;
|
|
21
|
+
tagline: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
22
|
+
ogTitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
23
|
+
ogDescription: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
24
|
+
ogImageUrl: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
name: string;
|
|
27
|
+
version: "next" | "1" | "0.0.0" | "0.0.1";
|
|
28
|
+
iconUrl: string;
|
|
29
|
+
homeUrl: string;
|
|
30
|
+
splashImageUrl?: string | undefined;
|
|
31
|
+
splashBackgroundColor?: string | undefined;
|
|
32
|
+
imageUrl?: string | undefined;
|
|
33
|
+
buttonTitle?: string | undefined;
|
|
34
|
+
webhookUrl?: string | undefined;
|
|
35
|
+
subtitle?: string | undefined;
|
|
36
|
+
description?: string | undefined;
|
|
37
|
+
screenshotUrls?: string[] | undefined;
|
|
38
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
39
|
+
tags?: string[] | undefined;
|
|
40
|
+
heroImageUrl?: string | undefined;
|
|
41
|
+
tagline?: string | undefined;
|
|
42
|
+
ogTitle?: string | undefined;
|
|
43
|
+
ogDescription?: string | undefined;
|
|
44
|
+
ogImageUrl?: string | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
name: string;
|
|
47
|
+
version: "next" | "1" | "0.0.0" | "0.0.1";
|
|
48
|
+
iconUrl: string;
|
|
49
|
+
homeUrl: string;
|
|
50
|
+
splashImageUrl?: string | undefined;
|
|
51
|
+
splashBackgroundColor?: string | undefined;
|
|
52
|
+
imageUrl?: string | undefined;
|
|
53
|
+
buttonTitle?: string | undefined;
|
|
54
|
+
webhookUrl?: string | undefined;
|
|
55
|
+
subtitle?: string | undefined;
|
|
56
|
+
description?: string | undefined;
|
|
57
|
+
screenshotUrls?: string[] | undefined;
|
|
58
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
59
|
+
tags?: string[] | undefined;
|
|
60
|
+
heroImageUrl?: string | undefined;
|
|
61
|
+
tagline?: string | undefined;
|
|
62
|
+
ogTitle?: string | undefined;
|
|
63
|
+
ogDescription?: string | undefined;
|
|
64
|
+
ogImageUrl?: string | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
export declare const domainManifestSchema: z.ZodObject<{
|
|
67
|
+
accountAssociation: z.ZodObject<{
|
|
68
|
+
header: z.ZodString;
|
|
69
|
+
payload: z.ZodString;
|
|
70
|
+
signature: z.ZodString;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
header: string;
|
|
73
|
+
payload: string;
|
|
74
|
+
signature: string;
|
|
75
|
+
}, {
|
|
76
|
+
header: string;
|
|
77
|
+
payload: string;
|
|
78
|
+
signature: string;
|
|
79
|
+
}>;
|
|
80
|
+
frame: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
version: z.ZodUnion<[z.ZodLiteral<"0.0.0">, z.ZodLiteral<"0.0.1">, z.ZodLiteral<"1">, z.ZodLiteral<"next">]>;
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
iconUrl: z.ZodString;
|
|
84
|
+
homeUrl: z.ZodString;
|
|
85
|
+
/** deprecated, set ogImageUrl instead */
|
|
86
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
87
|
+
/** deprecated, will rely on fc:frame meta tag */
|
|
88
|
+
buttonTitle: z.ZodOptional<z.ZodString>;
|
|
89
|
+
splashImageUrl: z.ZodOptional<z.ZodString>;
|
|
90
|
+
splashBackgroundColor: z.ZodOptional<z.ZodString>;
|
|
91
|
+
webhookUrl: z.ZodOptional<z.ZodString>;
|
|
92
|
+
/** see: https://github.com/farcasterxyz/miniapps/discussions/191 */
|
|
93
|
+
subtitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
94
|
+
description: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
95
|
+
screenshotUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
96
|
+
primaryCategory: z.ZodOptional<z.ZodEnum<["games", "social", "finance", "utility", "productivity", "health-fitness", "news-media", "music", "shopping", "education", "developer-tools", "entertainment", "art-creativity"]>>;
|
|
97
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, "many">>;
|
|
98
|
+
heroImageUrl: z.ZodOptional<z.ZodString>;
|
|
99
|
+
tagline: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
100
|
+
ogTitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
101
|
+
ogDescription: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
102
|
+
ogImageUrl: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
name: string;
|
|
105
|
+
version: "next" | "1" | "0.0.0" | "0.0.1";
|
|
106
|
+
iconUrl: string;
|
|
107
|
+
homeUrl: string;
|
|
108
|
+
splashImageUrl?: string | undefined;
|
|
109
|
+
splashBackgroundColor?: string | undefined;
|
|
110
|
+
imageUrl?: string | undefined;
|
|
111
|
+
buttonTitle?: string | undefined;
|
|
112
|
+
webhookUrl?: string | undefined;
|
|
113
|
+
subtitle?: string | undefined;
|
|
114
|
+
description?: string | undefined;
|
|
115
|
+
screenshotUrls?: string[] | undefined;
|
|
116
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
117
|
+
tags?: string[] | undefined;
|
|
118
|
+
heroImageUrl?: string | undefined;
|
|
119
|
+
tagline?: string | undefined;
|
|
120
|
+
ogTitle?: string | undefined;
|
|
121
|
+
ogDescription?: string | undefined;
|
|
122
|
+
ogImageUrl?: string | undefined;
|
|
123
|
+
}, {
|
|
124
|
+
name: string;
|
|
125
|
+
version: "next" | "1" | "0.0.0" | "0.0.1";
|
|
126
|
+
iconUrl: string;
|
|
127
|
+
homeUrl: string;
|
|
128
|
+
splashImageUrl?: string | undefined;
|
|
129
|
+
splashBackgroundColor?: string | undefined;
|
|
130
|
+
imageUrl?: string | undefined;
|
|
131
|
+
buttonTitle?: string | undefined;
|
|
132
|
+
webhookUrl?: string | undefined;
|
|
133
|
+
subtitle?: string | undefined;
|
|
134
|
+
description?: string | undefined;
|
|
135
|
+
screenshotUrls?: string[] | undefined;
|
|
136
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
137
|
+
tags?: string[] | undefined;
|
|
138
|
+
heroImageUrl?: string | undefined;
|
|
139
|
+
tagline?: string | undefined;
|
|
140
|
+
ogTitle?: string | undefined;
|
|
141
|
+
ogDescription?: string | undefined;
|
|
142
|
+
ogImageUrl?: string | undefined;
|
|
143
|
+
}>>;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
145
|
accountAssociation: {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
frame?:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
146
|
+
header: string;
|
|
147
|
+
payload: string;
|
|
148
|
+
signature: string;
|
|
149
|
+
};
|
|
150
|
+
frame?: {
|
|
151
|
+
name: string;
|
|
152
|
+
version: "next" | "1" | "0.0.0" | "0.0.1";
|
|
153
|
+
iconUrl: string;
|
|
154
|
+
homeUrl: string;
|
|
155
|
+
splashImageUrl?: string | undefined;
|
|
156
|
+
splashBackgroundColor?: string | undefined;
|
|
157
|
+
imageUrl?: string | undefined;
|
|
158
|
+
buttonTitle?: string | undefined;
|
|
159
|
+
webhookUrl?: string | undefined;
|
|
160
|
+
subtitle?: string | undefined;
|
|
161
|
+
description?: string | undefined;
|
|
162
|
+
screenshotUrls?: string[] | undefined;
|
|
163
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
164
|
+
tags?: string[] | undefined;
|
|
165
|
+
heroImageUrl?: string | undefined;
|
|
166
|
+
tagline?: string | undefined;
|
|
167
|
+
ogTitle?: string | undefined;
|
|
168
|
+
ogDescription?: string | undefined;
|
|
169
|
+
ogImageUrl?: string | undefined;
|
|
170
|
+
} | undefined;
|
|
171
|
+
}, {
|
|
137
172
|
accountAssociation: {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
frame?:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
173
|
+
header: string;
|
|
174
|
+
payload: string;
|
|
175
|
+
signature: string;
|
|
176
|
+
};
|
|
177
|
+
frame?: {
|
|
178
|
+
name: string;
|
|
179
|
+
version: "next" | "1" | "0.0.0" | "0.0.1";
|
|
180
|
+
iconUrl: string;
|
|
181
|
+
homeUrl: string;
|
|
182
|
+
splashImageUrl?: string | undefined;
|
|
183
|
+
splashBackgroundColor?: string | undefined;
|
|
184
|
+
imageUrl?: string | undefined;
|
|
185
|
+
buttonTitle?: string | undefined;
|
|
186
|
+
webhookUrl?: string | undefined;
|
|
187
|
+
subtitle?: string | undefined;
|
|
188
|
+
description?: string | undefined;
|
|
189
|
+
screenshotUrls?: string[] | undefined;
|
|
190
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
191
|
+
tags?: string[] | undefined;
|
|
192
|
+
heroImageUrl?: string | undefined;
|
|
193
|
+
tagline?: string | undefined;
|
|
194
|
+
ogTitle?: string | undefined;
|
|
195
|
+
ogDescription?: string | undefined;
|
|
196
|
+
ogImageUrl?: string | undefined;
|
|
197
|
+
} | undefined;
|
|
198
|
+
}>;
|
package/esm/schemas/manifest.js
CHANGED
|
@@ -1,31 +1,56 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { buttonTitleSchema, createSimpleStringSchema, encodedJsonFarcasterSignatureSchema, frameNameSchema, hexColorSchema, secureUrlSchema, } from './shared';
|
|
3
|
+
const primaryCategorySchema = z.enum([
|
|
4
|
+
'games',
|
|
5
|
+
'social',
|
|
6
|
+
'finance',
|
|
7
|
+
'utility',
|
|
8
|
+
'productivity',
|
|
9
|
+
'health-fitness',
|
|
10
|
+
'news-media',
|
|
11
|
+
'music',
|
|
12
|
+
'shopping',
|
|
13
|
+
'education',
|
|
14
|
+
'developer-tools',
|
|
15
|
+
'entertainment',
|
|
16
|
+
'art-creativity',
|
|
17
|
+
]);
|
|
9
18
|
export const domainFrameConfigSchema = z.object({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
// 0.0.0 and 0.0.1 are not technically part of the spec but kept for
|
|
20
|
+
// backwards compatibilty. next should always resolve to the most recent
|
|
21
|
+
// schema version.
|
|
22
|
+
version: z.union([
|
|
23
|
+
z.literal('0.0.0'),
|
|
24
|
+
z.literal('0.0.1'),
|
|
25
|
+
z.literal('1'),
|
|
26
|
+
z.literal('next'),
|
|
27
|
+
]),
|
|
28
|
+
name: frameNameSchema,
|
|
29
|
+
iconUrl: secureUrlSchema,
|
|
30
|
+
homeUrl: secureUrlSchema,
|
|
31
|
+
/** deprecated, set ogImageUrl instead */
|
|
32
|
+
imageUrl: secureUrlSchema.optional(),
|
|
33
|
+
/** deprecated, will rely on fc:frame meta tag */
|
|
34
|
+
buttonTitle: buttonTitleSchema.optional(),
|
|
35
|
+
splashImageUrl: secureUrlSchema.optional(),
|
|
36
|
+
splashBackgroundColor: hexColorSchema.optional(),
|
|
37
|
+
webhookUrl: secureUrlSchema.optional(),
|
|
38
|
+
/** see: https://github.com/farcasterxyz/miniapps/discussions/191 */
|
|
39
|
+
subtitle: createSimpleStringSchema({ max: 30 }).optional(),
|
|
40
|
+
description: createSimpleStringSchema({ max: 170 }).optional(),
|
|
41
|
+
screenshotUrls: z.array(secureUrlSchema).max(3).optional(),
|
|
42
|
+
primaryCategory: primaryCategorySchema.optional(),
|
|
43
|
+
tags: z
|
|
44
|
+
.array(createSimpleStringSchema({ max: 20, noSpaces: true }))
|
|
45
|
+
.max(5)
|
|
46
|
+
.optional(),
|
|
47
|
+
heroImageUrl: secureUrlSchema.optional(),
|
|
48
|
+
tagline: createSimpleStringSchema({ max: 30 }).optional(),
|
|
49
|
+
ogTitle: createSimpleStringSchema({ max: 30 }).optional(),
|
|
50
|
+
ogDescription: createSimpleStringSchema({ max: 100 }).optional(),
|
|
51
|
+
ogImageUrl: secureUrlSchema.optional(),
|
|
52
|
+
});
|
|
28
53
|
export const domainManifestSchema = z.object({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
})
|
|
54
|
+
accountAssociation: encodedJsonFarcasterSignatureSchema,
|
|
55
|
+
frame: domainFrameConfigSchema.optional(),
|
|
56
|
+
});
|
|
@@ -1,88 +1,60 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const notificationDetailsSchema: z.ZodObject<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
notificationId:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{
|
|
49
|
-
result: z.ZodObject<
|
|
50
|
-
{
|
|
51
|
-
successfulTokens: z.ZodArray<z.ZodString, 'many'>
|
|
52
|
-
invalidTokens: z.ZodArray<z.ZodString, 'many'>
|
|
53
|
-
rateLimitedTokens: z.ZodArray<z.ZodString, 'many'>
|
|
54
|
-
},
|
|
55
|
-
'strip',
|
|
56
|
-
z.ZodTypeAny,
|
|
57
|
-
{
|
|
58
|
-
successfulTokens: string[]
|
|
59
|
-
invalidTokens: string[]
|
|
60
|
-
rateLimitedTokens: string[]
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
successfulTokens: string[]
|
|
64
|
-
invalidTokens: string[]
|
|
65
|
-
rateLimitedTokens: string[]
|
|
66
|
-
}
|
|
67
|
-
>
|
|
68
|
-
},
|
|
69
|
-
'strip',
|
|
70
|
-
z.ZodTypeAny,
|
|
71
|
-
{
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const notificationDetailsSchema: z.ZodObject<{
|
|
3
|
+
url: z.ZodString;
|
|
4
|
+
token: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
url: string;
|
|
7
|
+
token: string;
|
|
8
|
+
}, {
|
|
9
|
+
url: string;
|
|
10
|
+
token: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type FrameNotificationDetails = z.infer<typeof notificationDetailsSchema>;
|
|
13
|
+
export declare const sendNotificationRequestSchema: z.ZodObject<{
|
|
14
|
+
notificationId: z.ZodString;
|
|
15
|
+
title: z.ZodString;
|
|
16
|
+
body: z.ZodString;
|
|
17
|
+
targetUrl: z.ZodString;
|
|
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
|
+
}>;
|
|
32
|
+
export type SendNotificationRequest = z.infer<typeof sendNotificationRequestSchema>;
|
|
33
|
+
export declare const sendNotificationResponseSchema: z.ZodObject<{
|
|
34
|
+
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, {
|
|
72
48
|
result: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
{
|
|
49
|
+
successfulTokens: string[];
|
|
50
|
+
invalidTokens: string[];
|
|
51
|
+
rateLimitedTokens: string[];
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
79
54
|
result: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
export type SendNotificationResponse = z.infer<
|
|
87
|
-
typeof sendNotificationResponseSchema
|
|
88
|
-
>
|
|
55
|
+
successfulTokens: string[];
|
|
56
|
+
invalidTokens: string[];
|
|
57
|
+
rateLimitedTokens: string[];
|
|
58
|
+
};
|
|
59
|
+
}>;
|
|
60
|
+
export type SendNotificationResponse = z.infer<typeof sendNotificationResponseSchema>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
2
|
-
import { secureUrlSchema } from './shared'
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { secureUrlSchema } from './shared';
|
|
3
3
|
export const notificationDetailsSchema = z.object({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
})
|
|
4
|
+
url: z.string(),
|
|
5
|
+
token: z.string(),
|
|
6
|
+
});
|
|
7
7
|
export const sendNotificationRequestSchema = z.object({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
8
|
+
notificationId: z.string().max(128),
|
|
9
|
+
title: z.string().max(32),
|
|
10
|
+
body: z.string().max(128),
|
|
11
|
+
targetUrl: secureUrlSchema,
|
|
12
|
+
tokens: z.string().array().max(100),
|
|
13
|
+
});
|
|
14
14
|
export const sendNotificationResponseSchema = z.object({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})
|
|
15
|
+
result: z.object({
|
|
16
|
+
successfulTokens: z.array(z.string()),
|
|
17
|
+
invalidTokens: z.array(z.string()),
|
|
18
|
+
rateLimitedTokens: z.array(z.string()),
|
|
19
|
+
}),
|
|
20
|
+
});
|