@farcaster/frame-core
Advanced tools
Comparing version
@@ -117,2 +117,3 @@ import { z } from 'zod'; | ||
imageUrl: z.ZodString; | ||
aspectRatio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>>; | ||
button: z.ZodObject<{ | ||
@@ -189,2 +190,3 @@ title: z.ZodString; | ||
}; | ||
aspectRatio?: "1:1" | "3:2" | undefined; | ||
}, { | ||
@@ -206,2 +208,3 @@ version: "next"; | ||
}; | ||
aspectRatio?: "1:1" | "3:2" | undefined; | ||
}>; | ||
@@ -224,2 +227,3 @@ export declare const safeParseFrameEmbed: (rawResponse: unknown) => z.SafeParseReturnType<{ | ||
}; | ||
aspectRatio?: "1:1" | "3:2" | undefined; | ||
}, { | ||
@@ -241,3 +245,4 @@ version: "next"; | ||
}; | ||
aspectRatio?: "1:1" | "3:2" | undefined; | ||
}>; | ||
export type FrameEmbedNext = z.infer<typeof frameEmbedNextSchema>; |
@@ -28,2 +28,3 @@ "use strict"; | ||
imageUrl: shared_1.secureUrlSchema, | ||
aspectRatio: shared_1.aspectRatioSchema.optional(), | ||
button: exports.buttonSchema, | ||
@@ -30,0 +31,0 @@ }); |
@@ -7,2 +7,3 @@ import { z } from 'zod'; | ||
export declare const hexColorSchema: z.ZodString; | ||
export declare const aspectRatioSchema: z.ZodUnion<[z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>; | ||
export declare const encodedJsonFarcasterSignatureSchema: z.ZodObject<{ | ||
@@ -9,0 +10,0 @@ header: z.ZodString; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.jsonFarcasterSignatureHeaderSchema = exports.encodedJsonFarcasterSignatureSchema = exports.hexColorSchema = exports.caip19TokenSchema = exports.buttonTitleSchema = exports.frameNameSchema = exports.secureUrlSchema = void 0; | ||
exports.jsonFarcasterSignatureHeaderSchema = exports.encodedJsonFarcasterSignatureSchema = exports.aspectRatioSchema = exports.hexColorSchema = exports.caip19TokenSchema = exports.buttonTitleSchema = exports.frameNameSchema = exports.secureUrlSchema = void 0; | ||
const zod_1 = require("zod"); | ||
@@ -21,2 +21,3 @@ exports.secureUrlSchema = zod_1.z | ||
}); | ||
exports.aspectRatioSchema = zod_1.z.union([zod_1.z.literal('1:1'), zod_1.z.literal('3:2')]); | ||
exports.encodedJsonFarcasterSignatureSchema = zod_1.z.object({ | ||
@@ -23,0 +24,0 @@ header: zod_1.z.string(), |
@@ -117,2 +117,3 @@ import { z } from 'zod'; | ||
imageUrl: z.ZodString; | ||
aspectRatio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>>; | ||
button: z.ZodObject<{ | ||
@@ -189,2 +190,3 @@ title: z.ZodString; | ||
}; | ||
aspectRatio?: "1:1" | "3:2" | undefined; | ||
}, { | ||
@@ -206,2 +208,3 @@ version: "next"; | ||
}; | ||
aspectRatio?: "1:1" | "3:2" | undefined; | ||
}>; | ||
@@ -224,2 +227,3 @@ export declare const safeParseFrameEmbed: (rawResponse: unknown) => z.SafeParseReturnType<{ | ||
}; | ||
aspectRatio?: "1:1" | "3:2" | undefined; | ||
}, { | ||
@@ -241,3 +245,4 @@ version: "next"; | ||
}; | ||
aspectRatio?: "1:1" | "3:2" | undefined; | ||
}>; | ||
export type FrameEmbedNext = z.infer<typeof frameEmbedNextSchema>; |
import { z } from 'zod'; | ||
import { buttonTitleSchema, caip19TokenSchema, frameNameSchema, hexColorSchema, secureUrlSchema, } from './shared'; | ||
import { aspectRatioSchema, buttonTitleSchema, caip19TokenSchema, frameNameSchema, hexColorSchema, secureUrlSchema, } from './shared'; | ||
export const actionLaunchFrameSchema = z.object({ | ||
@@ -25,4 +25,5 @@ type: z.literal('launch_frame'), | ||
imageUrl: secureUrlSchema, | ||
aspectRatio: aspectRatioSchema.optional(), | ||
button: buttonSchema, | ||
}); | ||
export const safeParseFrameEmbed = (rawResponse) => frameEmbedNextSchema.safeParse(rawResponse); |
@@ -7,2 +7,3 @@ import { z } from 'zod'; | ||
export declare const hexColorSchema: z.ZodString; | ||
export declare const aspectRatioSchema: z.ZodUnion<[z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>; | ||
export declare const encodedJsonFarcasterSignatureSchema: z.ZodObject<{ | ||
@@ -9,0 +10,0 @@ header: z.ZodString; |
@@ -18,2 +18,3 @@ import { z } from 'zod'; | ||
}); | ||
export const aspectRatioSchema = z.union([z.literal('1:1'), z.literal('3:2')]); | ||
export const encodedJsonFarcasterSignatureSchema = z.object({ | ||
@@ -20,0 +21,0 @@ header: z.string(), |
{ | ||
"name": "@farcaster/frame-core", | ||
"version": "0.0.25", | ||
"version": "0.0.26", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "module": "esm/index.js", |
import { z } from 'zod' | ||
import { | ||
aspectRatioSchema, | ||
buttonTitleSchema, | ||
@@ -36,2 +37,3 @@ caip19TokenSchema, | ||
imageUrl: secureUrlSchema, | ||
aspectRatio: aspectRatioSchema.optional(), | ||
button: buttonSchema, | ||
@@ -38,0 +40,0 @@ }) |
@@ -26,2 +26,4 @@ import { z } from 'zod' | ||
export const aspectRatioSchema = z.union([z.literal('1:1'), z.literal('3:2')]) | ||
export const encodedJsonFarcasterSignatureSchema = z.object({ | ||
@@ -28,0 +30,0 @@ header: z.string(), |
Sorry, the diff of this file is not supported yet
165726
0.73%2815
0.68%