@pear-protocol/types 2.24.0 → 2.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -182,12 +182,15 @@ __export(bundle_exports, {
182
182
  ExchangeCredentialsResponse: () => ExchangeCredentialsResponse,
183
183
  ExchangeXLoginRequest: () => ExchangeXLoginRequest,
184
184
  Execution: () => Execution,
185
+ ExecutionErrorCode: () => ExecutionErrorCode,
185
186
  ExecutionFulfillment: () => ExecutionFulfillment,
186
187
  ExecutionIntent: () => ExecutionIntent,
187
188
  ExecutionLegMode: () => ExecutionLegMode,
188
189
  ExecutionListParams: () => ExecutionListParams,
189
190
  ExecutionListResponse: () => ExecutionListResponse,
190
191
  ExecutionOrderType: () => ExecutionOrderType,
192
+ ExecutionRefusedLeg: () => ExecutionRefusedLeg,
193
+ ExecutionRefusedLegErrorCode: () => ExecutionRefusedLegErrorCode,
191
194
  ExecutionStatus: () => ExecutionStatus,
192
195
  ExternalPosition: () => ExternalPosition,
193
196
  ExternalTrigger: () => ExternalTrigger,
@@ -1762,7 +1765,8 @@ var CopyLeaderAction = z.enum([
1762
1765
  "CLOSE",
1763
1766
  "REVERSE",
1764
1767
  "TWAP",
1765
- "TWAP_END"
1768
+ "TWAP_END",
1769
+ "LEVERAGE_CHANGED"
1766
1770
  ]);
1767
1771
  var CopyExecutionSource = z.discriminatedUnion("origin", [
1768
1772
  z.object({
@@ -2717,6 +2721,16 @@ var ExecutionLegMode = z.enum([
2717
2721
  "QUANTITY",
2718
2722
  "USD"
2719
2723
  ]);
2724
+ var ExecutionErrorCode = z.enum([
2725
+ "INSUFFICIENT_SIZE",
2726
+ "INSUFFICIENT_SIZE_SHARED",
2727
+ "LEGS_FAILED",
2728
+ "EXECUTION_CREATION_COMPENSATED"
2729
+ ]);
2730
+ var ExecutionRefusedLegErrorCode = ExecutionErrorCode.extract([
2731
+ "INSUFFICIENT_SIZE",
2732
+ "INSUFFICIENT_SIZE_SHARED"
2733
+ ]);
2720
2734
  var ExecutionLeg = z.object({
2721
2735
  /** SYMBOL-MIGRATION switch-to-id: mirrors `symbol` today; becomes required once requests always carry `id`. */
2722
2736
  id: InstrumentId.optional(),
@@ -2745,6 +2759,24 @@ var ExecutionLeg = z.object({
2745
2759
  */
2746
2760
  reduceOnly: z.boolean()
2747
2761
  });
2762
+ var ExecutionRefusedLeg = z.object({
2763
+ /**
2764
+ * Instrument id of the refused leg, as the venue keys it
2765
+ */
2766
+ id: InstrumentId,
2767
+ /**
2768
+ * Base asset of the instrument, the name a reader understands
2769
+ */
2770
+ ticker: z.string(),
2771
+ /**
2772
+ * Why the engine refused the leg: below the venue minimum, or below it because another open position holds the asset
2773
+ */
2774
+ errorCode: ExecutionRefusedLegErrorCode,
2775
+ /**
2776
+ * Readable message for the refusal; it names the ticker
2777
+ */
2778
+ error: z.string()
2779
+ });
2748
2780
  var BaseExecution = z.object({
2749
2781
  /**
2750
2782
  * Execution UUID
@@ -2771,6 +2803,14 @@ var BaseExecution = z.object({
2771
2803
  */
2772
2804
  error: z.string().optional(),
2773
2805
  /**
2806
+ * Machine-readable code for the failure, for example `INSUFFICIENT_SIZE`; absent when none was recorded
2807
+ */
2808
+ errorCode: ExecutionErrorCode.optional(),
2809
+ /**
2810
+ * Legs the engine refused before reaching the venue, when the failure names them
2811
+ */
2812
+ refusedLegs: z.array(ExecutionRefusedLeg).optional(),
2813
+ /**
2774
2814
  * Created at timestamp
2775
2815
  */
2776
2816
  createdAt: z.string(),
@@ -4195,6 +4235,10 @@ var MarginMode = z.enum([
4195
4235
  "isolated"
4196
4236
  ]);
4197
4237
  var SetLeverage = z.object({
4238
+ source: z.enum([
4239
+ "TRADE_PREPARATION",
4240
+ "MANUAL"
4241
+ ]).default("MANUAL"),
4198
4242
  symbol: InstrumentId,
4199
4243
  leverage: z.int().positive(),
4200
4244
  marginMode: MarginMode.optional()
@@ -4493,7 +4537,13 @@ var NotificationCategory = z.enum([
4493
4537
  "COPY_SUBSCRIPTION_STOPPED",
4494
4538
  "COPY_LEVERAGE_NOT_APPLIED",
4495
4539
  "POSITION_LIQUIDATION",
4496
- "TRIGGER_CANCELLED_POSITION_RESIZED"
4540
+ "TRIGGER_CANCELLED_POSITION_RESIZED",
4541
+ "TAKE_PROFIT_PARTIAL",
4542
+ "STOP_LOSS_PARTIAL",
4543
+ "TRIGGER_ORDER_PARTIAL",
4544
+ "TRIGGER_CANCELLED_BY_OPERATOR",
4545
+ "LADDER_CANCELLED_BY_OPERATOR",
4546
+ "AUTO_REBALANCE_STOPPED_BY_OPERATOR"
4497
4547
  ]);
4498
4548
  var NotificationMetric = z.enum([
4499
4549
  "ratio",
@@ -4515,7 +4565,12 @@ var NotificationMetric = z.enum([
4515
4565
  var TriggerNotificationEnrichment = {
4516
4566
  metric: NotificationMetric.optional(),
4517
4567
  level: z.number().optional(),
4518
- reason: z.string().max(255).optional()
4568
+ reason: z.string().max(255).optional(),
4569
+ /**
4570
+ * On a `*_PARTIAL` notification: whether the trigger stays armed on the part of the
4571
+ * position its close left open. Absent on every other category.
4572
+ */
4573
+ triggerActive: z.boolean().optional()
4519
4574
  };
4520
4575
  var TriggerNotificationLeg = z.object({
4521
4576
  id: z.string().min(1),
@@ -4637,6 +4692,28 @@ var TriggerCancelledPositionResizedNotificationParameters = z.object({
4637
4692
  "upnl_trailing"
4638
4693
  ])
4639
4694
  });
4695
+ var TriggerCancelledByOperatorNotificationParameters = PositionLegParameters.safeExtend({
4696
+ type: z.literal("trigger_cancelled_by_operator"),
4697
+ triggerId: z.uuid(),
4698
+ connector: Connector,
4699
+ // The position the trigger watched; absent when the trigger would have opened a new position.
4700
+ positionId: z.uuid().optional(),
4701
+ // User-facing bracket semantics, so the copy can say stop loss, take profit or trigger order.
4702
+ semanticBracketType: BracketType
4703
+ });
4704
+ var LadderCancelledByOperatorNotificationParameters = PositionLegParameters.safeExtend({
4705
+ type: z.literal("ladder_cancelled_by_operator"),
4706
+ ladderId: z.uuid(),
4707
+ connector: Connector,
4708
+ // The position the ladder's rungs watched; absent when the rungs would have opened a new position.
4709
+ positionId: z.uuid().optional()
4710
+ });
4711
+ var AutoRebalanceStoppedByOperatorNotificationParameters = PositionLegParameters.safeExtend({
4712
+ type: z.literal("auto_rebalance_stopped_by_operator"),
4713
+ configId: z.uuid(),
4714
+ positionId: z.uuid(),
4715
+ connector: Connector
4716
+ });
4640
4717
  var TriggerTWAPNotificationAnchor = PositionLegParameters.safeExtend({
4641
4718
  triggerId: z.uuid(),
4642
4719
  positionId: z.uuid(),
@@ -4731,7 +4808,10 @@ var NotificationParameters = z.discriminatedUnion("type", [
4731
4808
  CopyFailedNotificationParameters,
4732
4809
  CopySubscriptionStoppedNotificationParameters,
4733
4810
  CopyLeverageNotAppliedNotificationParameters,
4734
- TriggerCancelledPositionResizedNotificationParameters
4811
+ TriggerCancelledPositionResizedNotificationParameters,
4812
+ TriggerCancelledByOperatorNotificationParameters,
4813
+ LadderCancelledByOperatorNotificationParameters,
4814
+ AutoRebalanceStoppedByOperatorNotificationParameters
4735
4815
  ]);
4736
4816
  var Notification = z.object({
4737
4817
  /**
@@ -6944,7 +7024,8 @@ var SearchTriggersResponse = z.object({
6944
7024
  nextCursor: z.string().nullable()
6945
7025
  });
6946
7026
  var UserPreferences = z.object({
6947
- slippageToleranceBps: z.int().describe("User slippage preference in basis points")
7027
+ slippageToleranceBps: z.int().describe("User slippage preference in basis points"),
7028
+ copySlippageToleranceBps: z.int().describe("Slippage preference in basis points for copy-trading orders, independent of slippageToleranceBps")
6948
7029
  }).describe("User preferences");
6949
7030
  var UserProfile = z.object({
6950
7031
  id: z.uuid().describe("User UUID"),
@@ -6985,7 +7066,8 @@ var ReferralReferee = z.discriminatedUnion("status", [
6985
7066
  PendingReferralReferee
6986
7067
  ]).describe("One referral-history entry, shaped by whether the referee is bound to a V3 user yet");
6987
7068
  var UpdateUserPreferences = z.object({
6988
- slippageToleranceBps: z.int().min(1).max(1e4).optional().describe("User slippage preference in basis points")
7069
+ slippageToleranceBps: z.int().min(1).max(1e4).optional().describe("User slippage preference in basis points"),
7070
+ copySlippageToleranceBps: z.int().min(1).max(1e4).optional().describe("Slippage preference in basis points for copy-trading orders, independent of slippageToleranceBps")
6989
7071
  }).describe("Payload to update user preferences");
6990
7072
  var DISPLAY_NAME_REGEX = /^[\p{L}\p{N} .'-]+$/u;
6991
7073
  var DisplayNameSchema = z.preprocess((value) => {
@@ -7610,4 +7692,4 @@ var VaultServiceError = z.discriminatedUnion("error", [
7610
7692
  })
7611
7693
  ]);
7612
7694
 
7613
- export { Activity, ActivityItemResponse, ActivityResponse, AdjustIsolatedMargin, AdjustIsolatedMarginResponse, AgentApprove, AgentApproveResponse, AgentApproveResult, ApiKeyMeResponse, ApiKeyScope, ApiKeySummary, ApplicableFill, ApplicableFillAssignment, ApplicableMetadata, ApplicablePosition, AppliedFeeDiscount, AttachTriggerMarketClose, AttachTriggerMarketCloseList, AttachTriggerMarketCloseStatic, AttachTriggerMarketCloseTrailing, AuthenticatedUser, AutoRebalanceBetaState, AutoRebalanceConfig, AutoRebalanceListParams, AutoRebalanceListResponse, AutoRebalancePausedReason, AutoRebalanceStatus, AutoRebalanceTimeframe, AutoRebalanceWeightSource, BaseExecution, BasketMarket, BindReferralCode, BoundReferralReferee, BracketType, BuilderFeeApproval, BulkSnapshotPoint, BulkSnapshotsResponse, CancelAllSchedulesResponse, CancelAllTriggersResponse, CancelLadderResponse, CancelScheduleResponse, CancelTriggerResponse, ChangeLighterAccountTierParams, ChangeLighterAccountTierResult, ChangePasswordRequest, ChangePasswordResponse, ClosedPosition, ClosedPositionLeg, ClosedPositionLegSide, ClosedPositionListParams, ClosedPositionListResponse, ConnectedIdentity, Connector, CopyAccountPerformance, CopyActivity, CopyActivityLeg, CopyActivityListParams, CopyActivityListResponse, CopyActivityOutcome, CopyActivityState, CopyActivityTWAP, CopyActivityTWAPReduction, CopyCaptureTiming, CopyControlTransferReason, CopyCoverage, CopyEndCapture, CopyEndCaptureStatus, CopyEndedSubscriptionWithVolume, CopyExecutionSource, CopyFollower, CopyFollowerStats, CopyFollowersResponse, CopyHealthResponse, CopyJoinResult, CopyLeaderAction, CopyManagedPosition, CopyPerformance, CopyPnlBreakdown, CopySizing, CopySkipReason, CopyStartSnapshot, CopyStartingAccount, CopyStateResponse, CopyStatsParams, CopyStatsResponse, CopySubscription, CopySubscriptionListQuery, CopySubscriptionListResponse, CopySubscriptionMetrics, CopySubscriptionRead, CopySubscriptionResponse, CopySubscriptionStatus, CopySubscriptionWithMetrics, CopyUnmanagedFollowerPositionReason, CopyUnmanagedPosition, CreateApiKeyInput, CreateApiKeyOutput, CreateApiKeyWithMessageResult, CreateApplicablesBulkFields, CreateApplicablesMeta, CreateApplicablesRequest, CreateAuthTokenParams, CreateAuthTokenResult, CreateAutoRebalanceConfig, CreateAutoRebalanceResponse, CreateCopySubscription, CreateCopySubscriptionResponse, CreateFundingPaymentsRequest, CreateLadder, CreateLadderMarketOpen, CreateLadderResponse, CreateLighterApiKeyParams, CreateLighterSubAccountParams, CreateLighterSubAccountResult, CreateLighterUdaParams, CreateLighterUdaResult, CreateMarketAdjust, CreateMarketClose, CreateMarketCloseAll, CreateMarketOpen, CreateMarketReverse, CreateReferralCode, CreateRewardClaim, CreateSavedBasketPayload, CreateSavedBasketResponse, CreateSchedule, CreateScheduleResponse, CreateTWAPClose, CreateTWAPOpen, CreateTradeAccount, CreateTradeAdjust, CreateTradeAdjustResponse, CreateTradeClose, CreateTradeCloseAll, CreateTradeCloseAllResponse, CreateTradeCloseResponse, CreateTradeOpen, CreateTradeOpenResponse, CreateTradeReverse, CreateTradeReverseResponse, CreateTriggerClose, CreateTriggerConditionAttachStatic, CreateTriggerConditionAttachTrailing, CreateTriggerConditionCloseStatic, CreateTriggerConditionCloseTrailing, CreateTriggerConditionOpen, CreateTriggerMarketAdjust, CreateTriggerMarketClose, CreateTriggerMarketCloseStatic, CreateTriggerMarketCloseTrailing, CreateTriggerMarketOpen, CreateTriggerOpen, CreateTriggerResponse, CreateTriggerTWAPAdjust, CreateTriggerTWAPClose, CreateTriggerTWAPCloseStatic, CreateTriggerTWAPCloseTrailing, CreateVault, CreateVaultTradeAccount, CreatedVaultResponse, CreatedVaultResult, DEFAULT_TWAP_RANDOMIZATION, DisconnectXResponse, DiscountRate, EmailLoginRequest, EmailRegisterRequest, EndCopySubscriptionResponse, EthereumAddress2 as EthereumAddress, EthereumTransactionHash, ExchangeCredentialsResponse, ExchangeXLoginRequest, Execution, ExecutionFulfillment, ExecutionIntent, ExecutionLegMode, ExecutionListParams, ExecutionListResponse, ExecutionOrderType, ExecutionStatus, ExternalPosition, ExternalTrigger, ExternalTriggerSource, FINAL_TWAP_SLICE_START_HEADROOM_SEC, FeeBps, FeeConnector, FeeDiscountScope, FeeOverrideScope, FeeRecipientResponse, FeeResponse, FeeRole, Fill, FillAssignment, FillListParams, FillListResponse, FillOrderBy, FillStatus, ForgotPasswordRequest, ForgotPasswordResponse, FundingInfo, FundingPaymentEntry, FundingQueryParams, FundingResponse, FundingUpdatedData, GetExecutionResponse, GetFeeRecipientParams, bundle_exports as HttpTypes, Instrument, InstrumentFundingMap, InstrumentId, InstrumentListLiteResponse, InstrumentListParams, InstrumentListResponse, InstrumentLite, InstrumentMarginMode, InstrumentPrecision, InstrumentPriceMap, InstrumentScope, InstrumentSymbolToIdMapResponse, InstrumentTradeability, InstrumentTradeabilityReason, InstrumentTradeabilityStatus, InstrumentType, LEADERBOARD_MAX_LIMIT, Ladder, LadderConditionOpen, LadderConfig, LadderListParams, LadderListResponse, LadderResponse, LadderStatus, LeaderSignedAction, LeaderboardArchiveListResponse, LeaderboardArchiveParams, LeaderboardArchivePeriodParams, LeaderboardArchiveResponse, LeaderboardQueryParams, LeaderboardResponse, LeaderboardRow, LeaderboardSnapshotParams, LeaderboardSnapshotQueryParams, LeaderboardSnapshotResponse, LeaderboardSortBy, LeaderboardStatus, LighterAccountTier, LighterUdaResolution, LighterUdaTransaction, LinkEmailRequest, LinkEmailResponse, LinkWalletRequest, LinkWalletResponse, ListApiKeysOutput, ListLighterUdaDepositsParams, ListLighterUdaDepositsResult, ListRewardClaimsQuery, LoginMethod, LoginRequest, LoginResponse, LogoutRequest, LogoutResponse, MARKET_BASKET_POSITION_COUNTS_MAX_BASKETS, MAX_FEE_BPS, MAX_TWAP_DURATION_SEC, MAX_VAULTS_PER_CONNECTION, MIN_TWAP_SLICE_INTERVAL_SEC, ManagementVaultDataset, ManagementVaultInvalidatedData, MarginMode, MarkNotificationUnreadPayload, MarkNotificationUnreadResponse, MarkNotificationsReadPayload, MarkNotificationsReadResponse, Market, MarketAdjustExecution, MarketBasketPositionCounts, MarketBasketPositionCountsPayload, MarketBasketPositionCountsResponse, MarketBasketsQueryParams, MarketBasketsResponse, MarketCloseExecution, MarketExecution, MarketOpenExecution, MarketOrder, MarketReverseExecution, MarketTotals, MarketsQueryParams, MarketsResponse, MeResponse, MetricTrack, NavBucket, NavBucketPoint, NavRangeQueryParams, NavRangeResponse, NavResolution, NavSnapshot, NavSnapshotResponse, NavStatsQueryParams, NavStatsResponse, NavStatsWindow, Notification, NotificationCategory, NotificationListParams, NotificationListResponse, NotificationMetric, NotificationParameters, NullableNumber, ORDERED_VALIDITY_WINDOW_MESSAGE, OauthGrant, OauthGrantsResponse, OauthInteractionClient, OauthInteractionConfirmRequest, OauthInteractionDetailsResponse, OauthInteractionRedirectResponse, OiStatistics, OiStatisticsQueryParams, OiStatisticsResponse, OpenPosition, OpenPositionLeg, OpenPositionListParams, OpenPositionListResponse, OpenPositionLite, OpenPositionLiteListResponse, OracleTrigger, OracleUnit, OracleValue, Order, OrderStatus, PendingReferralReferee, PortfolioAnalyticsConfig, PortfolioAnalyticsInterval, PortfolioAnalyticsQuery, PortfolioAnalyticsResponse, PortfolioCashflowAmounts, PortfolioCashflowIntervals, PortfolioCashflowSeriesPoint, PortfolioClosedPositionStats, PortfolioOpenSnapshot, PortfolioPairBreakdown, PortfolioQuery, PortfolioResponse, PortfolioSource, PortfolioVolumeAmounts, PortfolioVolumeIntervals, PortfolioVolumeSeriesPoint, Position, PositionClosedReason, PositionEntryPrices, PositionExposure, PositionFill, PositionFillListResponse, PositionInitialExposureUSD, PositionListParams, PositionListResponse, PositionOrigin, PositionStatus, PositionStep, PositionStepLeg, PositionTotalFundingPayment, PositiveAmount, PrepareApproveIntegratorParams, PrepareApproveIntegratorResult, PrepareLighterFastWithdrawParams, PrepareLighterFastWithdrawResult, PriceSource, PriceUpdatedData, PricesQueryParams, PricesResponse, ProfileResponse, ProvisionalFill, ProvisionalFillListResponse, PublicClosedPosition, PublicLadder, PublicOpenPosition, PublicSchedule, PublicTradeLeg, PublicTraderClosedPositionsParams, PublicTraderClosedPositionsResponse, PublicTraderParams, PublicTraderQuery, PublicTraderResponse, PublicTrigger, PublicVaultDataset, PublicVaultInvalidatedData, QuoteFeeParams, RealtimeFunding, RealtimePrice, RebalanceEvent, RebalanceEventListParams, RebalanceEventListResponse, RebalanceEventStatus, RebalanceManual, RebalanceManualResponse, RecommendedBasket, RecommendedBasketLeg, RecommendedBasketListResponse, ReferralReferee, ReferralRefereeListParams, ReferralRefereeListResponse, ReferralStatusResponse, RefineStaticLogicalRules, RefineTrailingConfig, RefineTrailingLogicalRules, RefreshSessionResponse, RefreshTokenRequest, RefreshTokenResponse, RegisterEmailResponse, ReplaceAutoRebalanceConfig, RequestNonceRequest, RequestNonceResponse, ResendVerificationForRegisterRequest, ResendVerificationResponse, ResetPasswordRequest, ResetPasswordResponse, ResizeBehavior, RewardAccrual, RewardAccrualResponse, RewardClaimId, RewardClaimListResponse, RewardClaimResponse, RewardClaimStatus, RewardClaimStatusResponse, RewardPayoutAvailability, RewardSourceAccrual, RewardSummaryResponse, SavedBasket, SavedBasketLeg, SavedBasketListResponse, Schedule, ScheduleCancelledReason, ScheduleDetailParams, ScheduleDetailResponse, ScheduleExecutionType, ScheduleFailedReason, ScheduleFailure, ScheduleIntent, ScheduleListParams, ScheduleListResponse, ScheduleSlice, ScheduleStatus, ScheduleStrategy, SearchTriggersParams, SearchTriggersResponse, SetLeverage, SetLeverageResponse, SetLighterSubAccountMetadataParams, SetTrader, SetTraderResponse, SetTraderResult, SetUnifiedAccount, SetXVisibilityRequest, SetXVisibilityResponse, SnapshotsBulk, SparklinePoint, SparklineRange, StartXLinkRequest, StartXLinkResponse, StartXLoginRequest, StartXLoginResponse, StatisticsTotals, StatisticsTotalsQueryParams, StatisticsTotalsResponse, StpearFeePricing, SubmitApproveIntegratorParams, SubmitApproveIntegratorResult, SubmitChangePubKeyParams, SubmitChangePubKeyResult, SubmitLighterFastWithdrawParams, SubmitLighterFastWithdrawResult, SyncFillsResponse, SyncFillsSinceRequest, SyncFillsSinceResponse, SyncFundingSinceRequest, SyncFundingSinceResponse, SyncMeta, TWAPClose, TWAPOpen, TWAPRandomization, TcaBenchmarkResponse, TcaExecutionResponse, TcaExecutionSummaryContextResponse, TcaExecutionSummaryLegResponse, TcaExecutionSummaryResponse, TcaFillMetricResponse, TcaMetricStatus, TcaPositionQueryParams, TcaPositionResponse, TcaSummaryQueryParams, TcaSummaryResponse, TcaSummaryTotalsResponse, TcaTimingGranularity, TpSlBracketType, TradeAccount, TradeAccountListParams, TradeAccountListResponse, TradeAccountResponse, TradeExecutedData, TradeFill, TradeGroup, TradeLeg, TradeLegPostOnly, TradeLegPostOnlyWithMaxImpactPrice, TradeLegWithMaxImpactPrice, TradeListParams, TradeListResponse, TradePositionEffect, TradePositionState, TradeRealization, TraderPerformancePoint, TraderPerformanceQuery, TraderPerformanceResponse, Trailing, TrailingConfig, TrailingMode, TransferLighterSubAccountParams, TransferLighterSubAccountResult, Trigger, TriggerCancelledReason, TriggerConditionAdjust, TriggerConditionClose, TriggerConditionOpen, TriggerIntent, TriggerListParams, TriggerListResponse, TriggerMarket, TriggerMarketAdjust, TriggerMarketClose, TriggerMarketOpen, TriggerMarketOpenAttachedTrigger, TriggerOutcome, TriggerStatus, TriggerTWAP, TriggerTWAPAdjust, TriggerTWAPClose, TriggerTriggeredPublicData, TypedDataPayload, UnifiedAccountResponse, UnknownExternalFill, UpdateAutoRebalanceConfig, UpdateSavedBasketPayload, UpdateSavedBasketResponse, UpdateTradeAccount, UpdateUserDisplayName, UpdateUserDisplayNameResponse, UpdateUserPreferences, UpdateUserPreferencesResponse, UpdateVaultMetadata, UpdateVaultMetadataResponse, UpdateVaultMetadataResult, UserEventData, UserEventTopic, UserPreferences, UserProfile, Vault, VaultClosedPosition, VaultClosedPositionLeg, VaultClosedPositionListParams, VaultClosedPositionListResponse, VaultDataset, VaultEvent, VaultEventListParams, VaultEventListResponse, VaultInvalidatedData, VaultInvestmentsQueryParams, VaultInvestmentsResponse, VaultListParams, VaultListResponse, VaultOpenPosition, VaultOpenPositionLeg, VaultOpenPositionListParams, VaultOpenPositionListResponse, VaultOverviewResponse, VaultRequestIssue, VaultResponse, VaultServiceError, VaultStatsQueryParams, VaultStatsResponse, VaultStatus, VaultTradeAccountStatus, VaultTradeAccountStatusResponse, VaultsOverviewQueryParams, VerifyEmailRequest, VerifyEmailResponse, ViewerCopyStatus, VolumeStatistics, VolumeStatisticsQueryParams, VolumeStatisticsResponse, WATERMARK_FUTURE_SKEW_MS, WalletLoginRequest, WebsocketAckFrame, WebsocketChannel, WebsocketControlMessage, WebsocketErrorCode, WebsocketErrorFrame, WebsocketEventFrame, WebsocketFrame, WebsocketPongFrame, WebsocketPublicChannel, WebsocketPublicParams, WebsocketRequestErrorCode, WebsocketRequestId, WebsocketTriggerEventsParams, WebsocketUserEventsParams, WebsocketVaultErrorCode, WebsocketVaultEventsParams, WebsocketWelcomeFrame, WeightMap, WithdrawToEvm, WithdrawToEvmResponse, WithdrawToEvmResult, getStaticLogicalIssues, getTrailingDeltaIssues, getTrailingLogicalIssues, hasOrderedValidityWindow, isAttachTriggerMarketCloseTrailing, isPublicVaultDataset };
7695
+ export { Activity, ActivityItemResponse, ActivityResponse, AdjustIsolatedMargin, AdjustIsolatedMarginResponse, AgentApprove, AgentApproveResponse, AgentApproveResult, ApiKeyMeResponse, ApiKeyScope, ApiKeySummary, ApplicableFill, ApplicableFillAssignment, ApplicableMetadata, ApplicablePosition, AppliedFeeDiscount, AttachTriggerMarketClose, AttachTriggerMarketCloseList, AttachTriggerMarketCloseStatic, AttachTriggerMarketCloseTrailing, AuthenticatedUser, AutoRebalanceBetaState, AutoRebalanceConfig, AutoRebalanceListParams, AutoRebalanceListResponse, AutoRebalancePausedReason, AutoRebalanceStatus, AutoRebalanceTimeframe, AutoRebalanceWeightSource, BaseExecution, BasketMarket, BindReferralCode, BoundReferralReferee, BracketType, BuilderFeeApproval, BulkSnapshotPoint, BulkSnapshotsResponse, CancelAllSchedulesResponse, CancelAllTriggersResponse, CancelLadderResponse, CancelScheduleResponse, CancelTriggerResponse, ChangeLighterAccountTierParams, ChangeLighterAccountTierResult, ChangePasswordRequest, ChangePasswordResponse, ClosedPosition, ClosedPositionLeg, ClosedPositionLegSide, ClosedPositionListParams, ClosedPositionListResponse, ConnectedIdentity, Connector, CopyAccountPerformance, CopyActivity, CopyActivityLeg, CopyActivityListParams, CopyActivityListResponse, CopyActivityOutcome, CopyActivityState, CopyActivityTWAP, CopyActivityTWAPReduction, CopyCaptureTiming, CopyControlTransferReason, CopyCoverage, CopyEndCapture, CopyEndCaptureStatus, CopyEndedSubscriptionWithVolume, CopyExecutionSource, CopyFollower, CopyFollowerStats, CopyFollowersResponse, CopyHealthResponse, CopyJoinResult, CopyLeaderAction, CopyManagedPosition, CopyPerformance, CopyPnlBreakdown, CopySizing, CopySkipReason, CopyStartSnapshot, CopyStartingAccount, CopyStateResponse, CopyStatsParams, CopyStatsResponse, CopySubscription, CopySubscriptionListQuery, CopySubscriptionListResponse, CopySubscriptionMetrics, CopySubscriptionRead, CopySubscriptionResponse, CopySubscriptionStatus, CopySubscriptionWithMetrics, CopyUnmanagedFollowerPositionReason, CopyUnmanagedPosition, CreateApiKeyInput, CreateApiKeyOutput, CreateApiKeyWithMessageResult, CreateApplicablesBulkFields, CreateApplicablesMeta, CreateApplicablesRequest, CreateAuthTokenParams, CreateAuthTokenResult, CreateAutoRebalanceConfig, CreateAutoRebalanceResponse, CreateCopySubscription, CreateCopySubscriptionResponse, CreateFundingPaymentsRequest, CreateLadder, CreateLadderMarketOpen, CreateLadderResponse, CreateLighterApiKeyParams, CreateLighterSubAccountParams, CreateLighterSubAccountResult, CreateLighterUdaParams, CreateLighterUdaResult, CreateMarketAdjust, CreateMarketClose, CreateMarketCloseAll, CreateMarketOpen, CreateMarketReverse, CreateReferralCode, CreateRewardClaim, CreateSavedBasketPayload, CreateSavedBasketResponse, CreateSchedule, CreateScheduleResponse, CreateTWAPClose, CreateTWAPOpen, CreateTradeAccount, CreateTradeAdjust, CreateTradeAdjustResponse, CreateTradeClose, CreateTradeCloseAll, CreateTradeCloseAllResponse, CreateTradeCloseResponse, CreateTradeOpen, CreateTradeOpenResponse, CreateTradeReverse, CreateTradeReverseResponse, CreateTriggerClose, CreateTriggerConditionAttachStatic, CreateTriggerConditionAttachTrailing, CreateTriggerConditionCloseStatic, CreateTriggerConditionCloseTrailing, CreateTriggerConditionOpen, CreateTriggerMarketAdjust, CreateTriggerMarketClose, CreateTriggerMarketCloseStatic, CreateTriggerMarketCloseTrailing, CreateTriggerMarketOpen, CreateTriggerOpen, CreateTriggerResponse, CreateTriggerTWAPAdjust, CreateTriggerTWAPClose, CreateTriggerTWAPCloseStatic, CreateTriggerTWAPCloseTrailing, CreateVault, CreateVaultTradeAccount, CreatedVaultResponse, CreatedVaultResult, DEFAULT_TWAP_RANDOMIZATION, DisconnectXResponse, DiscountRate, EmailLoginRequest, EmailRegisterRequest, EndCopySubscriptionResponse, EthereumAddress2 as EthereumAddress, EthereumTransactionHash, ExchangeCredentialsResponse, ExchangeXLoginRequest, Execution, ExecutionErrorCode, ExecutionFulfillment, ExecutionIntent, ExecutionLegMode, ExecutionListParams, ExecutionListResponse, ExecutionOrderType, ExecutionRefusedLeg, ExecutionRefusedLegErrorCode, ExecutionStatus, ExternalPosition, ExternalTrigger, ExternalTriggerSource, FINAL_TWAP_SLICE_START_HEADROOM_SEC, FeeBps, FeeConnector, FeeDiscountScope, FeeOverrideScope, FeeRecipientResponse, FeeResponse, FeeRole, Fill, FillAssignment, FillListParams, FillListResponse, FillOrderBy, FillStatus, ForgotPasswordRequest, ForgotPasswordResponse, FundingInfo, FundingPaymentEntry, FundingQueryParams, FundingResponse, FundingUpdatedData, GetExecutionResponse, GetFeeRecipientParams, bundle_exports as HttpTypes, Instrument, InstrumentFundingMap, InstrumentId, InstrumentListLiteResponse, InstrumentListParams, InstrumentListResponse, InstrumentLite, InstrumentMarginMode, InstrumentPrecision, InstrumentPriceMap, InstrumentScope, InstrumentSymbolToIdMapResponse, InstrumentTradeability, InstrumentTradeabilityReason, InstrumentTradeabilityStatus, InstrumentType, LEADERBOARD_MAX_LIMIT, Ladder, LadderConditionOpen, LadderConfig, LadderListParams, LadderListResponse, LadderResponse, LadderStatus, LeaderSignedAction, LeaderboardArchiveListResponse, LeaderboardArchiveParams, LeaderboardArchivePeriodParams, LeaderboardArchiveResponse, LeaderboardQueryParams, LeaderboardResponse, LeaderboardRow, LeaderboardSnapshotParams, LeaderboardSnapshotQueryParams, LeaderboardSnapshotResponse, LeaderboardSortBy, LeaderboardStatus, LighterAccountTier, LighterUdaResolution, LighterUdaTransaction, LinkEmailRequest, LinkEmailResponse, LinkWalletRequest, LinkWalletResponse, ListApiKeysOutput, ListLighterUdaDepositsParams, ListLighterUdaDepositsResult, ListRewardClaimsQuery, LoginMethod, LoginRequest, LoginResponse, LogoutRequest, LogoutResponse, MARKET_BASKET_POSITION_COUNTS_MAX_BASKETS, MAX_FEE_BPS, MAX_TWAP_DURATION_SEC, MAX_VAULTS_PER_CONNECTION, MIN_TWAP_SLICE_INTERVAL_SEC, ManagementVaultDataset, ManagementVaultInvalidatedData, MarginMode, MarkNotificationUnreadPayload, MarkNotificationUnreadResponse, MarkNotificationsReadPayload, MarkNotificationsReadResponse, Market, MarketAdjustExecution, MarketBasketPositionCounts, MarketBasketPositionCountsPayload, MarketBasketPositionCountsResponse, MarketBasketsQueryParams, MarketBasketsResponse, MarketCloseExecution, MarketExecution, MarketOpenExecution, MarketOrder, MarketReverseExecution, MarketTotals, MarketsQueryParams, MarketsResponse, MeResponse, MetricTrack, NavBucket, NavBucketPoint, NavRangeQueryParams, NavRangeResponse, NavResolution, NavSnapshot, NavSnapshotResponse, NavStatsQueryParams, NavStatsResponse, NavStatsWindow, Notification, NotificationCategory, NotificationListParams, NotificationListResponse, NotificationMetric, NotificationParameters, NullableNumber, ORDERED_VALIDITY_WINDOW_MESSAGE, OauthGrant, OauthGrantsResponse, OauthInteractionClient, OauthInteractionConfirmRequest, OauthInteractionDetailsResponse, OauthInteractionRedirectResponse, OiStatistics, OiStatisticsQueryParams, OiStatisticsResponse, OpenPosition, OpenPositionLeg, OpenPositionListParams, OpenPositionListResponse, OpenPositionLite, OpenPositionLiteListResponse, OracleTrigger, OracleUnit, OracleValue, Order, OrderStatus, PendingReferralReferee, PortfolioAnalyticsConfig, PortfolioAnalyticsInterval, PortfolioAnalyticsQuery, PortfolioAnalyticsResponse, PortfolioCashflowAmounts, PortfolioCashflowIntervals, PortfolioCashflowSeriesPoint, PortfolioClosedPositionStats, PortfolioOpenSnapshot, PortfolioPairBreakdown, PortfolioQuery, PortfolioResponse, PortfolioSource, PortfolioVolumeAmounts, PortfolioVolumeIntervals, PortfolioVolumeSeriesPoint, Position, PositionClosedReason, PositionEntryPrices, PositionExposure, PositionFill, PositionFillListResponse, PositionInitialExposureUSD, PositionListParams, PositionListResponse, PositionOrigin, PositionStatus, PositionStep, PositionStepLeg, PositionTotalFundingPayment, PositiveAmount, PrepareApproveIntegratorParams, PrepareApproveIntegratorResult, PrepareLighterFastWithdrawParams, PrepareLighterFastWithdrawResult, PriceSource, PriceUpdatedData, PricesQueryParams, PricesResponse, ProfileResponse, ProvisionalFill, ProvisionalFillListResponse, PublicClosedPosition, PublicLadder, PublicOpenPosition, PublicSchedule, PublicTradeLeg, PublicTraderClosedPositionsParams, PublicTraderClosedPositionsResponse, PublicTraderParams, PublicTraderQuery, PublicTraderResponse, PublicTrigger, PublicVaultDataset, PublicVaultInvalidatedData, QuoteFeeParams, RealtimeFunding, RealtimePrice, RebalanceEvent, RebalanceEventListParams, RebalanceEventListResponse, RebalanceEventStatus, RebalanceManual, RebalanceManualResponse, RecommendedBasket, RecommendedBasketLeg, RecommendedBasketListResponse, ReferralReferee, ReferralRefereeListParams, ReferralRefereeListResponse, ReferralStatusResponse, RefineStaticLogicalRules, RefineTrailingConfig, RefineTrailingLogicalRules, RefreshSessionResponse, RefreshTokenRequest, RefreshTokenResponse, RegisterEmailResponse, ReplaceAutoRebalanceConfig, RequestNonceRequest, RequestNonceResponse, ResendVerificationForRegisterRequest, ResendVerificationResponse, ResetPasswordRequest, ResetPasswordResponse, ResizeBehavior, RewardAccrual, RewardAccrualResponse, RewardClaimId, RewardClaimListResponse, RewardClaimResponse, RewardClaimStatus, RewardClaimStatusResponse, RewardPayoutAvailability, RewardSourceAccrual, RewardSummaryResponse, SavedBasket, SavedBasketLeg, SavedBasketListResponse, Schedule, ScheduleCancelledReason, ScheduleDetailParams, ScheduleDetailResponse, ScheduleExecutionType, ScheduleFailedReason, ScheduleFailure, ScheduleIntent, ScheduleListParams, ScheduleListResponse, ScheduleSlice, ScheduleStatus, ScheduleStrategy, SearchTriggersParams, SearchTriggersResponse, SetLeverage, SetLeverageResponse, SetLighterSubAccountMetadataParams, SetTrader, SetTraderResponse, SetTraderResult, SetUnifiedAccount, SetXVisibilityRequest, SetXVisibilityResponse, SnapshotsBulk, SparklinePoint, SparklineRange, StartXLinkRequest, StartXLinkResponse, StartXLoginRequest, StartXLoginResponse, StatisticsTotals, StatisticsTotalsQueryParams, StatisticsTotalsResponse, StpearFeePricing, SubmitApproveIntegratorParams, SubmitApproveIntegratorResult, SubmitChangePubKeyParams, SubmitChangePubKeyResult, SubmitLighterFastWithdrawParams, SubmitLighterFastWithdrawResult, SyncFillsResponse, SyncFillsSinceRequest, SyncFillsSinceResponse, SyncFundingSinceRequest, SyncFundingSinceResponse, SyncMeta, TWAPClose, TWAPOpen, TWAPRandomization, TcaBenchmarkResponse, TcaExecutionResponse, TcaExecutionSummaryContextResponse, TcaExecutionSummaryLegResponse, TcaExecutionSummaryResponse, TcaFillMetricResponse, TcaMetricStatus, TcaPositionQueryParams, TcaPositionResponse, TcaSummaryQueryParams, TcaSummaryResponse, TcaSummaryTotalsResponse, TcaTimingGranularity, TpSlBracketType, TradeAccount, TradeAccountListParams, TradeAccountListResponse, TradeAccountResponse, TradeExecutedData, TradeFill, TradeGroup, TradeLeg, TradeLegPostOnly, TradeLegPostOnlyWithMaxImpactPrice, TradeLegWithMaxImpactPrice, TradeListParams, TradeListResponse, TradePositionEffect, TradePositionState, TradeRealization, TraderPerformancePoint, TraderPerformanceQuery, TraderPerformanceResponse, Trailing, TrailingConfig, TrailingMode, TransferLighterSubAccountParams, TransferLighterSubAccountResult, Trigger, TriggerCancelledReason, TriggerConditionAdjust, TriggerConditionClose, TriggerConditionOpen, TriggerIntent, TriggerListParams, TriggerListResponse, TriggerMarket, TriggerMarketAdjust, TriggerMarketClose, TriggerMarketOpen, TriggerMarketOpenAttachedTrigger, TriggerOutcome, TriggerStatus, TriggerTWAP, TriggerTWAPAdjust, TriggerTWAPClose, TriggerTriggeredPublicData, TypedDataPayload, UnifiedAccountResponse, UnknownExternalFill, UpdateAutoRebalanceConfig, UpdateSavedBasketPayload, UpdateSavedBasketResponse, UpdateTradeAccount, UpdateUserDisplayName, UpdateUserDisplayNameResponse, UpdateUserPreferences, UpdateUserPreferencesResponse, UpdateVaultMetadata, UpdateVaultMetadataResponse, UpdateVaultMetadataResult, UserEventData, UserEventTopic, UserPreferences, UserProfile, Vault, VaultClosedPosition, VaultClosedPositionLeg, VaultClosedPositionListParams, VaultClosedPositionListResponse, VaultDataset, VaultEvent, VaultEventListParams, VaultEventListResponse, VaultInvalidatedData, VaultInvestmentsQueryParams, VaultInvestmentsResponse, VaultListParams, VaultListResponse, VaultOpenPosition, VaultOpenPositionLeg, VaultOpenPositionListParams, VaultOpenPositionListResponse, VaultOverviewResponse, VaultRequestIssue, VaultResponse, VaultServiceError, VaultStatsQueryParams, VaultStatsResponse, VaultStatus, VaultTradeAccountStatus, VaultTradeAccountStatusResponse, VaultsOverviewQueryParams, VerifyEmailRequest, VerifyEmailResponse, ViewerCopyStatus, VolumeStatistics, VolumeStatisticsQueryParams, VolumeStatisticsResponse, WATERMARK_FUTURE_SKEW_MS, WalletLoginRequest, WebsocketAckFrame, WebsocketChannel, WebsocketControlMessage, WebsocketErrorCode, WebsocketErrorFrame, WebsocketEventFrame, WebsocketFrame, WebsocketPongFrame, WebsocketPublicChannel, WebsocketPublicParams, WebsocketRequestErrorCode, WebsocketRequestId, WebsocketTriggerEventsParams, WebsocketUserEventsParams, WebsocketVaultErrorCode, WebsocketVaultEventsParams, WebsocketWelcomeFrame, WeightMap, WithdrawToEvm, WithdrawToEvmResponse, WithdrawToEvmResult, getStaticLogicalIssues, getTrailingDeltaIssues, getTrailingLogicalIssues, hasOrderedValidityWindow, isAttachTriggerMarketCloseTrailing, isPublicVaultDataset };
@@ -5,6 +5,10 @@ export declare const MarginMode: z.ZodEnum<{
5
5
  }>;
6
6
  export type MarginMode = z.infer<typeof MarginMode>;
7
7
  export declare const SetLeverage: z.ZodObject<{
8
+ source: z.ZodDefault<z.ZodEnum<{
9
+ TRADE_PREPARATION: "TRADE_PREPARATION";
10
+ MANUAL: "MANUAL";
11
+ }>>;
8
12
  symbol: z.ZodString;
9
13
  leverage: z.ZodInt;
10
14
  marginMode: z.ZodOptional<z.ZodEnum<{
@@ -12,4 +16,5 @@ export declare const SetLeverage: z.ZodObject<{
12
16
  cross: "cross";
13
17
  }>>;
14
18
  }, z.core.$strip>;
15
- export type SetLeverage = z.infer<typeof SetLeverage>;
19
+ export type SetLeverageInput = z.input<typeof SetLeverage>;
20
+ export type SetLeverage = z.output<typeof SetLeverage>;
@@ -2,7 +2,9 @@ import { z } from 'zod';
2
2
  /**
3
3
  * What happened. The `*_HIT` categories mean the trigger fired and its order
4
4
  * filled; the `*_FAILED` categories mean it fired but the order failed to
5
- * execute; `ATTACHED_TRIGGER_DISCARDED` means requested close protection could
5
+ * execute; the `*_PARTIAL` categories mean a fired close left part of the
6
+ * position open, and `parameters.triggerActive` says whether the trigger stays
7
+ * armed on the remainder; `ATTACHED_TRIGGER_DISCARDED` means requested close protection could
6
8
  * not be placed after a position opened; the `AUTO_REBALANCE_*` categories cover
7
9
  * an auto-rebalance config acting on, or stopping itself over, the position it
8
10
  * watches; the `TRIGGER_TWAP_*` categories describe a fired trigger starting,
@@ -10,7 +12,10 @@ import { z } from 'zod';
10
12
  * means the remediation sweep cancelled an unreachable stop loss;
11
13
  * `TRIGGER_CANCELLED_POSITION_RESIZED` means a size-dependent close trigger was
12
14
  * cancelled because the position was partially closed and the trigger's threshold
13
- * is no longer valid against the new position size. Outcome lives here in the
15
+ * is no longer valid against the new position size. The `*_BY_OPERATOR`
16
+ * categories mean the Pear team cancelled a trigger or ladder, or stopped an
17
+ * auto-rebalance config, in an operator intervention (for example during an
18
+ * incident); workflows never emit them. Outcome lives here in the
14
19
  * category; display details live in the `parameters` payload below.
15
20
  */
16
21
  export declare const NotificationCategory: z.ZodEnum<{
@@ -35,6 +40,12 @@ export declare const NotificationCategory: z.ZodEnum<{
35
40
  COPY_LEVERAGE_NOT_APPLIED: "COPY_LEVERAGE_NOT_APPLIED";
36
41
  POSITION_LIQUIDATION: "POSITION_LIQUIDATION";
37
42
  TRIGGER_CANCELLED_POSITION_RESIZED: "TRIGGER_CANCELLED_POSITION_RESIZED";
43
+ TAKE_PROFIT_PARTIAL: "TAKE_PROFIT_PARTIAL";
44
+ STOP_LOSS_PARTIAL: "STOP_LOSS_PARTIAL";
45
+ TRIGGER_ORDER_PARTIAL: "TRIGGER_ORDER_PARTIAL";
46
+ TRIGGER_CANCELLED_BY_OPERATOR: "TRIGGER_CANCELLED_BY_OPERATOR";
47
+ LADDER_CANCELLED_BY_OPERATOR: "LADDER_CANCELLED_BY_OPERATOR";
48
+ AUTO_REBALANCE_STOPPED_BY_OPERATOR: "AUTO_REBALANCE_STOPPED_BY_OPERATOR";
38
49
  }>;
39
50
  export type NotificationCategory = z.infer<typeof NotificationCategory>;
40
51
  export declare const NotificationMetric: z.ZodEnum<{
@@ -115,6 +126,7 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
115
126
  }>>;
116
127
  level: z.ZodOptional<z.ZodNumber>;
117
128
  reason: z.ZodOptional<z.ZodString>;
129
+ triggerActive: z.ZodOptional<z.ZodBoolean>;
118
130
  type: z.ZodLiteral<"take_profit">;
119
131
  triggerId: z.ZodUUID;
120
132
  positionId: z.ZodUUID;
@@ -158,6 +170,7 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
158
170
  }>>;
159
171
  level: z.ZodOptional<z.ZodNumber>;
160
172
  reason: z.ZodOptional<z.ZodString>;
173
+ triggerActive: z.ZodOptional<z.ZodBoolean>;
161
174
  type: z.ZodLiteral<"stop_loss">;
162
175
  triggerId: z.ZodUUID;
163
176
  positionId: z.ZodUUID;
@@ -197,6 +210,7 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
197
210
  }>>;
198
211
  level: z.ZodOptional<z.ZodNumber>;
199
212
  reason: z.ZodOptional<z.ZodString>;
213
+ triggerActive: z.ZodOptional<z.ZodBoolean>;
200
214
  type: z.ZodLiteral<"trigger_order">;
201
215
  triggerId: z.ZodUUID;
202
216
  positionId: z.ZodUUID;
@@ -236,6 +250,7 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
236
250
  }>>;
237
251
  level: z.ZodOptional<z.ZodNumber>;
238
252
  reason: z.ZodOptional<z.ZodString>;
253
+ triggerActive: z.ZodOptional<z.ZodBoolean>;
239
254
  type: z.ZodLiteral<"default_trigger">;
240
255
  triggerId: z.ZodUUID;
241
256
  connector: z.ZodEnum<{
@@ -523,6 +538,71 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
523
538
  notional_trailing: "notional_trailing";
524
539
  upnl_trailing: "upnl_trailing";
525
540
  }>;
541
+ }, z.core.$strip>, z.ZodObject<{
542
+ legs: z.ZodArray<z.ZodObject<{
543
+ id: z.ZodString;
544
+ symbol: z.ZodString;
545
+ side: z.ZodEnum<{
546
+ BUY: "BUY";
547
+ SELL: "SELL";
548
+ }>;
549
+ }, z.core.$strip>>;
550
+ type: z.ZodLiteral<"trigger_cancelled_by_operator">;
551
+ triggerId: z.ZodUUID;
552
+ connector: z.ZodEnum<{
553
+ hyperliquid: "hyperliquid";
554
+ binance: "binance";
555
+ bybit: "bybit";
556
+ okx: "okx";
557
+ lighter: "lighter";
558
+ lighter_rhc: "lighter_rhc";
559
+ }>;
560
+ positionId: z.ZodOptional<z.ZodUUID>;
561
+ semanticBracketType: z.ZodEnum<{
562
+ NONE: "NONE";
563
+ STOP_LOSS: "STOP_LOSS";
564
+ TAKE_PROFIT: "TAKE_PROFIT";
565
+ }>;
566
+ }, z.core.$strip>, z.ZodObject<{
567
+ legs: z.ZodArray<z.ZodObject<{
568
+ id: z.ZodString;
569
+ symbol: z.ZodString;
570
+ side: z.ZodEnum<{
571
+ BUY: "BUY";
572
+ SELL: "SELL";
573
+ }>;
574
+ }, z.core.$strip>>;
575
+ type: z.ZodLiteral<"ladder_cancelled_by_operator">;
576
+ ladderId: z.ZodUUID;
577
+ connector: z.ZodEnum<{
578
+ hyperliquid: "hyperliquid";
579
+ binance: "binance";
580
+ bybit: "bybit";
581
+ okx: "okx";
582
+ lighter: "lighter";
583
+ lighter_rhc: "lighter_rhc";
584
+ }>;
585
+ positionId: z.ZodOptional<z.ZodUUID>;
586
+ }, z.core.$strip>, z.ZodObject<{
587
+ legs: z.ZodArray<z.ZodObject<{
588
+ id: z.ZodString;
589
+ symbol: z.ZodString;
590
+ side: z.ZodEnum<{
591
+ BUY: "BUY";
592
+ SELL: "SELL";
593
+ }>;
594
+ }, z.core.$strip>>;
595
+ type: z.ZodLiteral<"auto_rebalance_stopped_by_operator">;
596
+ configId: z.ZodUUID;
597
+ positionId: z.ZodUUID;
598
+ connector: z.ZodEnum<{
599
+ hyperliquid: "hyperliquid";
600
+ binance: "binance";
601
+ bybit: "bybit";
602
+ okx: "okx";
603
+ lighter: "lighter";
604
+ lighter_rhc: "lighter_rhc";
605
+ }>;
526
606
  }, z.core.$strip>], "type">;
527
607
  export type NotificationParameters = z.output<typeof NotificationParameters>;
528
608
  export declare const Notification: z.ZodObject<{
@@ -549,6 +629,12 @@ export declare const Notification: z.ZodObject<{
549
629
  COPY_LEVERAGE_NOT_APPLIED: "COPY_LEVERAGE_NOT_APPLIED";
550
630
  POSITION_LIQUIDATION: "POSITION_LIQUIDATION";
551
631
  TRIGGER_CANCELLED_POSITION_RESIZED: "TRIGGER_CANCELLED_POSITION_RESIZED";
632
+ TAKE_PROFIT_PARTIAL: "TAKE_PROFIT_PARTIAL";
633
+ STOP_LOSS_PARTIAL: "STOP_LOSS_PARTIAL";
634
+ TRIGGER_ORDER_PARTIAL: "TRIGGER_ORDER_PARTIAL";
635
+ TRIGGER_CANCELLED_BY_OPERATOR: "TRIGGER_CANCELLED_BY_OPERATOR";
636
+ LADDER_CANCELLED_BY_OPERATOR: "LADDER_CANCELLED_BY_OPERATOR";
637
+ AUTO_REBALANCE_STOPPED_BY_OPERATOR: "AUTO_REBALANCE_STOPPED_BY_OPERATOR";
552
638
  }>;
553
639
  parameters: z.ZodDiscriminatedUnion<[z.ZodObject<{
554
640
  type: z.ZodLiteral<"position_liquidation">;
@@ -610,6 +696,7 @@ export declare const Notification: z.ZodObject<{
610
696
  }>>;
611
697
  level: z.ZodOptional<z.ZodNumber>;
612
698
  reason: z.ZodOptional<z.ZodString>;
699
+ triggerActive: z.ZodOptional<z.ZodBoolean>;
613
700
  type: z.ZodLiteral<"take_profit">;
614
701
  triggerId: z.ZodUUID;
615
702
  positionId: z.ZodUUID;
@@ -653,6 +740,7 @@ export declare const Notification: z.ZodObject<{
653
740
  }>>;
654
741
  level: z.ZodOptional<z.ZodNumber>;
655
742
  reason: z.ZodOptional<z.ZodString>;
743
+ triggerActive: z.ZodOptional<z.ZodBoolean>;
656
744
  type: z.ZodLiteral<"stop_loss">;
657
745
  triggerId: z.ZodUUID;
658
746
  positionId: z.ZodUUID;
@@ -692,6 +780,7 @@ export declare const Notification: z.ZodObject<{
692
780
  }>>;
693
781
  level: z.ZodOptional<z.ZodNumber>;
694
782
  reason: z.ZodOptional<z.ZodString>;
783
+ triggerActive: z.ZodOptional<z.ZodBoolean>;
695
784
  type: z.ZodLiteral<"trigger_order">;
696
785
  triggerId: z.ZodUUID;
697
786
  positionId: z.ZodUUID;
@@ -731,6 +820,7 @@ export declare const Notification: z.ZodObject<{
731
820
  }>>;
732
821
  level: z.ZodOptional<z.ZodNumber>;
733
822
  reason: z.ZodOptional<z.ZodString>;
823
+ triggerActive: z.ZodOptional<z.ZodBoolean>;
734
824
  type: z.ZodLiteral<"default_trigger">;
735
825
  triggerId: z.ZodUUID;
736
826
  connector: z.ZodEnum<{
@@ -1018,6 +1108,71 @@ export declare const Notification: z.ZodObject<{
1018
1108
  notional_trailing: "notional_trailing";
1019
1109
  upnl_trailing: "upnl_trailing";
1020
1110
  }>;
1111
+ }, z.core.$strip>, z.ZodObject<{
1112
+ legs: z.ZodArray<z.ZodObject<{
1113
+ id: z.ZodString;
1114
+ symbol: z.ZodString;
1115
+ side: z.ZodEnum<{
1116
+ BUY: "BUY";
1117
+ SELL: "SELL";
1118
+ }>;
1119
+ }, z.core.$strip>>;
1120
+ type: z.ZodLiteral<"trigger_cancelled_by_operator">;
1121
+ triggerId: z.ZodUUID;
1122
+ connector: z.ZodEnum<{
1123
+ hyperliquid: "hyperliquid";
1124
+ binance: "binance";
1125
+ bybit: "bybit";
1126
+ okx: "okx";
1127
+ lighter: "lighter";
1128
+ lighter_rhc: "lighter_rhc";
1129
+ }>;
1130
+ positionId: z.ZodOptional<z.ZodUUID>;
1131
+ semanticBracketType: z.ZodEnum<{
1132
+ NONE: "NONE";
1133
+ STOP_LOSS: "STOP_LOSS";
1134
+ TAKE_PROFIT: "TAKE_PROFIT";
1135
+ }>;
1136
+ }, z.core.$strip>, z.ZodObject<{
1137
+ legs: z.ZodArray<z.ZodObject<{
1138
+ id: z.ZodString;
1139
+ symbol: z.ZodString;
1140
+ side: z.ZodEnum<{
1141
+ BUY: "BUY";
1142
+ SELL: "SELL";
1143
+ }>;
1144
+ }, z.core.$strip>>;
1145
+ type: z.ZodLiteral<"ladder_cancelled_by_operator">;
1146
+ ladderId: z.ZodUUID;
1147
+ connector: z.ZodEnum<{
1148
+ hyperliquid: "hyperliquid";
1149
+ binance: "binance";
1150
+ bybit: "bybit";
1151
+ okx: "okx";
1152
+ lighter: "lighter";
1153
+ lighter_rhc: "lighter_rhc";
1154
+ }>;
1155
+ positionId: z.ZodOptional<z.ZodUUID>;
1156
+ }, z.core.$strip>, z.ZodObject<{
1157
+ legs: z.ZodArray<z.ZodObject<{
1158
+ id: z.ZodString;
1159
+ symbol: z.ZodString;
1160
+ side: z.ZodEnum<{
1161
+ BUY: "BUY";
1162
+ SELL: "SELL";
1163
+ }>;
1164
+ }, z.core.$strip>>;
1165
+ type: z.ZodLiteral<"auto_rebalance_stopped_by_operator">;
1166
+ configId: z.ZodUUID;
1167
+ positionId: z.ZodUUID;
1168
+ connector: z.ZodEnum<{
1169
+ hyperliquid: "hyperliquid";
1170
+ binance: "binance";
1171
+ bybit: "bybit";
1172
+ okx: "okx";
1173
+ lighter: "lighter";
1174
+ lighter_rhc: "lighter_rhc";
1175
+ }>;
1021
1176
  }, z.core.$strip>], "type">;
1022
1177
  isRead: z.ZodBoolean;
1023
1178
  createdAt: z.ZodString;
@@ -24,6 +24,12 @@ export declare const NotificationListResponse: z.ZodObject<{
24
24
  COPY_LEVERAGE_NOT_APPLIED: "COPY_LEVERAGE_NOT_APPLIED";
25
25
  POSITION_LIQUIDATION: "POSITION_LIQUIDATION";
26
26
  TRIGGER_CANCELLED_POSITION_RESIZED: "TRIGGER_CANCELLED_POSITION_RESIZED";
27
+ TAKE_PROFIT_PARTIAL: "TAKE_PROFIT_PARTIAL";
28
+ STOP_LOSS_PARTIAL: "STOP_LOSS_PARTIAL";
29
+ TRIGGER_ORDER_PARTIAL: "TRIGGER_ORDER_PARTIAL";
30
+ TRIGGER_CANCELLED_BY_OPERATOR: "TRIGGER_CANCELLED_BY_OPERATOR";
31
+ LADDER_CANCELLED_BY_OPERATOR: "LADDER_CANCELLED_BY_OPERATOR";
32
+ AUTO_REBALANCE_STOPPED_BY_OPERATOR: "AUTO_REBALANCE_STOPPED_BY_OPERATOR";
27
33
  }>;
28
34
  parameters: z.ZodDiscriminatedUnion<[z.ZodObject<{
29
35
  type: z.ZodLiteral<"position_liquidation">;
@@ -85,6 +91,7 @@ export declare const NotificationListResponse: z.ZodObject<{
85
91
  }>>;
86
92
  level: z.ZodOptional<z.ZodNumber>;
87
93
  reason: z.ZodOptional<z.ZodString>;
94
+ triggerActive: z.ZodOptional<z.ZodBoolean>;
88
95
  type: z.ZodLiteral<"take_profit">;
89
96
  triggerId: z.ZodUUID;
90
97
  positionId: z.ZodUUID;
@@ -128,6 +135,7 @@ export declare const NotificationListResponse: z.ZodObject<{
128
135
  }>>;
129
136
  level: z.ZodOptional<z.ZodNumber>;
130
137
  reason: z.ZodOptional<z.ZodString>;
138
+ triggerActive: z.ZodOptional<z.ZodBoolean>;
131
139
  type: z.ZodLiteral<"stop_loss">;
132
140
  triggerId: z.ZodUUID;
133
141
  positionId: z.ZodUUID;
@@ -167,6 +175,7 @@ export declare const NotificationListResponse: z.ZodObject<{
167
175
  }>>;
168
176
  level: z.ZodOptional<z.ZodNumber>;
169
177
  reason: z.ZodOptional<z.ZodString>;
178
+ triggerActive: z.ZodOptional<z.ZodBoolean>;
170
179
  type: z.ZodLiteral<"trigger_order">;
171
180
  triggerId: z.ZodUUID;
172
181
  positionId: z.ZodUUID;
@@ -206,6 +215,7 @@ export declare const NotificationListResponse: z.ZodObject<{
206
215
  }>>;
207
216
  level: z.ZodOptional<z.ZodNumber>;
208
217
  reason: z.ZodOptional<z.ZodString>;
218
+ triggerActive: z.ZodOptional<z.ZodBoolean>;
209
219
  type: z.ZodLiteral<"default_trigger">;
210
220
  triggerId: z.ZodUUID;
211
221
  connector: z.ZodEnum<{
@@ -493,6 +503,71 @@ export declare const NotificationListResponse: z.ZodObject<{
493
503
  notional_trailing: "notional_trailing";
494
504
  upnl_trailing: "upnl_trailing";
495
505
  }>;
506
+ }, z.core.$strip>, z.ZodObject<{
507
+ legs: z.ZodArray<z.ZodObject<{
508
+ id: z.ZodString;
509
+ symbol: z.ZodString;
510
+ side: z.ZodEnum<{
511
+ BUY: "BUY";
512
+ SELL: "SELL";
513
+ }>;
514
+ }, z.core.$strip>>;
515
+ type: z.ZodLiteral<"trigger_cancelled_by_operator">;
516
+ triggerId: z.ZodUUID;
517
+ connector: z.ZodEnum<{
518
+ hyperliquid: "hyperliquid";
519
+ binance: "binance";
520
+ bybit: "bybit";
521
+ okx: "okx";
522
+ lighter: "lighter";
523
+ lighter_rhc: "lighter_rhc";
524
+ }>;
525
+ positionId: z.ZodOptional<z.ZodUUID>;
526
+ semanticBracketType: z.ZodEnum<{
527
+ NONE: "NONE";
528
+ STOP_LOSS: "STOP_LOSS";
529
+ TAKE_PROFIT: "TAKE_PROFIT";
530
+ }>;
531
+ }, z.core.$strip>, z.ZodObject<{
532
+ legs: z.ZodArray<z.ZodObject<{
533
+ id: z.ZodString;
534
+ symbol: z.ZodString;
535
+ side: z.ZodEnum<{
536
+ BUY: "BUY";
537
+ SELL: "SELL";
538
+ }>;
539
+ }, z.core.$strip>>;
540
+ type: z.ZodLiteral<"ladder_cancelled_by_operator">;
541
+ ladderId: z.ZodUUID;
542
+ connector: z.ZodEnum<{
543
+ hyperliquid: "hyperliquid";
544
+ binance: "binance";
545
+ bybit: "bybit";
546
+ okx: "okx";
547
+ lighter: "lighter";
548
+ lighter_rhc: "lighter_rhc";
549
+ }>;
550
+ positionId: z.ZodOptional<z.ZodUUID>;
551
+ }, z.core.$strip>, z.ZodObject<{
552
+ legs: z.ZodArray<z.ZodObject<{
553
+ id: z.ZodString;
554
+ symbol: z.ZodString;
555
+ side: z.ZodEnum<{
556
+ BUY: "BUY";
557
+ SELL: "SELL";
558
+ }>;
559
+ }, z.core.$strip>>;
560
+ type: z.ZodLiteral<"auto_rebalance_stopped_by_operator">;
561
+ configId: z.ZodUUID;
562
+ positionId: z.ZodUUID;
563
+ connector: z.ZodEnum<{
564
+ hyperliquid: "hyperliquid";
565
+ binance: "binance";
566
+ bybit: "bybit";
567
+ okx: "okx";
568
+ lighter: "lighter";
569
+ lighter_rhc: "lighter_rhc";
570
+ }>;
496
571
  }, z.core.$strip>], "type">;
497
572
  isRead: z.ZodBoolean;
498
573
  createdAt: z.ZodString;