@pear-protocol/types 2.6.0 → 2.7.0

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,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const PortfolioResponse: z.ZodObject<{
3
+ hasProvisionalFills: z.ZodBoolean;
3
4
  realizedCashflow: z.ZodObject<{
4
5
  grossPnl: z.ZodNumber;
5
6
  tradeFees: z.ZodNumber;
@@ -120,6 +121,7 @@ export declare const PortfolioAnalyticsResponse: z.ZodObject<{
120
121
  startDate: z.ZodString;
121
122
  endDate: z.ZodString;
122
123
  }, z.core.$strip>;
124
+ hasProvisionalFills: z.ZodBoolean;
123
125
  realizedCashflow: z.ZodObject<{
124
126
  grossPnl: z.ZodNumber;
125
127
  tradeFees: z.ZodNumber;
@@ -2,6 +2,8 @@ import { z } from 'zod';
2
2
  import { PortfolioOpenSnapshot, PortfolioClosedPositionStats, PortfolioVolumeAmounts, PortfolioVolumeIntervals, PortfolioCashflowAmounts, PortfolioCashflowIntervals, PortfolioAnalyticsConfig, PortfolioVolumeSeriesPoint, PortfolioPairBreakdown, PortfolioCashflowSeriesPoint } from './entities';
3
3
 
4
4
  const PortfolioResponse = z.object({
5
+ /** Historical accounting or the current open snapshot still uses provisional fills. */
6
+ hasProvisionalFills: z.boolean(),
5
7
  realizedCashflow: PortfolioCashflowAmounts.extend({
6
8
  fundingSynced: z.boolean(),
7
9
  intervals: PortfolioCashflowIntervals.optional()
@@ -14,6 +16,8 @@ const PortfolioResponse = z.object({
14
16
  });
15
17
  const PortfolioAnalyticsResponse = z.object({
16
18
  config: PortfolioAnalyticsConfig,
19
+ /** Historical accounting or the current open snapshot still uses provisional fills. */
20
+ hasProvisionalFills: z.boolean(),
17
21
  realizedCashflow: PortfolioCashflowAmounts.extend({
18
22
  fundingSynced: z.boolean(),
19
23
  series: z.array(PortfolioCashflowSeriesPoint).optional()
@@ -259,6 +259,7 @@ export declare const ClosedPosition: z.ZodObject<{
259
259
  exitNotional: z.ZodString;
260
260
  exitNotionalComplete: z.ZodBoolean;
261
261
  hasSyntheticFills: z.ZodBoolean;
262
+ hasProvisionalFills: z.ZodBoolean;
262
263
  unstableHistoricalData: z.ZodBoolean;
263
264
  longAssets: z.ZodArray<z.ZodString>;
264
265
  shortAssets: z.ZodArray<z.ZodString>;
@@ -570,6 +571,7 @@ export declare const VaultClosedPosition: z.ZodObject<{
570
571
  netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
571
572
  positionId: z.ZodUUID;
572
573
  openedAt: z.ZodString;
574
+ hasProvisionalFills: z.ZodBoolean;
573
575
  legs: z.ZodArray<z.ZodObject<{
574
576
  side: z.ZodEnum<{
575
577
  LONG: "LONG";
@@ -220,6 +220,8 @@ const ClosedPosition = z.object({
220
220
  exitNotionalComplete: z.boolean(),
221
221
  /** Whether any fill on the position was a synthetic bridge fill (gap/gone reconstruction). */
222
222
  hasSyntheticFills: z.boolean(),
223
+ /** Whether any fill is still PROVISIONAL, so fees and net PnL may still settle. */
224
+ hasProvisionalFills: z.boolean(),
223
225
  /** Whether a backfilled fill made this position's historical metrics unreliable. */
224
226
  unstableHistoricalData: z.boolean(),
225
227
  longAssets: z.array(InstrumentId),
@@ -406,7 +408,8 @@ const VaultClosedPosition = ClosedPosition.pick({
406
408
  closedAt: true,
407
409
  closedReason: true,
408
410
  grossPnl: true,
409
- netPnl: true
411
+ netPnl: true,
412
+ hasProvisionalFills: true
410
413
  }).extend({
411
414
  legs: z.array(VaultClosedPositionLeg)
412
415
  });
@@ -126,6 +126,7 @@ export declare const ClosedPositionListResponse: z.ZodObject<{
126
126
  exitNotional: z.ZodString;
127
127
  exitNotionalComplete: z.ZodBoolean;
128
128
  hasSyntheticFills: z.ZodBoolean;
129
+ hasProvisionalFills: z.ZodBoolean;
129
130
  unstableHistoricalData: z.ZodBoolean;
130
131
  longAssets: z.ZodArray<z.ZodString>;
131
132
  shortAssets: z.ZodArray<z.ZodString>;
@@ -371,6 +372,7 @@ export declare const VaultClosedPositionListResponse: z.ZodObject<{
371
372
  netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
372
373
  positionId: z.ZodUUID;
373
374
  openedAt: z.ZodString;
375
+ hasProvisionalFills: z.ZodBoolean;
374
376
  legs: z.ZodArray<z.ZodObject<{
375
377
  side: z.ZodEnum<{
376
378
  LONG: "LONG";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/types",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "Pear Protocol Types definitions",
5
5
  "private": false,
6
6
  "type": "module",