@farcaster/miniapp-core 0.3.0 → 0.3.1

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.
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
2
2
  import { miniAppHostCapabilityList } from "../types.js";
3
3
  import { buttonTitleSchema, createSimpleStringSchema, domainSchema, encodedJsonFarcasterSignatureSchema, hexColorSchema, miniAppNameSchema, secureUrlSchema, } from "./shared.js";
4
4
  const primaryCategorySchema = z.enum([
@@ -1,22 +1,60 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
2
2
  export declare const notificationDetailsSchema: z.ZodObject<{
3
3
  url: z.ZodString;
4
4
  token: z.ZodString;
5
- }, z.core.$strip>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ url: string;
7
+ token: string;
8
+ }, {
9
+ url: string;
10
+ token: string;
11
+ }>;
6
12
  export type MiniAppNotificationDetails = z.infer<typeof notificationDetailsSchema>;
7
13
  export declare const sendNotificationRequestSchema: z.ZodObject<{
8
14
  notificationId: z.ZodString;
9
15
  title: z.ZodString;
10
16
  body: z.ZodString;
11
- targetUrl: z.ZodString;
12
- tokens: z.ZodArray<z.ZodString>;
13
- }, z.core.$strip>;
17
+ targetUrl: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
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
+ }>;
14
32
  export type SendNotificationRequest = z.infer<typeof sendNotificationRequestSchema>;
15
33
  export declare const sendNotificationResponseSchema: z.ZodObject<{
16
34
  result: z.ZodObject<{
17
- successfulTokens: z.ZodArray<z.ZodString>;
18
- invalidTokens: z.ZodArray<z.ZodString>;
19
- rateLimitedTokens: z.ZodArray<z.ZodString>;
20
- }, z.core.$strip>;
21
- }, z.core.$strip>;
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, {
48
+ result: {
49
+ successfulTokens: string[];
50
+ invalidTokens: string[];
51
+ rateLimitedTokens: string[];
52
+ };
53
+ }, {
54
+ result: {
55
+ successfulTokens: string[];
56
+ invalidTokens: string[];
57
+ rateLimitedTokens: string[];
58
+ };
59
+ }>;
22
60
  export type SendNotificationResponse = z.infer<typeof sendNotificationResponseSchema>;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
2
2
  import { secureUrlSchema } from "./shared.js";
3
3
  export const notificationDetailsSchema = z.object({
4
4
  url: z.string(),
@@ -1,24 +1,40 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
2
2
  export declare const createSimpleStringSchema: ({ max, noSpaces, }?: {
3
3
  max?: number;
4
4
  noSpaces?: boolean;
5
- }) => z.ZodString;
6
- export declare const secureUrlSchema: z.ZodString;
5
+ }) => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
6
+ export declare const secureUrlSchema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
7
7
  export declare const miniAppNameSchema: z.ZodString;
8
8
  export declare const buttonTitleSchema: z.ZodString;
9
9
  export declare const caip19TokenSchema: z.ZodString;
10
10
  export declare const hexColorSchema: z.ZodString;
11
- export declare const domainSchema: z.ZodString;
12
- export declare const aspectRatioSchema: z.ZodUnion<readonly [z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>;
11
+ export declare const domainSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
12
+ export declare const aspectRatioSchema: z.ZodUnion<[z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>;
13
13
  export declare const encodedJsonFarcasterSignatureSchema: z.ZodObject<{
14
14
  header: z.ZodString;
15
15
  payload: z.ZodString;
16
16
  signature: z.ZodString;
17
- }, z.core.$strip>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ header: string;
19
+ payload: string;
20
+ signature: string;
21
+ }, {
22
+ header: string;
23
+ payload: string;
24
+ signature: string;
25
+ }>;
18
26
  export type EncodedJsonFarcasterSignatureSchema = z.infer<typeof encodedJsonFarcasterSignatureSchema>;
19
27
  export declare const jsonFarcasterSignatureHeaderSchema: z.ZodObject<{
20
28
  fid: z.ZodNumber;
21
29
  type: z.ZodLiteral<"app_key">;
22
30
  key: z.ZodString;
23
- }, z.core.$strip>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ type: "app_key";
33
+ fid: number;
34
+ key: string;
35
+ }, {
36
+ type: "app_key";
37
+ fid: number;
38
+ key: string;
39
+ }>;
24
40
  export type JsonFarcasterSignatureHeaderSchema = z.infer<typeof jsonFarcasterSignatureHeaderSchema>;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
2
2
  const SPECIAL_CHARS_PATTERN = /[@#$%^&*+=\/\\|~«»]/;
3
3
  const REPEATED_PUNCTUATION_PATTERN = /(!{2,}|\?{2,}|-{2,})/;
4
4
  // Unicode ranges for emoji detection: