@crosspost/types 0.2.9 → 0.2.10

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.cjs CHANGED
@@ -582,10 +582,7 @@ var FilterSchema = import_zod8.z.object({
582
582
  }).pipe(
583
583
  import_zod8.z.array(import_zod8.z.nativeEnum(ActivityType)).optional()
584
584
  ).describe("Filter by activity types (comma-separated list, optional)"),
585
- timeframe: import_zod8.z.nativeEnum(TimePeriod).optional().transform((val) => {
586
- if (!val) return "all" /* ALL */;
587
- return val;
588
- }).describe(
585
+ timeframe: import_zod8.z.nativeEnum(TimePeriod).optional().describe(
589
586
  "Timeframe for filtering (optional)"
590
587
  )
591
588
  }).describe("Filter parameters");
@@ -593,9 +590,9 @@ var PaginationSchema = import_zod8.z.object({
593
590
  limit: import_zod8.z.string().optional().transform((val) => val ? parseInt(val, 10) : void 0).pipe(import_zod8.z.number().min(1).max(100).optional()).describe("Maximum number of results to return (1-100)"),
594
591
  offset: import_zod8.z.string().optional().transform((val) => val ? parseInt(val, 10) : void 0).pipe(import_zod8.z.number().min(0).optional()).describe("Offset for pagination")
595
592
  }).describe("Pagination parameters");
