@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.
Files changed (74) hide show
  1. package/README.md +13 -0
  2. package/dist/actions/ComposeCast.d.ts +32 -0
  3. package/dist/actions/ComposeCast.js +2 -0
  4. package/dist/actions/index.d.ts +1 -0
  5. package/dist/actions/index.js +2 -1
  6. package/dist/errors.d.ts +3 -0
  7. package/dist/index.d.ts +2 -0
  8. package/dist/index.js +3 -1
  9. package/dist/manifest.d.ts +101 -0
  10. package/dist/manifest.js +2 -0
  11. package/dist/schemas/embeds.d.ts +20 -20
  12. package/dist/schemas/embeds.js +1 -1
  13. package/dist/schemas/manifest.d.ts +92 -6
  14. package/dist/schemas/manifest.js +31 -0
  15. package/dist/schemas/shared.d.ts +4 -0
  16. package/dist/schemas/shared.js +29 -2
  17. package/dist/types.d.ts +3 -1
  18. package/dist/wallet/ethereum.d.ts +5 -1
  19. package/esm/actions/AddFrame.d.ts +23 -27
  20. package/esm/actions/AddFrame.js +9 -9
  21. package/esm/actions/ComposeCast.d.ts +32 -0
  22. package/esm/actions/ComposeCast.js +1 -0
  23. package/esm/actions/Ready.d.ts +11 -11
  24. package/esm/actions/Ready.js +2 -2
  25. package/esm/actions/SignIn.d.ts +33 -35
  26. package/esm/actions/SignIn.js +5 -5
  27. package/esm/actions/Swap.d.ts +43 -44
  28. package/esm/actions/Swap.js +1 -1
  29. package/esm/actions/ViewProfile.d.ts +3 -3
  30. package/esm/actions/ViewProfile.js +1 -1
  31. package/esm/actions/ViewToken.d.ts +3 -3
  32. package/esm/actions/ViewToken.js +1 -1
  33. package/esm/actions/index.d.ts +7 -6
  34. package/esm/actions/index.js +7 -6
  35. package/esm/context.d.ts +61 -65
  36. package/esm/context.js +1 -1
  37. package/esm/errors.d.ts +10 -9
  38. package/esm/errors.js +6 -6
  39. package/esm/index.d.ts +7 -5
  40. package/esm/index.js +7 -5
  41. package/esm/internal/types.d.ts +7 -18
  42. package/esm/internal/types.js +1 -1
  43. package/esm/manifest.d.ts +101 -0
  44. package/esm/manifest.js +1 -0
  45. package/esm/schemas/embeds.d.ts +239 -346
  46. package/esm/schemas/embeds.js +23 -31
  47. package/esm/schemas/events.d.ts +129 -225
  48. package/esm/schemas/events.js +17 -17
  49. package/esm/schemas/index.d.ts +5 -5
  50. package/esm/schemas/index.js +5 -5
  51. package/esm/schemas/manifest.d.ts +196 -154
  52. package/esm/schemas/manifest.js +54 -29
  53. package/esm/schemas/notifications.d.ts +58 -86
  54. package/esm/schemas/notifications.js +17 -17
  55. package/esm/schemas/shared.d.ts +39 -53
  56. package/esm/schemas/shared.js +49 -25
  57. package/esm/tsconfig.tsbuildinfo +1 -1
  58. package/esm/types.d.ts +53 -70
  59. package/esm/types.js +2 -2
  60. package/esm/wallet/ethereum.d.ts +39 -50
  61. package/esm/wallet/ethereum.js +1 -1
  62. package/esm/wallet/index.d.ts +1 -1
  63. package/esm/wallet/index.js +1 -1
  64. package/package.json +1 -1
  65. package/src/actions/ComposeCast.ts +36 -0
  66. package/src/actions/index.ts +1 -0
  67. package/src/errors.ts +4 -0
  68. package/src/index.ts +2 -0
  69. package/src/manifest.ts +113 -0
  70. package/src/schemas/embeds.ts +1 -1
  71. package/src/schemas/manifest.ts +33 -0
  72. package/src/schemas/shared.ts +36 -1
  73. package/src/types.ts +7 -0
  74. package/src/wallet/ethereum.ts +5 -1
