@pear-protocol/types 0.0.12 → 0.0.13

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/bundle.d.ts CHANGED
@@ -12,6 +12,7 @@ export * from './order';
12
12
  export * from './position';
13
13
  export * from './price';
14
14
  export * from './schedule';
15
+ export * from './statistics';
15
16
  export * from './trade';
16
17
  export * from './trade-accounts';
17
18
  export * from './trigger';
package/dist/bundle.js CHANGED
@@ -12,6 +12,7 @@ export * from './order';
12
12
  export * from './position';
13
13
  export * from './price';
14
14
  export * from './schedule';
15
+ export * from './statistics';
15
16
  export * from './trade';
16
17
  export * from './trade-accounts';
17
18
  export * from './trigger';
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const DailyStatistics: z.ZodObject<{
3
+ date: z.ZodString;
4
+ volume: z.ZodNumber;
5
+ fees: z.ZodNumber;
6
+ users: z.ZodNumber;
7
+ newUsers: z.ZodNumber;
8
+ }, z.core.$strip>;
9
+ export type DailyStatistics = z.output<typeof DailyStatistics>;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+
3
+ const DailyStatistics = z.object({
4
+ date: z.string(),
5
+ volume: z.number(),
6
+ fees: z.number(),
7
+ users: z.number(),
8
+ newUsers: z.number()
9
+ });
10
+
11
+ export { DailyStatistics };
@@ -0,0 +1,3 @@
1
+ export * from './entities';
2
+ export * from './queries';
3
+ export * from './responses';
@@ -0,0 +1,3 @@
1
+ export * from './entities';
2
+ export * from './queries';
3
+ export * from './responses';
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export declare const DailyStatisticsQueryParams: z.ZodObject<{
3
+ connector: z.ZodEnum<{
4
+ hyperliquid: "hyperliquid";
5
+ binance: "binance";
6
+ bybit: "bybit";
7
+ okx: "okx";
8
+ }>;
9
+ startDate: z.ZodOptional<z.ZodCoercedDate<Date>>;
10
+ endDate: z.ZodDefault<z.ZodCoercedDate<Date>>;
11
+ }, z.core.$strip>;
12
+ export type DailyStatisticsQueryParamsInput = z.input<typeof DailyStatisticsQueryParams>;
13
+ export type DailyStatisticsQueryParams = z.output<typeof DailyStatisticsQueryParams>;
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { Connector } from '../connector';
3
+
4
+ const DailyStatisticsQueryParams = z.object({
5
+ connector: Connector,
6
+ startDate: z.coerce.date().optional(),
7
+ endDate: z.coerce.date().default(() => /* @__PURE__ */ new Date())
8
+ }).refine((data) => !data.startDate || data.startDate < data.endDate, {
9
+ message: "startDate must be before endDate"
10
+ });
11
+
12
+ export { DailyStatisticsQueryParams };
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ export declare const DailyStatisticsResponse: z.ZodObject<{
3
+ data: z.ZodArray<z.ZodObject<{
4
+ date: z.ZodString;
5
+ volume: z.ZodNumber;
6
+ fees: z.ZodNumber;
7
+ users: z.ZodNumber;
8
+ newUsers: z.ZodNumber;
9
+ }, z.core.$strip>>;
10
+ }, z.core.$strip>;
11
+ export type DailyStatisticsResponse = z.output<typeof DailyStatisticsResponse>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ import { DailyStatistics } from './entities';
3
+
4
+ const DailyStatisticsResponse = z.object({
5
+ data: z.array(DailyStatistics)
6
+ });
7
+
8
+ export { DailyStatisticsResponse };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/types",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Pear Protocol Types definitions",
5
5
  "private": false,
6
6
  "type": "module",