596
- var ActivityLeaderboardQuerySchema = import_zod8.z.object({
597
- filter: FilterSchema.optional()
598
- }).describe("Account leaderboard query").merge(PaginationSchema);
593
+ var ActivityLeaderboardQuerySchema = FilterSchema.merge(PaginationSchema).describe(
594
+ "Account leaderboard query"
595
+ );
599
596
  var AccountActivityEntrySchema = import_zod8.z.object({
600
597
  signerId: import_zod8.z.string().describe("NEAR account ID"),
601
598
  totalPosts: import_zod8.z.number().describe("Total number of posts"),
@@ -617,9 +614,9 @@ var ActivityLeaderboardResponseSchema = import_zod8.z.object({
617
614
  var AccountActivityParamsSchema = import_zod8.z.object({
618
615
  signerId: import_zod8.z.string().describe("NEAR account ID")
619
616
  }).describe("Account activity params");
620
- var AccountActivityQuerySchema = import_zod8.z.object({
621
- filter: FilterSchema.optional()
622
- }).describe("Account activity query").merge(PaginationSchema);
617
+ var AccountActivityQuerySchema = FilterSchema.merge(PaginationSchema).describe(
618
+ "Account activity query"
619
+ );
623
620
  var PlatformActivitySchema = import_zod8.z.object({
624
621
  platform: PlatformSchema,
625
622
  posts: import_zod8.z.number().describe("Number of posts on this platform"),
@@ -646,9 +643,9 @@ var AccountActivityResponseSchema = import_zod8.z.object({
646
643
  var AccountPostsParamsSchema = import_zod8.z.object({
647
644
  signerId: import_zod8.z.string().describe("NEAR account ID")
648
645
  }).describe("Account posts params");
649
- var AccountPostsQuerySchema = import_zod8.z.object({
650
- filter: FilterSchema.optional()
651
- }).describe("Account posts query").merge(PaginationSchema);
646
+ var AccountPostsQuerySchema = FilterSchema.merge(PaginationSchema).describe(
647
+ "Account posts query"
648
+ );
652
649
  var AccountPostSchema = import_zod8.z.object({
653
650
  id: import_zod8.z.string().describe("Post ID"),
654
651
  platform: PlatformSchema,
package/dist/index.d.cts CHANGED
@@ -2717,11 +2717,11 @@ declare enum TimePeriod {
2717
2717
  declare const FilterSchema: z.ZodObject<{
2718
2718
  platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2719
2719
  types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2720
- timeframe: z.ZodEffects<z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>, TimePeriod, TimePeriod | undefined>;
2720
+ timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
2721
2721
  }, "strip", z.ZodTypeAny, {
2722
- timeframe: TimePeriod;
2723
2722
  platforms?: Platform[] | undefined;
2724
2723
  types?: ActivityType[] | undefined;
2724
+ timeframe?: TimePeriod | undefined;
2725
2725
  }, {
2726
2726
  platforms?: string | undefined;
2727
2727
  types?: string | undefined;
@@ -2744,38 +2744,24 @@ declare const PaginationSchema: z.ZodObject<{
2744
2744
  * Query schema for leaderboard endpoints
2745
2745
  */
2746
2746
  declare const ActivityLeaderboardQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
2747
- filter: z.ZodOptional<z.ZodObject<{
2748
- platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2749
- types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2750
- timeframe: z.ZodEffects<z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>, TimePeriod, TimePeriod | undefined>;
2751
- }, "strip", z.ZodTypeAny, {
2752
- timeframe: TimePeriod;
2753
- platforms?: Platform[] | undefined;
2754
- types?: ActivityType[] | undefined;
2755
- }, {
2756
- platforms?: string | undefined;
2757
- types?: string | undefined;
2758
- timeframe?: TimePeriod | undefined;
2759
- }>>;
2747
+ platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2748
+ types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2749
+ timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
2760
2750
  }, {
2761
2751
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
2762
2752
  offset: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
2763
2753
  }>, "strip", z.ZodTypeAny, {
2764
- filter?: {
2765
- timeframe: TimePeriod;
2766
- platforms?: Platform[] | undefined;
2767
- types?: ActivityType[] | undefined;
2768
- } | undefined;
2769
2754
  limit?: number | undefined;
2770
2755
  offset?: number | undefined;
2756
+ platforms?: Platform[] | undefined;
2757
+ types?: ActivityType[] | undefined;
2758
+ timeframe?: TimePeriod | undefined;
2771
2759
  }, {
2772
- filter?: {
2773
- platforms?: string | undefined;
2774
- types?: string | undefined;
2775
- timeframe?: TimePeriod | undefined;
2776
- } | undefined;
2777
2760
  limit?: string | undefined;
2778
2761
  offset?: string | undefined;
2762
+ platforms?: string | undefined;
2763
+ types?: string | undefined;
2764
+ timeframe?: TimePeriod | undefined;
2779
2765
  }>;
2780
2766
  declare const AccountActivityEntrySchema: z.ZodObject<{
2781
2767
  signerId: z.ZodString;
@@ -2893,38 +2879,24 @@ declare const AccountActivityParamsSchema: z.ZodObject<{
2893
2879
  * Query schema for account activity endpoints
2894
2880
  */
2895
2881
  declare const AccountActivityQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
2896
- filter: z.ZodOptional<z.ZodObject<{
2897
- platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2898
- types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2899
- timeframe: z.ZodEffects<z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>, TimePeriod, TimePeriod | undefined>;
2900
- }, "strip", z.ZodTypeAny, {
2901
- timeframe: TimePeriod;
2902
- platforms?: Platform[] | undefined;
2903
- types?: ActivityType[] | undefined;
2904
- }, {
2905
- platforms?: string | undefined;
2906
- types?: string | undefined;
2907
- timeframe?: TimePeriod | undefined;
2908
- }>>;
2882
+ platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2883
+ types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2884
+ timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
2909
2885
  }, {
2910
2886
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
2911
2887
  offset: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
2912
2888
  }>, "strip", z.ZodTypeAny, {
2913
- filter?: {
2914
- timeframe: TimePeriod;
2915
- platforms?: Platform[] | undefined;
2916
- types?: ActivityType[] | undefined;
2917
- } | undefined;
2918
2889
  limit?: number | undefined;
2919
2890
  offset?: number | undefined;
2891
+ platforms?: Platform[] | undefined;
2892
+ types?: ActivityType[] | undefined;
2893
+ timeframe?: TimePeriod | undefined;
2920
2894
  }, {
2921
- filter?: {
2922
- platforms?: string | undefined;
2923
- types?: string | undefined;
2924
- timeframe?: TimePeriod | undefined;
2925
- } | undefined;
2926
2895
  limit?: string | undefined;
2927
2896
  offset?: string | undefined;
2897
+ platforms?: string | undefined;
2898
+ types?: string | undefined;
2899
+ timeframe?: TimePeriod | undefined;
2928
2900
  }>;
2929
2901
  declare const PlatformActivitySchema: z.ZodObject<{
2930
2902
  platform: z.ZodNativeEnum<typeof Platform>;
@@ -3047,38 +3019,24 @@ declare const AccountPostsParamsSchema: z.ZodObject<{
3047
3019
  * Query schema for account posts endpoints
3048
3020
  */
3049
3021
  declare const AccountPostsQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
3050
- filter: z.ZodOptional<z.ZodObject<{
3051
- platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
3052
- types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
3053
- timeframe: z.ZodEffects<z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>, TimePeriod, TimePeriod | undefined>;
3054
- }, "strip", z.ZodTypeAny, {
3055
- timeframe: TimePeriod;
3056
- platforms?: Platform[] | undefined;
3057
- types?: ActivityType[] | undefined;
3058
- }, {
3059
- platforms?: string | undefined;
3060
- types?: string | undefined;
3061
- timeframe?: TimePeriod | undefined;
3062
- }>>;
3022
+ platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
3023
+ types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
3024
+ timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
3063
3025
  }, {
3064
3026
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
3065
3027
  offset: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
3066
3028
  }>, "strip", z.ZodTypeAny, {
3067
- filter?: {
3068
- timeframe: TimePeriod;
3069
- platforms?: Platform[] | undefined;
3070
- types?: ActivityType[] | undefined;
3071
- } | undefined;
3072
3029
  limit?: number | undefined;
3073
3030
  offset?: number | undefined;
3031
+ platforms?: Platform[] | undefined;
3032
+ types?: ActivityType[] | undefined;
3033
+ timeframe?: TimePeriod | undefined;
3074
3034
  }, {
3075
- filter?: {
3076
- platforms?: string | undefined;
3077
- types?: string | undefined;
3078
- timeframe?: TimePeriod | undefined;
3079
- } | undefined;
3080
3035
  limit?: string | undefined;
3081
3036
  offset?: string | undefined;
3037
+ platforms?: string | undefined;
3038
+ types?: string | undefined;
3039
+ timeframe?: TimePeriod | undefined;
3082
3040
  }>;
3083
3041
  declare const AccountPostSchema: z.ZodObject<{
3084
3042
  id: z.ZodString;
package/dist/index.d.ts CHANGED
@@ -2717,11 +2717,11 @@ declare enum TimePeriod {
2717
2717
  declare const FilterSchema: z.ZodObject<{
2718
2718
  platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2719
2719
  types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2720
- timeframe: z.ZodEffects<z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>, TimePeriod, TimePeriod | undefined>;
2720
+ timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
2721
2721
  }, "strip", z.ZodTypeAny, {
2722
- timeframe: TimePeriod;
2723
2722
  platforms?: Platform[] | undefined;
2724
2723
  types?: ActivityType[] | undefined;
2724
+ timeframe?: TimePeriod | undefined;
2725
2725
  }, {
2726
2726
  platforms?: string | undefined;
2727
2727
  types?: string | undefined;
@@ -2744,38 +2744,24 @@ declare const PaginationSchema: z.ZodObject<{
2744
2744
  * Query schema for leaderboard endpoints
2745
2745
  */
2746
2746
  declare const ActivityLeaderboardQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
2747
- filter: z.ZodOptional<z.ZodObject<{
2748
- platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2749
- types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2750
- timeframe: z.ZodEffects<z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>, TimePeriod, TimePeriod | undefined>;
2751
- }, "strip", z.ZodTypeAny, {
2752
- timeframe: TimePeriod;
2753
- platforms?: Platform[] | undefined;
2754
- types?: ActivityType[] | undefined;
2755
- }, {
2756
- platforms?: string | undefined;
2757
- types?: string | undefined;
2758
- timeframe?: TimePeriod | undefined;
2759
- }>>;
2747
+ platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2748
+ types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2749
+ timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
2760
2750
  }, {
2761
2751
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
2762
2752
  offset: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
2763
2753
  }>, "strip", z.ZodTypeAny, {
2764
- filter?: {
2765
- timeframe: TimePeriod;
2766
- platforms?: Platform[] | undefined;
2767
- types?: ActivityType[] | undefined;
2768
- } | undefined;
2769
2754
  limit?: number | undefined;
2770
2755
  offset?: number | undefined;
2756
+ platforms?: Platform[] | undefined;
2757
+ types?: ActivityType[] | undefined;
2758
+ timeframe?: TimePeriod | undefined;
2771
2759
  }, {
2772
- filter?: {
2773
- platforms?: string | undefined;
2774
- types?: string | undefined;
2775
- timeframe?: TimePeriod | undefined;
2776
- } | undefined;
2777
2760
  limit?: string | undefined;
2778
2761
  offset?: string | undefined;
2762
+ platforms?: string | undefined;
2763
+ types?: string | undefined;
2764
+ timeframe?: TimePeriod | undefined;
2779
2765
  }>;
2780
2766
  declare const AccountActivityEntrySchema: z.ZodObject<{
2781
2767
  signerId: z.ZodString;
@@ -2893,38 +2879,24 @@ declare const AccountActivityParamsSchema: z.ZodObject<{
2893
2879
  * Query schema for account activity endpoints
2894
2880
  */
2895
2881
  declare const AccountActivityQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
2896
- filter: z.ZodOptional<z.ZodObject<{
2897
- platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2898
- types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2899
- timeframe: z.ZodEffects<z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>, TimePeriod, TimePeriod | undefined>;
2900
- }, "strip", z.ZodTypeAny, {
2901
- timeframe: TimePeriod;
2902
- platforms?: Platform[] | undefined;
2903
- types?: ActivityType[] | undefined;
2904
- }, {
2905
- platforms?: string | undefined;
2906
- types?: string | undefined;
2907
- timeframe?: TimePeriod | undefined;
2908
- }>>;
2882
+ platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2883
+ types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2884
+ timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
2909
2885
  }, {
2910
2886
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
2911
2887
  offset: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
2912
2888
  }>, "strip", z.ZodTypeAny, {
2913
- filter?: {
2914
- timeframe: TimePeriod;
2915
- platforms?: Platform[] | undefined;
2916
- types?: ActivityType[] | undefined;
2917
- } | undefined;
2918
2889
  limit?: number | undefined;
2919
2890
  offset?: number | undefined;
2891
+ platforms?: Platform[] | undefined;
2892
+ types?: ActivityType[] | undefined;
2893
+ timeframe?: TimePeriod | undefined;
2920
2894
  }, {
2921
- filter?: {
2922
- platforms?: string | undefined;
2923
- types?: string | undefined;
2924
- timeframe?: TimePeriod | undefined;
2925
- } | undefined;
2926
2895
  limit?: string | undefined;
2927
2896
  offset?: string | undefined;
2897
+ platforms?: string | undefined;
2898
+ types?: string | undefined;
2899
+ timeframe?: TimePeriod | undefined;
2928
2900
  }>;
2929
2901
  declare const PlatformActivitySchema: z.ZodObject<{
2930
2902
  platform: z.ZodNativeEnum<typeof Platform>;
@@ -3047,38 +3019,24 @@ declare const AccountPostsParamsSchema: z.ZodObject<{
3047
3019
  * Query schema for account posts endpoints
3048
3020
  */
3049
3021
  declare const AccountPostsQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
3050
- filter: z.ZodOptional<z.ZodObject<{
3051
- platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
3052
- types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
3053
- timeframe: z.ZodEffects<z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>, TimePeriod, TimePeriod | undefined>;
3054
- }, "strip", z.ZodTypeAny, {
3055
- timeframe: TimePeriod;
3056
- platforms?: Platform[] | undefined;
3057
- types?: ActivityType[] | undefined;
3058
- }, {
3059
- platforms?: string | undefined;
3060
- types?: string | undefined;
3061
- timeframe?: TimePeriod | undefined;
3062
- }>>;
3022
+ platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
3023
+ types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
3024
+ timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
3063
3025
  }, {
3064
3026
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
3065
3027
  offset: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
3066
3028
  }>, "strip", z.ZodTypeAny, {
3067
- filter?: {
3068
- timeframe: TimePeriod;
3069
- platforms?: Platform[] | undefined;
3070
- types?: ActivityType[] | undefined;
3071
- } | undefined;
3072
3029
  limit?: number | undefined;
3073
3030
  offset?: number | undefined;
3031
+ platforms?: Platform[] | undefined;
3032
+ types?: ActivityType[] | undefined;
3033
+ timeframe?: TimePeriod | undefined;
3074
3034
  }, {
3075
- filter?: {
3076
- platforms?: string | undefined;
3077
- types?: string | undefined;
3078
- timeframe?: TimePeriod | undefined;
3079
- } | undefined;
3080
3035
  limit?: string | undefined;
3081
3036
  offset?: string | undefined;
3037
+ platforms?: string | undefined;
3038
+ types?: string | undefined;
3039
+ timeframe?: TimePeriod | undefined;
3082
3040
  }>;
3083
3041
  declare const AccountPostSchema: z.ZodObject<{
3084
3042
  id: z.ZodString;
package/dist/index.js CHANGED
@@ -477,10 +477,7 @@ var FilterSchema = z8.object({
477
477
  }).pipe(
478
478
  z8.array(z8.nativeEnum(ActivityType)).optional()
479
479
  ).describe("Filter by activity types (comma-separated list, optional)"),
480
- timeframe: z8.nativeEnum(TimePeriod).optional().transform((val) => {
481
- if (!val) return "all" /* ALL */;
482
- return val;
483
- }).describe(
480
+ timeframe: z8.nativeEnum(TimePeriod).optional().describe(
484
481
  "Timeframe for filtering (optional)"
485
482
  )
486
483
  }).describe("Filter parameters");
@@ -488,9 +485,9 @@ var PaginationSchema = z8.object({
488
485
  limit: z8.string().optional().transform((val) => val ? parseInt(val, 10) : void 0).pipe(z8.number().min(1).max(100).optional()).describe("Maximum number of results to return (1-100)"),
489
486
  offset: z8.string().optional().transform((val) => val ? parseInt(val, 10) : void 0).pipe(z8.number().min(0).optional()).describe("Offset for pagination")
490
487
  }).describe("Pagination parameters");
491
- var ActivityLeaderboardQuerySchema = z8.object({
492
- filter: FilterSchema.optional()
493
- }).describe("Account leaderboard query").merge(PaginationSchema);
488
+ var ActivityLeaderboardQuerySchema = FilterSchema.merge(PaginationSchema).describe(
489
+ "Account leaderboard query"
490
+ );
494
491
  var AccountActivityEntrySchema = z8.object({
495
492
  signerId: z8.string().describe("NEAR account ID"),
496
493
  totalPosts: z8.number().describe("Total number of posts"),
@@ -512,9 +509,9 @@ var ActivityLeaderboardResponseSchema = z8.object({
512
509
  var AccountActivityParamsSchema = z8.object({
513
510
  signerId: z8.string().describe("NEAR account ID")
514
511
  }).describe("Account activity params");
515
- var AccountActivityQuerySchema = z8.object({
516
- filter: FilterSchema.optional()
517
- }).describe("Account activity query").merge(PaginationSchema);
512
+ var AccountActivityQuerySchema = FilterSchema.merge(PaginationSchema).describe(
513
+ "Account activity query"
514
+ );
518
515
  var PlatformActivitySchema = z8.object({
519
516
  platform: PlatformSchema,
520
517
  posts: z8.number().describe("Number of posts on this platform"),
@@ -541,9 +538,9 @@ var AccountActivityResponseSchema = z8.object({
541
538
  var AccountPostsParamsSchema = z8.object({
542
539
  signerId: z8.string().describe("NEAR account ID")
543
540
  }).describe("Account posts params");
544
- var AccountPostsQuerySchema = z8.object({
545
- filter: FilterSchema.optional()
546
- }).describe("Account posts query").merge(PaginationSchema);
541
+ var AccountPostsQuerySchema = FilterSchema.merge(PaginationSchema).describe(
542
+ "Account posts query"
543
+ );
547
544
  var AccountPostSchema = z8.object({
548
545
  id: z8.string().describe("Post ID"),
549
546
  platform: PlatformSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crosspost/types",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Shared type definitions for Crosspost API",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
package/src/activity.ts CHANGED
@@ -58,10 +58,7 @@ export const FilterSchema = z.object({
58
58
  z.array(z.nativeEnum(ActivityType)).optional(),
59
59
  )
60
60
  .describe('Filter by activity types (comma-separated list, optional)'),
61
- timeframe: z.nativeEnum(TimePeriod).optional().transform((val) => {
62
- if (!val) return TimePeriod.ALL;
63
- return val;
64
- }).describe(
61
+ timeframe: z.nativeEnum(TimePeriod).optional().describe(
65
62
  'Timeframe for filtering (optional)',
66
63
  ),
67
64
  }).describe('Filter parameters');
@@ -83,9 +80,9 @@ export const PaginationSchema = z.object({
83
80
  /**
84
81
  * Query schema for leaderboard endpoints
85
82
  */
86
- export const ActivityLeaderboardQuerySchema = z.object({
87
- filter: FilterSchema.optional(),
88
- }).describe('Account leaderboard query').merge(PaginationSchema);
83
+ export const ActivityLeaderboardQuerySchema = FilterSchema.merge(PaginationSchema).describe(
84
+ 'Account leaderboard query',
85
+ );
89
86
 
90
87
  export const AccountActivityEntrySchema = z.object({
91
88
  signerId: z.string().describe('NEAR account ID'),
@@ -114,9 +111,9 @@ export const AccountActivityParamsSchema = z.object({
114
111
  /**
115
112
  * Query schema for account activity endpoints
116
113
  */
117
- export const AccountActivityQuerySchema = z.object({
118
- filter: FilterSchema.optional(),
119
- }).describe('Account activity query').merge(PaginationSchema);
114
+ export const AccountActivityQuerySchema = FilterSchema.merge(PaginationSchema).describe(
115
+ 'Account activity query',
116
+ );
120
117
 
121
118
  export const PlatformActivitySchema = z.object({
122
119
  platform: PlatformSchema,
@@ -150,9 +147,9 @@ export const AccountPostsParamsSchema = z.object({
150
147
  /**
151
148
  * Query schema for account posts endpoints
152
149
  */
153
- export const AccountPostsQuerySchema = z.object({
154
- filter: FilterSchema.optional(),
155
- }).describe('Account posts query').merge(PaginationSchema);
150
+ export const AccountPostsQuerySchema = FilterSchema.merge(PaginationSchema).describe(
151
+ 'Account posts query',
152
+ );
156
153
 
157
154
  export const AccountPostSchema = z.object({
158
155
  id: z.string().describe('Post ID'),