🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@pear-protocol/types

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pear-protocol/types - npm Package Compare versions

Comparing version
0.0.18
to
0.0.19
+40
dist/trigger/common/index.d.ts
import { z } from 'zod';
export declare const TriggerIntent: z.ZodEnum<{
OPEN: "OPEN";
CLOSE: "CLOSE";
}>;
export type TriggerIntent = z.infer<typeof TriggerIntent>;
export declare const TriggerStatus: z.ZodEnum<{
CANCELLED: "CANCELLED";
ACTIVE: "ACTIVE";
TRIGGERED: "TRIGGERED";
}>;
export type TriggerStatus = z.infer<typeof TriggerStatus>;
export declare const TriggerCancelledReason: z.ZodEnum<{
USER: "USER";
POSITION_CLOSED: "POSITION_CLOSED";
SYSTEM: "SYSTEM";
POSITION_NETTED: "POSITION_NETTED";
}>;
export type TriggerCancelledReason = z.infer<typeof TriggerCancelledReason>;
export declare const BracketType: z.ZodEnum<{
STOP_LOSS: "STOP_LOSS";
TAKE_PROFIT: "TAKE_PROFIT";
NONE: "NONE";
}>;
export type BracketType = z.infer<typeof BracketType>;
export declare const MetricTrack: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
export type MetricTrack = z.infer<typeof MetricTrack>;
export declare const TpSlBracketType: z.ZodEnum<{
STOP_LOSS: "STOP_LOSS";
TAKE_PROFIT: "TAKE_PROFIT";
}>;
export type TpSlBracketType = z.infer<typeof TpSlBracketType>;
export declare const TrailingMode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
export type TrailingMode = z.infer<typeof TrailingMode>;
import { z } from 'zod';
const TriggerIntent = z.enum(["OPEN", "CLOSE"]);
const TriggerStatus = z.enum(["ACTIVE", "TRIGGERED", "CANCELLED"]);
const TriggerCancelledReason = z.enum(["POSITION_CLOSED", "USER", "SYSTEM", "POSITION_NETTED"]);
const BracketType = z.enum(["STOP_LOSS", "TAKE_PROFIT", "NONE"]);
const MetricTrack = z.enum(["PEAK", "TROUGH"]);
const TpSlBracketType = z.enum(["TAKE_PROFIT", "STOP_LOSS"]);
const TrailingMode = z.enum(["RELATIVE_BPS", "ABSOLUTE_POINTS"]);
export { BracketType, MetricTrack, TpSlBracketType, TrailingMode, TriggerCancelledReason, TriggerIntent, TriggerStatus };
export * from './static.refinement';
export * from './trailing.refinement';
export * from './static.refinement';
export * from './trailing.refinement';
import type { z } from 'zod';
import type { BracketType } from '../common';
import type { CreateTriggerConditionCloseStatic } from '../payloads/conditions';
type ValidationFieldIssue = {
field: 'threshold';
message: string;
};
type ConditionType = CreateTriggerConditionCloseStatic['type'];
export declare const RefineStaticLogicalRules: (value: {
bracketType: BracketType;
condition: CreateTriggerConditionCloseStatic;
}, context: z.RefinementCtx) => void;
export declare function getStaticLogicalIssues(input: {
bracketType: BracketType;
conditionType: ConditionType;
threshold: number;
}): ValidationFieldIssue[];
export {};
const RefineStaticLogicalRules = (value, context) => {
for (const issue of getStaticLogicalIssues({
bracketType: value.bracketType,
conditionType: value.condition.type,
threshold: value.condition.data.threshold
})) {
context.addIssue({
code: "custom",
message: issue.message
});
}
};
function getStaticLogicalIssues(input) {
const { conditionType, threshold } = input;
const issues = [];
switch (conditionType) {
case "notional": {
if (threshold <= 0) {
issues.push({
field: "threshold",
message: "threshold must be greater than 0 for notional static triggers"
});
}
break;
}
case "upnl":
case "upnl_bps": {
if (threshold === 0) {
issues.push({
field: "threshold",
message: "threshold must not be 0 for uPnL BPS static triggers"
});
}
break;
}
}
return issues;
}
export { RefineStaticLogicalRules, getStaticLogicalIssues };
import { z } from 'zod';
import type { TrailingMode } from '../common';
import type { CreateTriggerConditionCloseTrailing } from '../payloads/conditions';
type TrailingConfigValue = {
mode: TrailingMode;
deltaValue: number;
activationValue?: number | null;
};
type ValidationFieldIssue = {
field: 'deltaValue' | 'activationValue';
message: string;
};
type ConditionType = CreateTriggerConditionCloseTrailing['type'];
export declare const RefineTrailingConfig: (value: {
mode: TrailingMode;
deltaValue: number;
}, ctx: z.RefinementCtx) => void;
export declare const RefineTrailingLogicalRules: (value: {
condition: CreateTriggerConditionCloseTrailing;
trailing: TrailingConfigValue;
}, ctx: z.RefinementCtx) => void;
export declare function getTrailingLogicalIssues(input: {
conditionType: ConditionType;
trailing: TrailingConfigValue;
}): ValidationFieldIssue[];
export declare function getTrailingDeltaIssues(trailing: TrailingConfigValue): ValidationFieldIssue[];
export {};
import 'zod';
const RefineTrailingConfig = (value, ctx) => {
for (const issue of getTrailingDeltaIssues(value)) {
ctx.addIssue({
code: "custom",
message: issue.message
});
}
};
const RefineTrailingLogicalRules = (value, ctx) => {
for (const issue of getTrailingLogicalIssues({
conditionType: value.condition.type,
trailing: value.trailing
})) {
ctx.addIssue({
code: "custom",
message: issue.message
});
}
};
function getTrailingLogicalIssues(input) {
const { trailing } = input;
const issues = [];
switch (input.conditionType) {
case "notional_trailing": {
if (trailing.activationValue != null && trailing.activationValue <= 0) {
issues.push({
field: "activationValue",
message: "activationValue must be greater than 0 for notional trailing"
});
}
break;
}
case "upnl_trailing":
case "upnl_bps_trailing": {
if (trailing.activationValue === 0) {
issues.push({
field: "activationValue",
message: "activationValue must not be 0 for uPnL trailing"
});
}
break;
}
}
if (input.conditionType === "notional_trailing" && trailing.activationValue != null && trailing.mode === "ABSOLUTE_POINTS" && trailing.deltaValue >= trailing.activationValue) {
issues.push({
field: "deltaValue",
message: "deltaValue must be less than activationValue for notional trailing in ABSOLUTE_POINTS mode"
});
}
return issues;
}
function getTrailingDeltaIssues(trailing) {
const issues = [];
if (trailing.deltaValue <= 0) {
issues.push({
field: "deltaValue",
message: "deltaValue must be greater than 0"
});
return issues;
}
if (trailing.mode !== "RELATIVE_BPS") {
return issues;
}
if (!Number.isInteger(trailing.deltaValue)) {
issues.push({
field: "deltaValue",
message: "deltaValue must be an integer in RELATIVE_BPS mode"
});
}
if (trailing.deltaValue < 1 || trailing.deltaValue > 5e3) {
issues.push({
field: "deltaValue",
message: "deltaValue must be between 1 and 5000 in RELATIVE_BPS mode"
});
}
return issues;
}
export { RefineTrailingConfig, RefineTrailingLogicalRules, getTrailingDeltaIssues, getTrailingLogicalIssues };
+88
-48

