@crosspost/types 0.2.10 → 0.2.11

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
@@ -555,6 +555,7 @@ var TimePeriod = /* @__PURE__ */ ((TimePeriod2) => {
555
555
  TimePeriod2["MONTHLY"] = "month";
556
556
  TimePeriod2["WEEKLY"] = "week";
557
557
  TimePeriod2["DAILY"] = "day";
558
+ TimePeriod2["CUSTOM"] = "custom";
558
559
  return TimePeriod2;
559
560
  })(TimePeriod || {});
560
561
  var FilterSchema = import_zod8.z.object({
@@ -584,7 +585,9 @@ var FilterSchema = import_zod8.z.object({
584
585
  ).describe("Filter by activity types (comma-separated list, optional)"),
585
586
  timeframe: import_zod8.z.nativeEnum(TimePeriod).optional().describe(
586
587
  "Timeframe for filtering (optional)"
587
- )
588
+ ),
589
+ startDate: import_zod8.z.string().datetime().optional().describe("Start date for custom timeframe (ISO 8601 format, optional - defaults to beginning when timeframe=custom)"),
590
+ endDate: import_zod8.z.string().datetime().optional().describe("End date for custom timeframe (ISO 8601 format, optional - defaults to now when timeframe=custom)")
588
591
  }).describe("Filter parameters");