@@ -1,156 +1,198 @@
1
- import type { z } from 'zod'
2
- export declare const domainFrameConfigSchema: z.ZodObject<
3
- {
4
- version: z.ZodUnion<
5
- [
6
- z.ZodLiteral<'0.0.0'>,
7
- z.ZodLiteral<'0.0.1'>,
8
- z.ZodLiteral<'1'>,
9
- z.ZodLiteral<'next'>,
10
- ]
11
- >
12
- name: z.ZodString
13
- iconUrl: z.ZodString
14
- homeUrl: z.ZodString
15
- imageUrl: z.ZodOptional<z.ZodString>
16
- buttonTitle: z.ZodOptional<z.ZodString>
17
- splashImageUrl: z.ZodOptional<z.ZodString>
18
- splashBackgroundColor: z.ZodOptional<z.ZodString>
19
- webhookUrl: z.ZodOptional<z.ZodString>
20
- },
21
- 'strip',
22
- z.ZodTypeAny,
23
- {
24
- name: string
25
- version: 'next' | '0.0.0' | '0.0.1' | '1'
26
- iconUrl: string
27
- homeUrl: string
28
- splashImageUrl?: string | undefined
29
- splashBackgroundColor?: string | undefined
30
- imageUrl?: string | undefined
31
- buttonTitle?: string | undefined
32
- webhookUrl?: string | undefined
33
- },
34
- {
35
- name: string
36
- version: 'next' | '0.0.0' | '0.0.1' | '1'
37
- iconUrl: string
38
- homeUrl: string
39
- splashImageUrl?: string | undefined
40
- splashBackgroundColor?: string | undefined
41
- imageUrl?: string | undefined
42
- buttonTitle?: string | undefined
43
- webhookUrl?: string | undefined
44
- }
45
- >
46
- export declare const domainManifestSchema: z.ZodObject<
47
- {
48
- accountAssociation: z.ZodObject<
49
- {
50
- header: z.ZodString
51
- payload: z.ZodString
52
- signature: z.ZodString
53
- },
54
- 'strip',
55
- z.ZodTypeAny,
56
- {
57
- header: string
58
- payload: string
59
- signature: string
60
- },
61
- {
62
- header: string
63
- payload: string
64
- signature: string
65
- }
66
- >
67
- frame: z.ZodOptional<
68
- z.ZodObject<
69
- {
70
- version: z.ZodUnion<
71
- [
72
- z.ZodLiteral<'0.0.0'>,
73
- z.ZodLiteral<'0.0.1'>,
74
- z.ZodLiteral<'1'>,
75
- z.ZodLiteral<'next'>,
76
- ]
77
- >
78
- name: z.ZodString
79
- iconUrl: z.ZodString
80
- homeUrl: z.ZodString
81
- imageUrl: z.ZodOptional<z.ZodString>
82
- buttonTitle: z.ZodOptional<z.ZodString>
83
- splashImageUrl: z.ZodOptional<z.ZodString>
84
- splashBackgroundColor: z.ZodOptional<z.ZodString>
85
- webhookUrl: z.ZodOptional<z.ZodString>
86
- },
87
- 'strip',
88
- z.ZodTypeAny,
89
- {
90
- name: string
91
- version: 'next' | '0.0.0' | '0.0.1' | '1'
92
- iconUrl: string
93
- homeUrl: string
94
- splashImageUrl?: string | undefined
95
- splashBackgroundColor?: string | undefined
96
- imageUrl?: string | undefined
97
- buttonTitle?: string | undefined
98
- webhookUrl?: string | undefined
99
- },
100
- {
101
- name: string
102
- version: 'next' | '0.0.0' | '0.0.1' | '1'
103
- iconUrl: string
104
- homeUrl: string
105
- splashImageUrl?: string | undefined
106
- splashBackgroundColor?: string | undefined
107
- imageUrl?: string | undefined
108
- buttonTitle?: string | undefined
109
- webhookUrl?: string | undefined
110
- }
111
- >
112
- >
113
- },
114
- 'strip',
115
- z.ZodTypeAny,
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
- header: string
119
- payload: string
120
- signature: string
121
- }
122
- frame?:
123
- | {
124
- name: string
125
- version: 'next' | '0.0.0' | '0.0.1' | '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
- }
134
- | undefined
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
- header: string
139
- payload: string
140
- signature: string
141
- }
142
- frame?:
143
- | {
144
- name: string
145
- version: 'next' | '0.0.0' | '0.0.1' | '1'
146
- iconUrl: string
147
- homeUrl: string
148
- splashImageUrl?: string | undefined
149
- splashBackgroundColor?: string | undefined
150
- imageUrl?: string | undefined
151
- buttonTitle?: string | undefined
152
- webhookUrl?: string | undefined
153
- }
154
- | undefined
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
+ }>;
@@ -1,31 +1,56 @@
1
- import { z } from 'zod'
2
- import {
3
- buttonTitleSchema,
4
- encodedJsonFarcasterSignatureSchema,
5
- frameNameSchema,
6
- hexColorSchema,
7
- secureUrlSchema,
8
- } from './shared'
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
- // 0.0.0 and 0.0.1 are not technically part of the spec but kept for
11
- // backwards compatibilty. next should always resolve to the most recent
12
- // schema version.
13
- version: z.union([
14
- z.literal('0.0.0'),
15
- z.literal('0.0.1'),
16
- z.literal('1'),
17
- z.literal('next'),
18
- ]),
19
- name: frameNameSchema,
20
- iconUrl: secureUrlSchema,
21
- homeUrl: secureUrlSchema,
22
- imageUrl: secureUrlSchema.optional(),
23
- buttonTitle: buttonTitleSchema.optional(),
24
- splashImageUrl: secureUrlSchema.optional(),
25
- splashBackgroundColor: hexColorSchema.optional(),
26
- webhookUrl: secureUrlSchema.optional(),
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
- accountAssociation: encodedJsonFarcasterSignatureSchema,
30
- frame: domainFrameConfigSchema.optional(),
31
- })
54
+ accountAssociation: encodedJsonFarcasterSignatureSchema,
55
+ frame: domainFrameConfigSchema.optional(),
56
+ });
@@ -1,88 +1,60 @@
1
- import type { z } from 'zod'
2
- export declare const notificationDetailsSchema: z.ZodObject<
3
- {
4
- url: z.ZodString
5
- token: z.ZodString
6
- },
7
- 'strip',
8
- z.ZodTypeAny,
9
- {
10
- url: string
11
- token: string
12
- },
13
- {
14
- url: string
15
- token: string
16
- }
17
- >
18
- export type FrameNotificationDetails = z.infer<typeof notificationDetailsSchema>
19
- export declare const sendNotificationRequestSchema: z.ZodObject<
20
- {
21
- notificationId: z.ZodString
22
- title: z.ZodString
23
- body: z.ZodString
24
- targetUrl: z.ZodString
25
- tokens: z.ZodArray<z.ZodString, 'many'>
26
- },
27
- 'strip',
28
- z.ZodTypeAny,
29
- {
30
- title: string
31
- notificationId: string
32
- body: string
33
- targetUrl: string
34
- tokens: string[]
35
- },
36
- {
37
- title: string
38
- notificationId: string
39
- body: string
40
- targetUrl: string
41
- tokens: string[]
42
- }
43
- >
44
- export type SendNotificationRequest = z.infer<
45
- typeof sendNotificationRequestSchema
46
- >
47
- export declare const sendNotificationResponseSchema: z.ZodObject<
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
- successfulTokens: string[]
74
- invalidTokens: string[]
75
- rateLimitedTokens: string[]
76
- }
77
- },
78
- {
49
+ successfulTokens: string[];
50
+ invalidTokens: string[];
51
+ rateLimitedTokens: string[];
52
+ };
53
+ }, {
79
54
  result: {
80
- successfulTokens: string[]
81
- invalidTokens: string[]
82
- rateLimitedTokens: string[]
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
- url: z.string(),
5
- token: z.string(),
6
- })
4
+ url: z.string(),
5
+ token: z.string(),
6
+ });
7
7
  export const sendNotificationRequestSchema = z.object({
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
- })
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
- result: z.object({
16
- successfulTokens: z.array(z.string()),
17
- invalidTokens: z.array(z.string()),
18
- rateLimitedTokens: z.array(z.string()),
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
+ });