@farcaster/snap 1.3.2 → 1.3.3

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/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { POST_GRID_TAP_KEY, PAGE_ROOT_TYPE, ELEMENT_TYPE, MEDIA_TYPE, DEFAULT_THEME_ACCENT, DEFAULT_LIST_STYLE, DEFAULT_SLIDER_STEP, PALETTE_COLOR, PALETTE_COLOR_VALUES, PALETTE_LIGHT_HEX, PALETTE_DARK_HEX, type PaletteColor, } from "./constants.js";
2
- export { rootSchema, firstPageRootSchema, payloadSchema, type SnapAction, type SnapContext, type SnapResponse, type SnapFunction, type SnapPayload, } from "./schemas.js";
2
+ export { rootSchema, firstPageRootSchema, payloadSchema, type SnapAction, type SnapContext, type SnapResponse, type SnapResponseInput, type SnapFunction, type SnapPayload, } from "./schemas.js";
3
3
  export { validatePage, validateFirstPage, type ValidationResult, } from "./validator.js";
package/dist/schemas.d.ts CHANGED
@@ -1362,6 +1362,7 @@ export declare const payloadSchema: z.ZodObject<{
1362
1362
  timestamp: z.ZodNumber;
1363
1363
  }, z.core.$strict>;
1364
1364
  export type SnapResponse = z.infer<typeof rootSchema>;
1365
+ export type SnapResponseInput = z.input<typeof rootSchema>;
1365
1366
  export type SnapPage = SnapResponse["page"];
1366
1367
  export type SnapPayload = z.infer<typeof payloadSchema>;
1367
1368
  declare const snapPostActionSchema: z.ZodObject<{
@@ -1382,5 +1383,5 @@ export type SnapContext = {
1382
1383
  action: SnapAction;
1383
1384
  request: Request;
1384
1385
  };
1385
- export type SnapFunction = (ctx: SnapContext) => Promise<SnapResponse>;
1386
+ export type SnapFunction = (ctx: SnapContext) => Promise<SnapResponseInput>;
1386
1387
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farcaster/snap",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Farcaster Snaps 🫰",
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -19,6 +19,7 @@ export {
19
19
  type SnapAction,
20
20
  type SnapContext,
21
21
  type SnapResponse,
22
+ type SnapResponseInput,
22
23
  type SnapFunction,
23
24
  type SnapPayload,
24
25
  } from "./schemas";
package/src/schemas.ts CHANGED
@@ -536,6 +536,7 @@ export const payloadSchema = z
536
536
  .strict();
537
537
 
538
538
  export type SnapResponse = z.infer<typeof rootSchema>;
539
+ export type SnapResponseInput = z.input<typeof rootSchema>;
539
540
  export type SnapPage = SnapResponse["page"];
540
541
  export type SnapPayload = z.infer<typeof payloadSchema>;
541
542
 
@@ -560,4 +561,4 @@ export type SnapContext = {
560
561
  request: Request;
561
562
  };
562
563
 
563
- export type SnapFunction = (ctx: SnapContext) => Promise<SnapResponse>;
564
+ export type SnapFunction = (ctx: SnapContext) => Promise<SnapResponseInput>;