@@ -27,7 +27,12 @@ import { z } from 'zod';

}, z.core.$strip>>;
trigger: z.ZodOptional<z.ZodObject<{
trigger: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
bracketType: z.ZodEnum<{
STOP_LOSS: "STOP_LOSS";
TAKE_PROFIT: "TAKE_PROFIT";
NONE: "NONE";
}>;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -38,5 +43,10 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;

@@ -46,3 +56,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -53,10 +63,18 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
}, z.core.$strip>, z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -67,19 +85,21 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
threshold_bps: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
bracketType: z.ZodEnum<{
STOP_LOSS: "STOP_LOSS";
TAKE_PROFIT: "TAKE_PROFIT";
NONE: "NONE";
}>;
trailing: z.ZodOptional<z.ZodObject<{
trailing: z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
}, z.core.$strip>>;
}, z.core.$strip>>;
activationValue: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
}, z.core.$strip>]>>;
}, z.core.$strip>;

@@ -145,7 +165,12 @@ export declare const CreateMarketAdjust: z.ZodObject<{

}, z.core.$strip>>;
trigger: z.ZodOptional<z.ZodObject<{
trigger: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
bracketType: z.ZodEnum<{
STOP_LOSS: "STOP_LOSS";
TAKE_PROFIT: "TAKE_PROFIT";
NONE: "NONE";
}>;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -156,5 +181,10 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;

@@ -164,3 +194,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -171,10 +201,18 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
}, z.core.$strip>, z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -185,19 +223,21 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
threshold_bps: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
bracketType: z.ZodEnum<{
STOP_LOSS: "STOP_LOSS";
TAKE_PROFIT: "TAKE_PROFIT";
NONE: "NONE";
}>;
trailing: z.ZodOptional<z.ZodObject<{
trailing: z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
}, z.core.$strip>>;
}, z.core.$strip>>;
activationValue: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
}, z.core.$strip>]>>;
}, z.core.$strip>], "type">;