589
592
  var PaginationSchema = import_zod8.z.object({
590
593
  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)"),
package/dist/index.d.cts CHANGED
@@ -2708,7 +2708,8 @@ declare enum TimePeriod {
2708
2708
  YEARLY = "year",
2709
2709
  MONTHLY = "month",
2710
2710
  WEEKLY = "week",
2711
- DAILY = "day"
2711
+ DAILY = "day",
2712
+ CUSTOM = "custom"
2712
2713
  }
2713
2714
  /**
2714
2715
  * Schema for filtering by platform, activity type, and timeframe
@@ -2718,14 +2719,20 @@ declare const FilterSchema: z.ZodObject<{
2718
2719
  platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2719
2720
  types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2720
2721
  timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
2722
+ startDate: z.ZodOptional<z.ZodString>;
2723
+ endDate: z.ZodOptional<z.ZodString>;
2721
2724
  }, "strip", z.ZodTypeAny, {
2722
2725
  platforms?: Platform[] | undefined;
2723
2726
  types?: ActivityType[] | undefined;
2724
2727
  timeframe?: TimePeriod | undefined;
2728
+ startDate?: string | undefined;
2729
+ endDate?: string | undefined;
2725
2730
  }, {
2726
2731
  platforms?: string | undefined;
2727
2732
  types?: string | undefined;
2728
2733
  timeframe?: TimePeriod | undefined;
2734
+ startDate?: string | undefined;
2735
+ endDate?: string | undefined;
2729
2736
  }>;
2730
2737
  /**
2731
2738
  * Common pagination schema used across queries
@@ -2747,6 +2754,8 @@ declare const ActivityLeaderboardQuerySchema: z.ZodObject<z.objectUtil.extendSha
2747
2754
  platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2748
2755
  types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2749
2756
  timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
2757
+ startDate: z.ZodOptional<z.ZodString>;
2758
+ endDate: z.ZodOptional<z.ZodString>;
2750
2759
  }, {
2751
2760
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
2752
2761
  offset: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
@@ -2756,12 +2765,16 @@ declare const ActivityLeaderboardQuerySchema: z.ZodObject<z.objectUtil.extendSha
2756
2765
  platforms?: Platform[] | undefined;
2757
2766
  types?: ActivityType[] | undefined;
2758
2767
  timeframe?: TimePeriod | undefined;
2768
+ startDate?: string | undefined;
2769
+ endDate?: string | undefined;
2759
2770
  }, {
2760
2771
  limit?: string | undefined;
2761
2772
  offset?: string | undefined;
2762
2773
  platforms?: string | undefined;
2763
2774
  types?: string | undefined;
2764
2775
  timeframe?: TimePeriod | undefined;
2776
+ startDate?: string | undefined;
2777
+ endDate?: string | undefined;
2765
2778
  }>;
2766
2779
  declare const AccountActivityEntrySchema: z.ZodObject<{
2767
2780
  signerId: z.ZodString;
@@ -2882,6 +2895,8 @@ declare const AccountActivityQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
2882
2895
  platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2883
2896
  types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2884
2897
  timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
2898
+ startDate: z.ZodOptional<z.ZodString>;
2899
+ endDate: z.ZodOptional<z.ZodString>;
2885
2900
  }, {
2886
2901
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
2887
2902
  offset: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
@@ -2891,12 +2906,16 @@ declare const AccountActivityQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
2891
2906
  platforms?: Platform[] | undefined;
2892
2907
  types?: ActivityType[] | undefined;
2893
2908
  timeframe?: TimePeriod | undefined;
2909
+ startDate?: string | undefined;
2910
+ endDate?: string | undefined;
2894
2911
  }, {
2895
2912
  limit?: string | undefined;
2896
2913
  offset?: string | undefined;
2897
2914
  platforms?: string | undefined;
2898
2915
  types?: string | undefined;
2899
2916
  timeframe?: TimePeriod | undefined;
2917
+ startDate?: string | undefined;
2918
+ endDate?: string | undefined;
2900
2919
  }>;
2901
2920
  declare const PlatformActivitySchema: z.ZodObject<{
2902
2921
  platform: z.ZodNativeEnum<typeof Platform>;
@@ -3022,6 +3041,8 @@ declare const AccountPostsQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
3022
3041
  platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
3023
3042
  types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
3024
3043
  timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
3044
+ startDate: z.ZodOptional<z.ZodString>;
3045
+ endDate: z.ZodOptional<z.ZodString>;
3025
3046
  }, {
3026
3047
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
3027
3048
  offset: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
@@ -3031,12 +3052,16 @@ declare const AccountPostsQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
3031
3052
  platforms?: Platform[] | undefined;
3032
3053
  types?: ActivityType[] | undefined;
3033
3054
  timeframe?: TimePeriod | undefined;
3055
+ startDate?: string | undefined;
3056
+ endDate?: string | undefined;
3034
3057
  }, {
3035
3058
  limit?: string | undefined;
3036
3059
  offset?: string | undefined;
3037
3060
  platforms?: string | undefined;
3038
3061
  types?: string | undefined;
3039
3062
  timeframe?: TimePeriod | undefined;
3063
+ startDate?: string | undefined;
3064
+ endDate?: string | undefined;
3040
3065
  }>;
3041
3066
  declare const AccountPostSchema: z.ZodObject<{
3042
3067
  id: z.ZodString;
package/dist/index.d.ts CHANGED
@@ -2708,7 +2708,8 @@ declare enum TimePeriod {
2708
2708
  YEARLY = "year",
2709
2709
  MONTHLY = "month",
2710
2710
  WEEKLY = "week",
2711
- DAILY = "day"
2711
+ DAILY = "day",
2712
+ CUSTOM = "custom"
2712
2713
  }
2713
2714
  /**
2714
2715
  * Schema for filtering by platform, activity type, and timeframe
@@ -2718,14 +2719,20 @@ declare const FilterSchema: z.ZodObject<{
2718
2719
  platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2719
2720
  types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2720
2721
  timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
2722
+ startDate: z.ZodOptional<z.ZodString>;
2723
+ endDate: z.ZodOptional<z.ZodString>;
2721
2724
  }, "strip", z.ZodTypeAny, {
2722
2725
  platforms?: Platform[] | undefined;
2723
2726
  types?: ActivityType[] | undefined;
2724
2727
  timeframe?: TimePeriod | undefined;
2728
+ startDate?: string | undefined;
2729
+ endDate?: string | undefined;
2725
2730
  }, {
2726
2731
  platforms?: string | undefined;
2727
2732
  types?: string | undefined;
2728
2733
  timeframe?: TimePeriod | undefined;
2734
+ startDate?: string | undefined;
2735
+ endDate?: string | undefined;
2729
2736
  }>;
2730
2737
  /**
2731
2738
  * Common pagination schema used across queries
@@ -2747,6 +2754,8 @@ declare const ActivityLeaderboardQuerySchema: z.ZodObject<z.objectUtil.extendSha
2747
2754
  platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2748
2755
  types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2749
2756
  timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
2757
+ startDate: z.ZodOptional<z.ZodString>;
2758
+ endDate: z.ZodOptional<z.ZodString>;
2750
2759
  }, {
2751
2760
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
2752
2761
  offset: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
@@ -2756,12 +2765,16 @@ declare const ActivityLeaderboardQuerySchema: z.ZodObject<z.objectUtil.extendSha
2756
2765
  platforms?: Platform[] | undefined;
2757
2766
  types?: ActivityType[] | undefined;
2758
2767
  timeframe?: TimePeriod | undefined;
2768
+ startDate?: string | undefined;
2769
+ endDate?: string | undefined;
2759
2770
  }, {
2760
2771
  limit?: string | undefined;
2761
2772
  offset?: string | undefined;
2762
2773
  platforms?: string | undefined;
2763
2774
  types?: string | undefined;
2764
2775
  timeframe?: TimePeriod | undefined;
2776
+ startDate?: string | undefined;
2777
+ endDate?: string | undefined;
2765
2778
  }>;
2766
2779
  declare const AccountActivityEntrySchema: z.ZodObject<{
2767
2780
  signerId: z.ZodString;
@@ -2882,6 +2895,8 @@ declare const AccountActivityQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
2882
2895
  platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
2883
2896
  types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
2884
2897
  timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
2898
+ startDate: z.ZodOptional<z.ZodString>;
2899
+ endDate: z.ZodOptional<z.ZodString>;
2885
2900
  }, {
2886
2901
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
2887
2902
  offset: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
@@ -2891,12 +2906,16 @@ declare const AccountActivityQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
2891
2906
  platforms?: Platform[] | undefined;
2892
2907
  types?: ActivityType[] | undefined;
2893
2908
  timeframe?: TimePeriod | undefined;
2909
+ startDate?: string | undefined;
2910
+ endDate?: string | undefined;
2894
2911
  }, {
2895
2912
  limit?: string | undefined;
2896
2913
  offset?: string | undefined;
2897
2914
  platforms?: string | undefined;
2898
2915
  types?: string | undefined;
2899
2916
  timeframe?: TimePeriod | undefined;
2917
+ startDate?: string | undefined;
2918
+ endDate?: string | undefined;
2900
2919
  }>;
2901
2920
  declare const PlatformActivitySchema: z.ZodObject<{
2902
2921
  platform: z.ZodNativeEnum<typeof Platform>;
@@ -3022,6 +3041,8 @@ declare const AccountPostsQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
3022
3041
  platforms: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Platform>, "many">>>;
3023
3042
  types: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ActivityType>, "many">>>;
3024
3043
  timeframe: z.ZodOptional<z.ZodNativeEnum<typeof TimePeriod>>;
3044
+ startDate: z.ZodOptional<z.ZodString>;
3045
+ endDate: z.ZodOptional<z.ZodString>;
3025
3046
  }, {
3026
3047
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
3027
3048
  offset: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number | undefined, string | undefined>, z.ZodOptional<z.ZodNumber>>;
@@ -3031,12 +3052,16 @@ declare const AccountPostsQuerySchema: z.ZodObject<z.objectUtil.extendShape<{
3031
3052
  platforms?: Platform[] | undefined;
3032
3053
  types?: ActivityType[] | undefined;
3033
3054
  timeframe?: TimePeriod | undefined;
3055
+ startDate?: string | undefined;
3056
+ endDate?: string | undefined;
3034
3057
  }, {
3035
3058
  limit?: string | undefined;
3036
3059
  offset?: string | undefined;
3037
3060
  platforms?: string | undefined;
3038
3061
  types?: string | undefined;
3039
3062
  timeframe?: TimePeriod | undefined;
3063
+ startDate?: string | undefined;
3064
+ endDate?: string | undefined;
3040
3065
  }>;
3041
3066
  declare const AccountPostSchema: z.ZodObject<{
3042
3067
  id: z.ZodString;
package/dist/index.js CHANGED
@@ -450,6 +450,7 @@ var TimePeriod = /* @__PURE__ */ ((TimePeriod2) => {
450
450
  TimePeriod2["MONTHLY"] = "month";
451
451
  TimePeriod2["WEEKLY"] = "week";
452
452
  TimePeriod2["DAILY"] = "day";
453
+ TimePeriod2["CUSTOM"] = "custom";
453
454
  return TimePeriod2;
454
455
  })(TimePeriod || {});
455
456
  var FilterSchema = z8.object({
@@ -479,7 +480,9 @@ var FilterSchema = z8.object({
479
480
  ).describe("Filter by activity types (comma-separated list, optional)"),
480
481
  timeframe: z8.nativeEnum(TimePeriod).optional().describe(
481
482
  "Timeframe for filtering (optional)"
482
- )
483
+ ),
484
+ startDate: z8.string().datetime().optional().describe("Start date for custom timeframe (ISO 8601 format, optional - defaults to beginning when timeframe=custom)"),
485
+ endDate: z8.string().datetime().optional().describe("End date for custom timeframe (ISO 8601 format, optional - defaults to now when timeframe=custom)")
483
486
  }).describe("Filter parameters");
484
487
  var PaginationSchema = z8.object({
485
488
  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)"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crosspost/types",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Shared type definitions for Crosspost API",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
package/src/activity.ts CHANGED
@@ -17,6 +17,7 @@ export enum TimePeriod {
17
17
  MONTHLY = 'month',
18
18
  WEEKLY = 'week',
19
19
  DAILY = 'day',
20
+ CUSTOM = 'custom',
20
21
  }
21
22
 
22
23
  /**
@@ -61,6 +62,10 @@ export const FilterSchema = z.object({
61
62
  timeframe: z.nativeEnum(TimePeriod).optional().describe(
62
63
  'Timeframe for filtering (optional)',
63
64
  ),
65
+ startDate: z.string().datetime().optional()
66
+ .describe('Start date for custom timeframe (ISO 8601 format, optional - defaults to beginning when timeframe=custom)'),
67
+ endDate: z.string().datetime().optional()
68
+ .describe('End date for custom timeframe (ISO 8601 format, optional - defaults to now when timeframe=custom)'),
64
69
  }).describe('Filter parameters');
65
70
 
66
71
  /**