@@ -204,0 +244,0 @@ export declare const CreateTradeAdjust: z.ZodDiscriminatedUnion<[z.ZodObject<{

import { z } from 'zod';
declare const TriggerConditionRatioV1: z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
declare const Ratio: z.ZodObject<{
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -11,5 +11,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -19,4 +19,4 @@ threshold: z.ZodNumber;

}, z.core.$strip>;
declare const TriggerConditionPriceV1: z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
declare const Price: z.ZodObject<{
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -28,5 +28,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -36,4 +36,4 @@ threshold: z.ZodNumber;

}, z.core.$strip>;
declare const TriggerConditionIndexV1: z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
declare const WeightedRatio: z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -46,7 +46,11 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -56,4 +60,4 @@ threshold: z.ZodNumber;

}, z.core.$strip>;
declare const TriggerConditionWeightedRatioV1: z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
declare const Notional: z.ZodObject<{
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -64,13 +68,5 @@ priceSource: z.ZodEnum<{

}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -80,4 +76,4 @@ threshold: z.ZodNumber;

}, z.core.$strip>;
declare const TriggerConditionPositionValueV1: z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
declare const Upnl: z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{

@@ -88,5 +84,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -96,4 +92,4 @@ threshold: z.ZodNumber;

}, z.core.$strip>;
declare const TriggerConditionPositionUPnLValueV1: z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
declare const UpnlBps: z.ZodObject<{
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -104,5 +100,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -112,4 +108,4 @@ threshold: z.ZodNumber;

}, z.core.$strip>;
declare const TriggerConditionPositionUPnLPercentageV1: z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
declare const RatioTrailing: z.ZodObject<{
type: z.ZodLiteral<"ratio_trailing">;
data: z.ZodObject<{

@@ -120,11 +116,18 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
symbol_a: z.ZodString;
symbol_b: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>;
declare const PriceTrailing: z.ZodObject<{
type: z.ZodLiteral<"price_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
threshold_bps: z.ZodNumber;
symbol: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>;
export declare const TriggerConditionOpen: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
declare const WeightedRatioTrailing: z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_trailing">;
data: z.ZodObject<{

@@ -135,12 +138,23 @@ priceSource: z.ZodEnum<{

}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
}, z.core.$strip>;
}, z.core.$strip>;
declare const NotionalTrailing: z.ZodObject<{
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
}, z.core.$strip>;
declare const UpnlTrailing: z.ZodObject<{
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -151,11 +165,30 @@ priceSource: z.ZodEnum<{

}>;
symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}, z.core.$strip>;
}, z.core.$strip>;
declare const UpnlBpsTrailing: z.ZodObject<{
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>;
export declare const TriggerConditionOpen: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -166,9 +199,6 @@ priceSource: z.ZodEnum<{

}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
symbol: z.ZodString;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -178,3 +208,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -193,5 +223,5 @@ priceSource: z.ZodEnum<{

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -202,3 +232,3 @@ threshold: z.ZodNumber;

export declare const TriggerConditionAdjust: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -211,5 +241,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -219,3 +249,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -227,5 +257,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -235,3 +265,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -244,19 +274,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -268,5 +281,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -276,3 +289,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -283,5 +296,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -291,3 +304,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{

@@ -298,5 +311,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -306,3 +319,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -313,11 +326,11 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold_bps: z.ZodNumber;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
export declare const TriggerConditionClose: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -330,5 +343,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -338,3 +351,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -346,5 +359,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -354,3 +367,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -363,7 +376,11 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -373,3 +390,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -380,2 +397,60 @@ priceSource: z.ZodEnum<{

}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{

@@ -389,10 +464,5 @@ symbol: z.ZodString;

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{

@@ -403,10 +473,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -417,10 +482,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{

@@ -431,16 +491,16 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold_bps: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
export type TriggerConditionRatioV1 = z.output<typeof TriggerConditionRatioV1>;
export type TriggerConditionPriceV1 = z.output<typeof TriggerConditionPriceV1>;
export type TriggerConditionIndexV1 = z.output<typeof TriggerConditionIndexV1>;
export type TriggerConditionWeightedRatioV1 = z.output<typeof TriggerConditionWeightedRatioV1>;
export type TriggerConditionPositionValueV1 = z.output<typeof TriggerConditionPositionValueV1>;
export type TriggerConditionPositionUPnLValueV1 = z.output<typeof TriggerConditionPositionUPnLValueV1>;
export type TriggerConditionPositionUPnLPercentageV1 = z.output<typeof TriggerConditionPositionUPnLPercentageV1>;
export type TriggerConditionRatio = z.output<typeof Ratio>;
export type TriggerConditionPrice = z.output<typeof Price>;
export type TriggerConditionWeightedRatio = z.output<typeof WeightedRatio>;
export type TriggerConditionNotional = z.output<typeof Notional>;
export type TriggerConditionUpnl = z.output<typeof Upnl>;
export type TriggerConditionUpnlBps = z.output<typeof UpnlBps>;
export type TriggerConditionRatioTrailing = z.output<typeof RatioTrailing>;
export type TriggerConditionPriceTrailing = z.output<typeof PriceTrailing>;
export type TriggerConditionWeightedRatioTrailing = z.output<typeof WeightedRatioTrailing>;
export type TriggerConditionNotionalTrailing = z.output<typeof NotionalTrailing>;
export type TriggerConditionUpnlTrailing = z.output<typeof UpnlTrailing>;
export type TriggerConditionUpnlBpsTrailing = z.output<typeof UpnlBpsTrailing>;
export type TriggerConditionOpen = z.output<typeof TriggerConditionOpen>;

@@ -447,0 +507,0 @@ export type TriggerConditionAdjust = z.output<typeof TriggerConditionAdjust>;

@@ -5,236 +5,132 @@ import { z } from 'zod';

import { PriceSource } from '../../price';
import { MetricTrack } from '../common';
const TriggerDirection = z.enum(["ABOVE", "BELOW"]);
const TriggerConditionRatioV1 = z.object({
/**
* Condition type
*/
type: z.literal("ratio_v1"),
/**
* Condition data
*/
const Ratio = z.object({
type: z.literal("ratio"),
data: z.object({
/**
* Price source
*/
priceSource: PriceSource,
/**
* Numerator symbol
*/
symbol_a: InstrumentId,
/**
* Denominator symbol
*/
symbol_b: InstrumentId,
/**
* Trigger direction
*/
direction: TriggerDirection,
/**
* Price ratio threshold
*/
track: MetricTrack,
threshold: z.number()
})
});
const TriggerConditionPriceV1 = z.object({
/**
* Condition type
*/
type: z.literal("price_v1"),
/**
* Condition data
*/
const Price = z.object({
type: z.literal("price"),
data: z.object({
/**
* Price source
*/
priceSource: PriceSource,
/**
* Asset symbol
*/
symbol: InstrumentId,
/**
* Trigger direction
*/
direction: TriggerDirection,
/**
* Asset price threshold
*/
track: MetricTrack,
threshold: z.number()
})
});
const TriggerConditionIndexV1 = z.object({
/**
* Condition type
*/
type: z.literal("index_v1"),
/**
* Condition data
*/
const WeightedRatio = z.object({
type: z.literal("weighted_ratio"),
data: z.object({
/**
* Price source
*/
priceSource: PriceSource,
/**
* Basket of assets
*/
basket: z.array(
z.object({
/**
* Asset symbol
*/
symbol: InstrumentId,
/**
* Weight (sum of weights should be 1)
*/
side: Side,
weight: z.number()
})
),
/**
* Trigger direction
*/
direction: TriggerDirection,
/**
* Index value threshold
*/
track: MetricTrack,
threshold: z.number()
})
});
const TriggerConditionWeightedRatioV1 = z.object({
/**
* Condition type
*/
type: z.literal("weighted_ratio_v1"),
/**
* Condition data
*/
const Notional = z.object({
type: z.literal("notional"),
data: z.object({
/**
* Price source
*/
priceSource: PriceSource,
/**
* Basket of assets (needs at least one BUY and one SELL)
*/
basket: z.array(
z.object({
/**
* Asset symbol
*/
symbol: InstrumentId,
/**
* Side
*/
side: Side,
/**
* Weight (sum of weights should be 1)
*/
weight: z.number()
})
),
/**
* Trigger direction
*/
direction: TriggerDirection,
/**
* Weighted ratio threshold
*/
track: MetricTrack,
threshold: z.number()
})
});
const TriggerConditionPositionValueV1 = z.object({
/**
* Condition type
*/
type: z.literal("position_value_v1"),
/**
* Condition data
*/
const Upnl = z.object({
type: z.literal("upnl"),
data: z.object({
/**
* Price source
*/
priceSource: PriceSource,
/**
* Trigger direction
*/
direction: TriggerDirection,
/**
* Position USD value threshold
*/
track: MetricTrack,
threshold: z.number()
})
});
const TriggerConditionPositionUPnLValueV1 = z.object({
/**
* Condition type
*/
type: z.literal("position_upnl_value_v1"),
/**
* Condition data
*/
const UpnlBps = z.object({
type: z.literal("upnl_bps"),
data: z.object({
/**
* Price source
*/
priceSource: PriceSource,
/**
* Trigger direction
*/
direction: TriggerDirection,
/**
* PnL value in USD threshold
*/
track: MetricTrack,
threshold: z.number()
})
});
const TriggerConditionPositionUPnLPercentageV1 = z.object({
/**
* Condition type
*/
type: z.literal("position_upnl_percentage_v1"),
/**
* Condition data
*/
const RatioTrailing = z.object({
type: z.literal("ratio_trailing"),
data: z.object({
/**
* Price source
*/
priceSource: PriceSource,
/**
* Trigger direction
*/
direction: TriggerDirection,
/**
* PnL value in basis points threshold
*/
threshold_bps: z.number()
symbol_a: InstrumentId,
symbol_b: InstrumentId
})
});
const TriggerConditionOpen = z.discriminatedUnion("type", [
TriggerConditionRatioV1,
TriggerConditionPriceV1,
TriggerConditionIndexV1,
TriggerConditionWeightedRatioV1
]);
const PriceTrailing = z.object({
type: z.literal("price_trailing"),
data: z.object({
priceSource: PriceSource,
symbol: InstrumentId
})
});
const WeightedRatioTrailing = z.object({
type: z.literal("weighted_ratio_trailing"),
data: z.object({
priceSource: PriceSource,
basket: z.array(
z.object({
symbol: InstrumentId,
side: Side,
weight: z.number()
})
)
})
});
const NotionalTrailing = z.object({
type: z.literal("notional_trailing"),
data: z.object({
priceSource: PriceSource
})
});
const UpnlTrailing = z.object({
type: z.literal("upnl_trailing"),
data: z.object({
priceSource: PriceSource
})
});
const UpnlBpsTrailing = z.object({
type: z.literal("upnl_bps_trailing"),
data: z.object({
priceSource: PriceSource
})
});
const TriggerConditionOpen = z.discriminatedUnion("type", [Ratio, Price, WeightedRatio]);
const TriggerConditionAdjust = z.discriminatedUnion("type", [
TriggerConditionRatioV1,
TriggerConditionPriceV1,
TriggerConditionIndexV1,
TriggerConditionWeightedRatioV1,
TriggerConditionPositionValueV1,
TriggerConditionPositionUPnLValueV1,
TriggerConditionPositionUPnLPercentageV1
Ratio,
Price,
WeightedRatio,
Notional,
Upnl,
UpnlBps
]);
const TriggerConditionClose = z.discriminatedUnion("type", [
TriggerConditionRatioV1,
TriggerConditionPriceV1,
TriggerConditionIndexV1,
TriggerConditionWeightedRatioV1,
TriggerConditionPositionValueV1,
TriggerConditionPositionUPnLValueV1,
TriggerConditionPositionUPnLPercentageV1
Ratio,
Price,
WeightedRatio,
Notional,
Upnl,
UpnlBps,
RatioTrailing,
PriceTrailing,
WeightedRatioTrailing,
NotionalTrailing,
UpnlTrailing,
UpnlBpsTrailing
]);
export { TriggerConditionAdjust, TriggerConditionClose, TriggerConditionOpen };
import { z } from 'zod';
export declare const TriggerIntent: z.ZodEnum<{
OPEN: "OPEN";
CLOSE: "CLOSE";
}>;
export type TriggerIntent = z.infer<typeof TriggerIntent>;
export declare const TriggerStatus: z.ZodEnum<{
CANCELLED: "CANCELLED";
ACTIVE: "ACTIVE";
TRIGGERED: "TRIGGERED";
}>;
export type TriggerStatus = z.infer<typeof TriggerStatus>;
export declare const TriggerCancelledReason: z.ZodEnum<{
USER: "USER";
POSITION_CLOSED: "POSITION_CLOSED";
SYSTEM: "SYSTEM";
POSITION_NETTED: "POSITION_NETTED";
}>;
export type TriggerCancelledReason = z.infer<typeof TriggerCancelledReason>;
export declare const BracketType: z.ZodEnum<{
STOP_LOSS: "STOP_LOSS";
TAKE_PROFIT: "TAKE_PROFIT";
NONE: "NONE";
}>;
export type BracketType = z.infer<typeof BracketType>;
export declare const Trailing: z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
bestMetricSeen: z.ZodOptional<z.ZodNumber>;
currentStopValue: z.ZodOptional<z.ZodNumber>;
stopBreachedAt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;

@@ -166,3 +149,3 @@ declare const BaseTrigger: z.ZodObject<{

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -175,5 +158,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -183,3 +166,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -191,5 +174,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -199,3 +182,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -208,19 +191,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -232,5 +198,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -336,3 +302,3 @@ threshold: z.ZodNumber;

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -345,5 +311,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -353,3 +319,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -361,5 +327,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -369,3 +335,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -378,19 +344,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -402,5 +351,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -410,3 +359,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -417,5 +366,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -425,3 +374,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{

@@ -432,5 +381,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -440,3 +389,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -447,7 +396,7 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold_bps: z.ZodNumber;
threshold: z.ZodNumber;
}, z.core.$strip>;

@@ -488,4 +437,11 @@ }, z.core.$strip>], "type">;

trailing: z.ZodOptional<z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
bestMetricSeen: z.ZodOptional<z.ZodNumber>;
currentStopValue: z.ZodOptional<z.ZodNumber>;
stopBreachedAt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>>;

@@ -562,3 +518,3 @@ }, z.core.$strip>;

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -571,5 +527,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -579,3 +535,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -587,5 +543,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -595,3 +551,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -604,7 +560,11 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -614,3 +574,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -621,2 +581,60 @@ priceSource: z.ZodEnum<{

}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{

@@ -630,10 +648,5 @@ symbol: z.ZodString;

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{

@@ -644,10 +657,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -658,10 +666,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{

@@ -672,7 +675,2 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold_bps: z.ZodNumber;
}, z.core.$strip>;

@@ -688,4 +686,11 @@ }, z.core.$strip>], "type">;

trailing: z.ZodOptional<z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
bestMetricSeen: z.ZodOptional<z.ZodNumber>;
currentStopValue: z.ZodOptional<z.ZodNumber>;
stopBreachedAt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>>;

@@ -762,3 +767,3 @@ }, z.core.$strip>;

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -771,5 +776,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -779,3 +784,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -787,5 +792,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -795,3 +800,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -804,19 +809,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -828,5 +816,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -931,3 +919,3 @@ threshold: z.ZodNumber;

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -940,5 +928,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -948,3 +936,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -956,5 +944,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -964,3 +952,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -973,19 +961,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -997,5 +968,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1005,3 +976,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -1012,5 +983,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1020,3 +991,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{

@@ -1027,5 +998,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1035,3 +1006,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -1042,7 +1013,7 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold_bps: z.ZodNumber;
threshold: z.ZodNumber;
}, z.core.$strip>;

@@ -1083,4 +1054,11 @@ }, z.core.$strip>], "type">;

trailing: z.ZodOptional<z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
bestMetricSeen: z.ZodOptional<z.ZodNumber>;
currentStopValue: z.ZodOptional<z.ZodNumber>;
stopBreachedAt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>>;

@@ -1156,3 +1134,3 @@ }, z.core.$strip>, z.ZodObject<{

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -1165,5 +1143,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1173,3 +1151,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -1181,5 +1159,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1189,3 +1167,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -1198,7 +1176,11 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1208,3 +1190,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -1215,2 +1197,60 @@ priceSource: z.ZodEnum<{

}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{

@@ -1224,10 +1264,5 @@ symbol: z.ZodString;

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{

@@ -1238,10 +1273,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -1252,10 +1282,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{

@@ -1266,7 +1291,2 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold_bps: z.ZodNumber;
}, z.core.$strip>;

@@ -1282,4 +1302,11 @@ }, z.core.$strip>], "type">;

trailing: z.ZodOptional<z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
bestMetricSeen: z.ZodOptional<z.ZodNumber>;
currentStopValue: z.ZodOptional<z.ZodNumber>;
stopBreachedAt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>>;

@@ -1356,3 +1383,3 @@ }, z.core.$strip>], "intent">;

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -1365,5 +1392,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1373,3 +1400,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -1381,5 +1408,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1389,3 +1416,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -1398,19 +1425,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -1422,5 +1432,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1525,3 +1535,3 @@ threshold: z.ZodNumber;

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -1534,5 +1544,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1542,3 +1552,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -1550,5 +1560,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1558,3 +1568,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -1567,19 +1577,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -1591,5 +1584,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1599,3 +1592,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -1606,5 +1599,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1614,3 +1607,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{

@@ -1621,5 +1614,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1629,3 +1622,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -1636,7 +1629,7 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold_bps: z.ZodNumber;
threshold: z.ZodNumber;
}, z.core.$strip>;

@@ -1677,4 +1670,11 @@ }, z.core.$strip>], "type">;

trailing: z.ZodOptional<z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
bestMetricSeen: z.ZodOptional<z.ZodNumber>;
currentStopValue: z.ZodOptional<z.ZodNumber>;
stopBreachedAt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>>;

@@ -1750,3 +1750,3 @@ }, z.core.$strip>, z.ZodObject<{

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -1759,5 +1759,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1767,3 +1767,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -1775,5 +1775,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1783,3 +1783,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -1792,7 +1792,11 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1802,3 +1806,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -1809,2 +1813,60 @@ priceSource: z.ZodEnum<{

}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{

@@ -1818,10 +1880,5 @@ symbol: z.ZodString;

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{

@@ -1832,10 +1889,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -1846,10 +1898,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{

@@ -1860,7 +1907,2 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold_bps: z.ZodNumber;
}, z.core.$strip>;

@@ -1876,4 +1918,11 @@ }, z.core.$strip>], "type">;

trailing: z.ZodOptional<z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
bestMetricSeen: z.ZodOptional<z.ZodNumber>;
currentStopValue: z.ZodOptional<z.ZodNumber>;
stopBreachedAt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>>;

@@ -1880,0 +1929,0 @@ }, z.core.$strip>], "intent">], "type">;

@@ -7,17 +7,31 @@ import { z } from 'zod';

import { InstrumentId } from '../../instrument';
import { TrailingMode, BracketType, TriggerStatus, TriggerCancelledReason } from '../common';
import { TriggerConditionOpen, TriggerConditionAdjust, TriggerConditionClose } from './conditions';
const TriggerIntent = z.enum(["OPEN", "CLOSE"]);
const TriggerStatus = z.enum(["ACTIVE", "TRIGGERED", "CANCELLED"]);
const TriggerCancelledReason = z.enum(["POSITION_CLOSED", "USER", "SYSTEM", "POSITION_NETTED"]);
const BracketType = z.enum(["STOP_LOSS", "TAKE_PROFIT", "NONE"]);
const Trailing = z.object({
/**
* Delta value in arbitrary units
* Trailing mode to track the metric.
*/
mode: TrailingMode,
/**
* Delta value to track the metric in the given mode.
*/
deltaValue: z.number(),
/**
* Activation value in arbitrary units
* Activation value to start tracking the metric.
* When omitted, trailing starts immediately from the current metric.
*/
activationValue: z.number()
activationValue: z.number().optional(),
/**
* Best metric seen
*/
bestMetricSeen: z.number().optional(),
/**
* Current stop value
*/
currentStopValue: z.number().optional(),
/**
* Timestamp (ms) when a stop/activation breach was detected.
*/
stopBreachedAt: z.number().optional()
});

@@ -155,2 +169,2 @@ const BaseTrigger = z.object({

export { BracketType, Trailing, Trigger, TriggerCancelledReason, TriggerIntent, TriggerMarket, TriggerMarketAdjust, TriggerMarketClose, TriggerMarketOpen, TriggerStatus };
export { Trailing, Trigger, TriggerMarket, TriggerMarketAdjust, TriggerMarketClose, TriggerMarketOpen };

@@ -0,1 +1,2 @@

export * from './common';
export * from './entities';

@@ -6,2 +7,3 @@ export * from './entities/conditions';

export * from './queries';
export * from './refinement';
export * from './responses';

@@ -0,1 +1,2 @@

export * from './common';
export * from './entities';

@@ -6,2 +7,3 @@ export * from './entities/conditions';

export * from './queries';
export * from './refinement';
export * from './responses';
import { z } from 'zod';
declare const CreateTriggerConditionRatioV1: z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
export declare const CreateTriggerConditionOpen: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -11,11 +11,10 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>;
declare const CreateTriggerConditionPriceV1: z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -27,11 +26,10 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>;
declare const CreateTriggerConditionIndexV1: z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -44,13 +42,17 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>;
declare const CreateTriggerConditionWeightedRatioV1: z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
}, z.core.$strip>], "type">;
export declare const CreateTriggerConditionCloseStatic: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -61,2 +63,23 @@ priceSource: z.ZodEnum<{

}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol: z.ZodString;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{

@@ -70,11 +93,6 @@ symbol: z.ZodString;

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>;
declare const CreateTriggerConditionPositionValueV1: z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -85,11 +103,6 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>;
declare const CreateTriggerConditionPositionUPnLValueV1: z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{

@@ -100,11 +113,6 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>;
declare const CreateTriggerConditionPositionUPnLPercentageV1: z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -115,11 +123,7 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold_bps: z.ZodNumber;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>;
export declare const CreateTriggerConditionOpen: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
}, z.core.$strip>], "type">;
export declare const CreateTriggerConditionCloseTrailing: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_trailing">;
data: z.ZodObject<{

@@ -132,10 +136,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price_trailing">;
data: z.ZodObject<{

@@ -147,10 +146,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio_trailing">;
data: z.ZodObject<{

@@ -163,19 +157,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -187,11 +164,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
export declare const CreateTriggerConditionClose: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{

@@ -202,12 +173,5 @@ priceSource: z.ZodEnum<{

}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -218,11 +182,5 @@ priceSource: z.ZodEnum<{

}>;
symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{

@@ -233,14 +191,6 @@ priceSource: z.ZodEnum<{

}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
}, z.core.$strip>], "type">;
export declare const CreateTriggerConditionAttachStatic: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -251,18 +201,6 @@ priceSource: z.ZodEnum<{

}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{

@@ -273,10 +211,6 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -287,24 +221,7 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold_bps: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
export declare const CreateTriggerConditionAttach: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
export declare const CreateTriggerConditionAttachTrailing: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{

@@ -315,10 +232,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -329,10 +241,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{

@@ -343,19 +250,53 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold_bps: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
export type CreateTriggerConditionRatioV1 = z.output<typeof CreateTriggerConditionRatioV1>;
export type CreateTriggerConditionPriceV1 = z.output<typeof CreateTriggerConditionPriceV1>;
export type CreateTriggerConditionIndexV1 = z.output<typeof CreateTriggerConditionIndexV1>;
export type CreateTriggerConditionWeightedRatioV1 = z.output<typeof CreateTriggerConditionWeightedRatioV1>;
export type CreateTriggerConditionPositionValueV1 = z.output<typeof CreateTriggerConditionPositionValueV1>;
export type CreateTriggerConditionPositionUPnLValueV1 = z.output<typeof CreateTriggerConditionPositionUPnLValueV1>;
export type CreateTriggerConditionPositionUPnLPercentageV1 = z.output<typeof CreateTriggerConditionPositionUPnLPercentageV1>;
export type CreateTriggerConditionOpen = z.output<typeof CreateTriggerConditionOpen>;
export type CreateTriggerConditionClose = z.output<typeof CreateTriggerConditionClose>;
export type CreateTriggerConditionAttach = z.output<typeof CreateTriggerConditionAttach>;
export {};
export type CreateTriggerConditionRatioOpen = Extract<CreateTriggerConditionOpen, {
type: 'ratio';
}>;
export type CreateTriggerConditionPriceOpen = Extract<CreateTriggerConditionOpen, {
type: 'price';
}>;
export type CreateTriggerConditionWeightedRatioOpen = Extract<CreateTriggerConditionOpen, {
type: 'weighted_ratio';
}>;
export type CreateTriggerConditionCloseStatic = z.output<typeof CreateTriggerConditionCloseStatic>;
export type CreateTriggerConditionRatioCloseStatic = Extract<CreateTriggerConditionCloseStatic, {
type: 'ratio';
}>;
export type CreateTriggerConditionPriceCloseStatic = Extract<CreateTriggerConditionCloseStatic, {
type: 'price';
}>;
export type CreateTriggerConditionWeightedRatioCloseStatic = Extract<CreateTriggerConditionCloseStatic, {
type: 'weighted_ratio';
}>;
export type CreateTriggerConditionNotionalCloseStatic = Extract<CreateTriggerConditionCloseStatic, {
type: 'notional';
}>;
export type CreateTriggerConditionUpnlCloseStatic = Extract<CreateTriggerConditionCloseStatic, {
type: 'upnl';
}>;
export type CreateTriggerConditionUpnlBpsCloseStatic = Extract<CreateTriggerConditionCloseStatic, {
type: 'upnl_bps';
}>;
export type CreateTriggerConditionCloseTrailing = z.output<typeof CreateTriggerConditionCloseTrailing>;
export type CreateTriggerConditionRatioCloseTrailing = Extract<CreateTriggerConditionCloseTrailing, {
type: 'ratio_trailing';
}>;
export type CreateTriggerConditionPriceCloseTrailing = Extract<CreateTriggerConditionCloseTrailing, {
type: 'price_trailing';
}>;
export type CreateTriggerConditionWeightedRatioCloseTrailing = Extract<CreateTriggerConditionCloseTrailing, {
type: 'weighted_ratio_trailing';
}>;
export type CreateTriggerConditionNotionalCloseTrailing = Extract<CreateTriggerConditionCloseTrailing, {
type: 'notional_trailing';
}>;
export type CreateTriggerConditionUpnlCloseTrailing = Extract<CreateTriggerConditionCloseTrailing, {
type: 'upnl_trailing';
}>;
export type CreateTriggerConditionUpnlBpsCloseTrailing = Extract<CreateTriggerConditionCloseTrailing, {
type: 'upnl_bps_trailing';
}>;
export type CreateTriggerConditionAttachStatic = z.output<typeof CreateTriggerConditionAttachStatic>;
export type CreateTriggerConditionAttachTrailing = z.output<typeof CreateTriggerConditionAttachTrailing>;
import { z } from 'zod';
import { RefineTwoUniqueSymbols, RefineMinimumTwoSymbols, RefineWeightingSum, RefineUniqueSymbols, RefineMinimumOneBuyOneSell } from '../../common/refinement';
import { RefineMinimumTwoSymbols, RefineUniqueSymbols, RefineWeightingSum, RefineMinimumOneBuyOneSell, RefineTwoUniqueSymbols } from '../../common/refinement';
import { Side } from '../../common/schema';
import { InstrumentId } from '../../instrument';
import { MetricTrack } from '../common';
const TriggerDirectionEnum = z.enum(["ABOVE", "BELOW"], {
message: "Trigger direction must be ABOVE or BELOW"
});
const TriggerThreshold = z.number().positive({

@@ -16,4 +14,10 @@ message: "Threshold must be greater than 0"

const AssetWeight = z.number().positive({ message: "Weight must be greater than 0" }).max(1, { message: "Weight must be less than 1" });
const CreateTriggerConditionRatioV1 = z.object({
type: z.literal("ratio_v1"),
const WeightedRatioBasketItem = z.object({
symbol: InstrumentId,
side: Side,
weight: AssetWeight
});
const WeightedRatioBasket = z.array(WeightedRatioBasketItem).superRefine(RefineMinimumTwoSymbols).superRefine(RefineUniqueSymbols).superRefine(RefineWeightingSum).superRefine(RefineMinimumOneBuyOneSell);
const RatioOpen = z.object({
type: z.literal("ratio"),
data: z.object({

@@ -23,89 +27,138 @@ priceSource: PriceSource,

symbol_b: InstrumentId,
direction: TriggerDirectionEnum,
track: MetricTrack,
threshold: TriggerThreshold
}).superRefine(RefineTwoUniqueSymbols)
});
const CreateTriggerConditionPriceV1 = z.object({
type: z.literal("price_v1"),
const PriceOpen = z.object({
type: z.literal("price"),
data: z.object({
priceSource: PriceSource,
symbol: InstrumentId,
direction: TriggerDirectionEnum,
track: MetricTrack,
threshold: TriggerThreshold
})
});
const CreateTriggerConditionIndexV1 = z.object({
type: z.literal("index_v1"),
const WeightedRatioOpen = z.object({
type: z.literal("weighted_ratio"),
data: z.object({
priceSource: PriceSource,
basket: z.array(
z.object({
symbol: InstrumentId,
weight: AssetWeight
})
).superRefine(RefineMinimumTwoSymbols).superRefine(RefineWeightingSum).superRefine(RefineUniqueSymbols),
direction: TriggerDirectionEnum,
basket: WeightedRatioBasket,
track: MetricTrack,
threshold: TriggerThreshold
})
});
const CreateTriggerConditionWeightedRatioV1 = z.object({
type: z.literal("weighted_ratio_v1"),
const RatioCloseStatic = z.object({
type: z.literal("ratio"),
data: z.object({
priceSource: PriceSource,
basket: z.array(
z.object({
symbol: InstrumentId,
side: Side,
weight: AssetWeight
})
).superRefine(RefineMinimumTwoSymbols).superRefine(RefineUniqueSymbols).superRefine(RefineWeightingSum).superRefine(RefineMinimumOneBuyOneSell),
direction: TriggerDirectionEnum,
symbol_a: InstrumentId,
symbol_b: InstrumentId,
threshold: TriggerThreshold
}).superRefine(RefineTwoUniqueSymbols)
});
const PriceCloseStatic = z.object({
type: z.literal("price"),
data: z.object({
priceSource: PriceSource,
symbol: InstrumentId,
threshold: TriggerThreshold
})
});
const CreateTriggerConditionPositionValueV1 = z.object({
type: z.literal("position_value_v1"),
const WeightedRatioCloseStatic = z.object({
type: z.literal("weighted_ratio"),
data: z.object({
priceSource: PriceSource,
direction: TriggerDirectionEnum,
basket: WeightedRatioBasket,
threshold: TriggerThreshold
})
});
const CreateTriggerConditionPositionUPnLValueV1 = z.object({
type: z.literal("position_upnl_value_v1"),
const NotionalCloseStatic = z.object({
type: z.literal("notional"),
data: z.object({
priceSource: PriceSource,
direction: TriggerDirectionEnum,
threshold: TriggerThreshold
})
});
const CreateTriggerConditionPositionUPnLPercentageV1 = z.object({
type: z.literal("position_upnl_percentage_v1"),
const UpnlCloseStatic = z.object({
type: z.literal("upnl"),
data: z.object({
priceSource: PriceSource,
direction: TriggerDirectionEnum,
threshold_bps: TriggerThreshold
threshold: z.number()
})
});
const CreateTriggerConditionOpen = z.discriminatedUnion("type", [
CreateTriggerConditionRatioV1,
CreateTriggerConditionPriceV1,
CreateTriggerConditionIndexV1,
CreateTriggerConditionWeightedRatioV1
const UpnlBpsCloseStatic = z.object({
type: z.literal("upnl_bps"),
data: z.object({
priceSource: PriceSource,
threshold: z.number()
})
});
const RatioCloseTrailing = z.object({
type: z.literal("ratio_trailing"),
data: z.object({
priceSource: PriceSource,
symbol_a: InstrumentId,
symbol_b: InstrumentId
}).superRefine(RefineTwoUniqueSymbols)
});
const PriceCloseTrailing = z.object({
type: z.literal("price_trailing"),
data: z.object({
priceSource: PriceSource,
symbol: InstrumentId
})
});
const WeightedRatioCloseTrailing = z.object({
type: z.literal("weighted_ratio_trailing"),
data: z.object({
priceSource: PriceSource,
basket: WeightedRatioBasket
})
});
const NotionalCloseTrailing = z.object({
type: z.literal("notional_trailing"),
data: z.object({
priceSource: PriceSource
})
});
const UpnlCloseTrailing = z.object({
type: z.literal("upnl_trailing"),
data: z.object({
priceSource: PriceSource
})
});
const UpnlBpsCloseTrailing = z.object({
type: z.literal("upnl_bps_trailing"),
data: z.object({
priceSource: PriceSource
})
});
const CreateTriggerConditionOpen = z.discriminatedUnion("type", [RatioOpen, PriceOpen, WeightedRatioOpen]);
const CreateTriggerConditionCloseStatic = z.discriminatedUnion("type", [
RatioCloseStatic,
PriceCloseStatic,
WeightedRatioCloseStatic,
NotionalCloseStatic,
UpnlCloseStatic,
UpnlBpsCloseStatic
]);
const CreateTriggerConditionClose = z.discriminatedUnion("type", [
CreateTriggerConditionRatioV1,
CreateTriggerConditionPriceV1,
CreateTriggerConditionIndexV1,
CreateTriggerConditionWeightedRatioV1,
CreateTriggerConditionPositionValueV1,
CreateTriggerConditionPositionUPnLValueV1,
CreateTriggerConditionPositionUPnLPercentageV1
const CreateTriggerConditionCloseTrailing = z.discriminatedUnion("type", [
RatioCloseTrailing,
PriceCloseTrailing,
WeightedRatioCloseTrailing,
NotionalCloseTrailing,
UpnlCloseTrailing,
UpnlBpsCloseTrailing
]);
const CreateTriggerConditionAttach = z.discriminatedUnion("type", [
CreateTriggerConditionPositionValueV1,
CreateTriggerConditionPositionUPnLValueV1,
CreateTriggerConditionPositionUPnLPercentageV1
const CreateTriggerConditionAttachStatic = z.discriminatedUnion("type", [
NotionalCloseStatic,
UpnlCloseStatic,
UpnlBpsCloseStatic
]);
const CreateTriggerConditionAttachTrailing = z.discriminatedUnion("type", [
NotionalCloseTrailing,
UpnlCloseTrailing,
UpnlBpsCloseTrailing
]);
export { CreateTriggerConditionAttach, CreateTriggerConditionClose, CreateTriggerConditionOpen };
export { CreateTriggerConditionAttachStatic, CreateTriggerConditionAttachTrailing, CreateTriggerConditionCloseStatic, CreateTriggerConditionCloseTrailing, CreateTriggerConditionOpen };
import { z } from 'zod';
export declare const TrailingConfig: z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export declare const CreateTriggerMarketOpen: z.ZodObject<{

@@ -6,3 +14,3 @@ intent: z.ZodLiteral<"OPEN">;

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -15,5 +23,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -23,3 +31,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -31,5 +39,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -39,3 +47,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -48,19 +56,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -72,5 +63,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -107,7 +98,13 @@ threshold: z.ZodNumber;

}, z.core.$strip>;
export declare const CreateTriggerMarketClose: z.ZodObject<{
export declare const CreateTriggerMarketCloseStatic: z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
positionId: z.ZodUUID;
bracketType: z.ZodEnum<{
STOP_LOSS: "STOP_LOSS";
TAKE_PROFIT: "TAKE_PROFIT";
NONE: "NONE";
}>;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -120,10 +117,6 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -135,10 +128,6 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -151,7 +140,16 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;

@@ -161,3 +159,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{

@@ -168,2 +166,45 @@ priceSource: z.ZodEnum<{

}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
}, z.core.$strip>;
export declare const CreateTriggerMarketCloseTrailing: z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
positionId: z.ZodUUID;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{

@@ -177,10 +218,59 @@ symbol: z.ZodString;

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
trailing: z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
}, z.core.$strip>;
export declare const CreateTriggerMarketClose: z.ZodUnion<readonly [z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
positionId: z.ZodUUID;
bracketType: z.ZodEnum<{
STOP_LOSS: "STOP_LOSS";
TAKE_PROFIT: "TAKE_PROFIT";
NONE: "NONE";
}>;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -191,10 +281,24 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
symbol: z.ZodString;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -205,5 +309,10 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;

@@ -213,3 +322,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -220,10 +329,81 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
}, z.core.$strip>, z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
positionId: z.ZodUUID;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
threshold_bps: z.ZodNumber;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
positionId: z.ZodUUID;
trailing: z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
}, z.core.$strip>]>;
export declare const AttachTriggerMarketCloseStatic: z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
bracketType: z.ZodEnum<{

@@ -234,12 +414,4 @@ STOP_LOSS: "STOP_LOSS";

}>;
trailing: z.ZodOptional<z.ZodObject<{
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const AttachTriggerMarketClose: z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -250,5 +422,10 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;

@@ -258,3 +435,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -265,10 +442,19 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
}, z.core.$strip>;
export declare const AttachTriggerMarketCloseTrailing: z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -279,9 +465,24 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
threshold_bps: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
trailing: z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
}, z.core.$strip>;
export declare const AttachTriggerMarketClose: z.ZodUnion<readonly [z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
bracketType: z.ZodEnum<{

@@ -292,12 +493,4 @@ STOP_LOSS: "STOP_LOSS";

}>;
trailing: z.ZodOptional<z.ZodObject<{
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const CreateTriggerOpen: z.ZodDiscriminatedUnion<[z.ZodObject<{
intent: z.ZodLiteral<"OPEN">;
type: z.ZodLiteral<"MARKET">;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -308,7 +501,10 @@ priceSource: z.ZodEnum<{

}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;

@@ -318,3 +514,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -325,11 +521,62 @@ priceSource: z.ZodEnum<{

}>;
symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
}, z.core.$strip>, z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
trailing: z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
}, z.core.$strip>]>;
export declare const CreateTriggerOpen: z.ZodDiscriminatedUnion<[z.ZodObject<{
intent: z.ZodLiteral<"OPEN">;
type: z.ZodLiteral<"MARKET">;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -340,9 +587,6 @@ priceSource: z.ZodEnum<{

}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
symbol: z.ZodString;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -352,3 +596,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -367,5 +611,5 @@ priceSource: z.ZodEnum<{

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -402,7 +646,13 @@ threshold: z.ZodNumber;

}, z.core.$strip>], "type">;
export declare const CreateTriggerClose: z.ZodDiscriminatedUnion<[z.ZodObject<{
export declare const CreateTriggerClose: z.ZodUnion<readonly [z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
positionId: z.ZodUUID;
bracketType: z.ZodEnum<{
STOP_LOSS: "STOP_LOSS";
TAKE_PROFIT: "TAKE_PROFIT";
NONE: "NONE";
}>;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -415,10 +665,6 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -430,10 +676,6 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -446,7 +688,16 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;

@@ -456,3 +707,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{

@@ -463,2 +714,44 @@ priceSource: z.ZodEnum<{

}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
}, z.core.$strip>, z.ZodObject<{
intent: z.ZodLiteral<"CLOSE">;
type: z.ZodLiteral<"MARKET">;
positionId: z.ZodUUID;
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{

@@ -472,10 +765,5 @@ symbol: z.ZodString;

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{

@@ -486,10 +774,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -500,10 +783,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{

@@ -514,24 +792,22 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold_bps: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>], "type">;
positionId: z.ZodUUID;
bracketType: z.ZodEnum<{
STOP_LOSS: "STOP_LOSS";
TAKE_PROFIT: "TAKE_PROFIT";
NONE: "NONE";
}>;
trailing: z.ZodOptional<z.ZodObject<{
trailing: z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
}, z.core.$strip>>;
}, z.core.$strip>], "type">;
activationValue: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
}, z.core.$strip>]>;
export type CreateTriggerMarketOpen = z.output<typeof CreateTriggerMarketOpen>;
export type CreateTriggerMarketCloseStatic = z.output<typeof CreateTriggerMarketCloseStatic>;
export type CreateTriggerMarketCloseTrailing = z.output<typeof CreateTriggerMarketCloseTrailing>;
export type CreateTriggerMarketClose = z.output<typeof CreateTriggerMarketClose>;
export type AttachTriggerMarketCloseStatic = z.output<typeof AttachTriggerMarketCloseStatic>;
export type AttachTriggerMarketCloseTrailing = z.output<typeof AttachTriggerMarketCloseTrailing>;
export type AttachTriggerMarketClose = z.output<typeof AttachTriggerMarketClose>;
export type CreateTriggerOpen = z.output<typeof CreateTriggerOpen>;
export type CreateTriggerClose = z.output<typeof CreateTriggerClose>;
export type TrailingConfig = z.output<typeof TrailingConfig>;
import { z } from 'zod';
import { RefineMinimumOneSymbol, RefineUniqueSymbols } from '../../common/refinement';
import { TradeLegPostOnly } from '../../common/trade-legs';
import { BracketType, Trailing } from '../entities';
import { CreateTriggerConditionOpen, CreateTriggerConditionClose, CreateTriggerConditionAttach } from './conditions';
import { TrailingMode, BracketType } from '../common';
import { RefineStaticLogicalRules } from '../refinement/static.refinement';
import { RefineTrailingConfig, RefineTrailingLogicalRules } from '../refinement/trailing.refinement';
import { CreateTriggerConditionOpen, CreateTriggerConditionCloseStatic, CreateTriggerConditionCloseTrailing, CreateTriggerConditionAttachStatic, CreateTriggerConditionAttachTrailing } from './conditions';
const RefineTrailingRequiresBracket = (value, context) => {
if (value.trailing !== void 0 && value.bracketType === "NONE") {
context.addIssue({
code: "custom",
message: "bracketType must be STOP_LOSS or TAKE_PROFIT when trailing is provided",
path: ["bracketType"]
});
}
};
const TrailingConfig = z.object({
mode: TrailingMode,
deltaValue: z.number(),
activationValue: z.number().optional()
}).superRefine(RefineTrailingConfig);
const CreateTriggerMarketOpen = z.object({
intent: z.literal("OPEN"),
type: z.literal("MARKET"),
/**
* Condition to fire the trigger
*/
condition: CreateTriggerConditionOpen,
/**
* MARKET Execution details to execute when the trigger is fired
*/
payload: z.object({
type: z.literal("MARKET"),
/**
* Requested legs
*/
legs: z.tuple([TradeLegPostOnly]).rest(TradeLegPostOnly).superRefine(RefineMinimumOneSymbol).superRefine(RefineUniqueSymbols).describe("Array of legs to make up the exposure")
})
});
const CreateTriggerMarketClose = z.object({
const CreateTriggerMarketCloseStatic = z.object({
intent: z.literal("CLOSE"),
type: z.literal("MARKET"),
/**
* Condition to fire the trigger
*/
condition: CreateTriggerConditionClose,
/**
* Position UUID
*/
positionId: z.uuid(),
/**
* Bracket type (stop loss / take profit / none)
*/
bracketType: BracketType,
/**
* Optional: trailing configuration
*/
trailing: Trailing.optional()
}).superRefine(RefineTrailingRequiresBracket);
const AttachTriggerMarketClose = z.object({
condition: CreateTriggerConditionCloseStatic
}).superRefine(RefineStaticLogicalRules);
const CreateTriggerMarketCloseTrailing = z.object({
intent: z.literal("CLOSE"),
type: z.literal("MARKET"),
/**
* Condition to fire the trigger
*/
condition: CreateTriggerConditionAttach,
/**
* Bracket type (stop loss / take profit / none)
*/
positionId: z.uuid(),
condition: CreateTriggerConditionCloseTrailing,
trailing: TrailingConfig
}).superRefine(RefineTrailingLogicalRules);
const CreateTriggerMarketClose = z.union([CreateTriggerMarketCloseStatic, CreateTriggerMarketCloseTrailing]);
const AttachTriggerMarketCloseStatic = z.object({
intent: z.literal("CLOSE"),
type: z.literal("MARKET"),
bracketType: BracketType,
/**
* Optional: trailing configuration
*/
trailing: Trailing.optional()
}).superRefine(RefineTrailingRequiresBracket);
condition: CreateTriggerConditionAttachStatic
}).superRefine(RefineStaticLogicalRules);
const AttachTriggerMarketCloseTrailing = z.object({
intent: z.literal("CLOSE"),
type: z.literal("MARKET"),
condition: CreateTriggerConditionAttachTrailing,
trailing: TrailingConfig
}).superRefine(RefineTrailingLogicalRules);
const AttachTriggerMarketClose = z.union([AttachTriggerMarketCloseStatic, AttachTriggerMarketCloseTrailing]);
const CreateTriggerOpen = z.discriminatedUnion("type", [CreateTriggerMarketOpen]);
const CreateTriggerClose = z.discriminatedUnion("type", [CreateTriggerMarketClose]);
const CreateTriggerClose = CreateTriggerMarketClose;
export { AttachTriggerMarketClose, CreateTriggerClose, CreateTriggerMarketClose, CreateTriggerMarketOpen, CreateTriggerOpen };
export { AttachTriggerMarketClose, AttachTriggerMarketCloseStatic, AttachTriggerMarketCloseTrailing, CreateTriggerClose, CreateTriggerMarketClose, CreateTriggerMarketCloseStatic, CreateTriggerMarketCloseTrailing, CreateTriggerMarketOpen, CreateTriggerOpen, TrailingConfig };

@@ -74,3 +74,3 @@ import { z } from 'zod';

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -83,5 +83,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -91,3 +91,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -99,5 +99,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -107,3 +107,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -116,19 +116,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -140,5 +123,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -243,3 +226,3 @@ threshold: z.ZodNumber;

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -252,5 +235,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -260,3 +243,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -268,5 +251,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -276,3 +259,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -285,19 +268,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -309,5 +275,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -317,3 +283,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -324,5 +290,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -332,3 +298,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{

@@ -339,5 +305,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -347,3 +313,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -354,7 +320,7 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold_bps: z.ZodNumber;
threshold: z.ZodNumber;
}, z.core.$strip>;

@@ -395,4 +361,11 @@ }, z.core.$strip>], "type">;

trailing: z.ZodOptional<z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
bestMetricSeen: z.ZodOptional<z.ZodNumber>;
currentStopValue: z.ZodOptional<z.ZodNumber>;
stopBreachedAt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>>;

@@ -468,3 +441,3 @@ }, z.core.$strip>, z.ZodObject<{

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -477,5 +450,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -485,3 +458,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -493,5 +466,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -501,3 +474,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -510,7 +483,11 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -520,3 +497,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -527,2 +504,60 @@ priceSource: z.ZodEnum<{

}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{

@@ -536,10 +571,5 @@ symbol: z.ZodString;

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{

@@ -550,10 +580,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -564,10 +589,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{

@@ -578,7 +598,2 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold_bps: z.ZodNumber;
}, z.core.$strip>;

@@ -594,4 +609,11 @@ }, z.core.$strip>], "type">;

trailing: z.ZodOptional<z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
bestMetricSeen: z.ZodOptional<z.ZodNumber>;
currentStopValue: z.ZodOptional<z.ZodNumber>;
stopBreachedAt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>>;

@@ -671,3 +693,3 @@ }, z.core.$strip>], "intent">], "type">>;

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -680,5 +702,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -688,3 +710,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -696,5 +718,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -704,3 +726,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -713,19 +735,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -737,5 +742,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -840,3 +845,3 @@ threshold: z.ZodNumber;

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -849,5 +854,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -857,3 +862,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -865,5 +870,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -873,3 +878,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -882,19 +887,2 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{
symbol: z.ZodString;
side: z.ZodEnum<{

@@ -906,5 +894,5 @@ BUY: "BUY";

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -914,3 +902,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -921,5 +909,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -929,3 +917,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{

@@ -936,5 +924,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -944,3 +932,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{

@@ -951,7 +939,7 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold_bps: z.ZodNumber;
threshold: z.ZodNumber;
}, z.core.$strip>;

@@ -992,4 +980,11 @@ }, z.core.$strip>], "type">;

trailing: z.ZodOptional<z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
bestMetricSeen: z.ZodOptional<z.ZodNumber>;
currentStopValue: z.ZodOptional<z.ZodNumber>;
stopBreachedAt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>>;

@@ -1065,3 +1060,3 @@ }, z.core.$strip>, z.ZodObject<{

condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"ratio_v1">;
type: z.ZodLiteral<"ratio">;
data: z.ZodObject<{

@@ -1074,5 +1069,5 @@ priceSource: z.ZodEnum<{

symbol_b: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1082,3 +1077,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_v1">;
type: z.ZodLiteral<"price">;
data: z.ZodObject<{

@@ -1090,5 +1085,5 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1098,3 +1093,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"index_v1">;
type: z.ZodLiteral<"weighted_ratio">;
data: z.ZodObject<{

@@ -1107,7 +1102,11 @@ priceSource: z.ZodEnum<{

symbol: z.ZodString;
side: z.ZodEnum<{
BUY: "BUY";
SELL: "SELL";
}>;
weight: z.ZodNumber;
}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;

@@ -1117,3 +1116,3 @@ threshold: z.ZodNumber;

}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_v1">;
type: z.ZodLiteral<"notional">;
data: z.ZodObject<{

@@ -1124,2 +1123,60 @@ priceSource: z.ZodEnum<{

}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"upnl_bps">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
track: z.ZodEnum<{
PEAK: "PEAK";
TROUGH: "TROUGH";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol_a: z.ZodString;
symbol_b: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"price_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
symbol: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"weighted_ratio_trailing">;
data: z.ZodObject<{
priceSource: z.ZodEnum<{
mid: "mid";
mark: "mark";
}>;
basket: z.ZodArray<z.ZodObject<{

@@ -1133,10 +1190,5 @@ symbol: z.ZodString;

}, z.core.$strip>>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_value_v1">;
type: z.ZodLiteral<"notional_trailing">;
data: z.ZodObject<{

@@ -1147,10 +1199,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_value_v1">;
type: z.ZodLiteral<"upnl_trailing">;
data: z.ZodObject<{

@@ -1161,10 +1208,5 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold: z.ZodNumber;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"position_upnl_percentage_v1">;
type: z.ZodLiteral<"upnl_bps_trailing">;
data: z.ZodObject<{

@@ -1175,7 +1217,2 @@ priceSource: z.ZodEnum<{

}>;
direction: z.ZodEnum<{
ABOVE: "ABOVE";
BELOW: "BELOW";
}>;
threshold_bps: z.ZodNumber;
}, z.core.$strip>;

@@ -1191,4 +1228,11 @@ }, z.core.$strip>], "type">;

trailing: z.ZodOptional<z.ZodObject<{
mode: z.ZodEnum<{
RELATIVE_BPS: "RELATIVE_BPS";
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
}>;
deltaValue: z.ZodNumber;
activationValue: z.ZodNumber;
activationValue: z.ZodOptional<z.ZodNumber>;
bestMetricSeen: z.ZodOptional<z.ZodNumber>;
currentStopValue: z.ZodOptional<z.ZodNumber>;
stopBreachedAt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>>;

@@ -1195,0 +1239,0 @@ }, z.core.$strip>], "intent">], "type">;

{
"name": "@pear-protocol/types",
"version": "0.0.18",
"version": "0.0.19",
"description": "Pear Protocol Types definitions",

@@ -23,2 +23,3 @@ "private": false,

"scripts": {
"test": "vitest run",
"build": "tsup && tsc -p tsconfig.build.json",

@@ -34,4 +35,5 @@ "clean": "rm -rf dist .turbo",

"tsup": "8.5.1",
"typescript": "5.9.3"
"typescript": "5.9.3",
"vitest": "4.1.2"
}
}