@polyester/sdk 0.29.1 → 0.29.2
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/CHANGELOG.md +6 -0
- package/dist/gen/triggers/v1/triggers_pb.d.ts +6 -0
- package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.js +7 -1
- package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +42 -42
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +6 -6
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +1 -1
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +17 -17
- package/dist/services/triggers/triggers.codecs.js +1 -0
- package/dist/services/triggers/triggers.codecs.js.map +1 -1
- package/package.json +1 -1
|
@@ -29,62 +29,62 @@ declare const CreateTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSche
|
|
|
29
29
|
type CreateTriggerResult = v.InferOutput<typeof CreateTriggerResultSchema>;
|
|
30
30
|
declare const CancelTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
31
31
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
32
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
32
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused">]>;
|
|
33
33
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
34
34
|
}, undefined>, v.TransformAction<{
|
|
35
35
|
triggerId: string;
|
|
36
|
-
status: "unspecified" | "
|
|
36
|
+
status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
|
|
37
37
|
tsNs: bigint;
|
|
38
38
|
}, {
|
|
39
39
|
ts: number;
|
|
40
40
|
tsNs: string;
|
|
41
41
|
triggerId: string;
|
|
42
|
-
status: "unspecified" | "
|
|
42
|
+
status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
|
|
43
43
|
}>]>;
|
|
44
44
|
type CancelTriggerResult = v.InferOutput<typeof CancelTriggerResultSchema>;
|
|
45
45
|
declare const ModifyTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
46
46
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
47
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
47
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused">]>;
|
|
48
48
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
49
49
|
}, undefined>, v.TransformAction<{
|
|
50
50
|
triggerId: string;
|
|
51
|
-
status: "unspecified" | "
|
|
51
|
+
status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
|
|
52
52
|
tsNs: bigint;
|
|
53
53
|
}, {
|
|
54
54
|
ts: number;
|
|
55
55
|
tsNs: string;
|
|
56
56
|
triggerId: string;
|
|
57
|
-
status: "unspecified" | "
|
|
57
|
+
status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
|
|
58
58
|
}>]>;
|
|
59
59
|
type ModifyTriggerResult = v.InferOutput<typeof ModifyTriggerResultSchema>;
|
|
60
60
|
declare const PauseTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
61
61
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
62
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
62
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused">]>;
|
|
63
63
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
64
64
|
}, undefined>, v.TransformAction<{
|
|
65
65
|
triggerId: string;
|
|
66
|
-
status: "unspecified" | "
|
|
66
|
+
status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
|
|
67
67
|
tsNs: bigint;
|
|
68
68
|
}, {
|
|
69
69
|
ts: number;
|
|
70
70
|
tsNs: string;
|
|
71
71
|
triggerId: string;
|
|
72
|
-
status: "unspecified" | "
|
|
72
|
+
status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
|
|
73
73
|
}>]>;
|
|
74
74
|
type PauseTriggerResult = v.InferOutput<typeof PauseTriggerResultSchema>;
|
|
75
75
|
declare const ResumeTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
76
76
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
77
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
77
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused">]>;
|
|
78
78
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
79
79
|
}, undefined>, v.TransformAction<{
|
|
80
80
|
triggerId: string;
|
|
81
|
-
status: "unspecified" | "
|
|
81
|
+
status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
|
|
82
82
|
tsNs: bigint;
|
|
83
83
|
}, {
|
|
84
84
|
ts: number;
|
|
85
85
|
tsNs: string;
|
|
86
86
|
triggerId: string;
|
|
87
|
-
status: "unspecified" | "
|
|
87
|
+
status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
|
|
88
88
|
}>]>;
|
|
89
89
|
type ResumeTriggerResult = v.InferOutput<typeof ResumeTriggerResultSchema>;
|
|
90
90
|
type StopDetailsOutput = {
|
|
@@ -560,7 +560,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
560
560
|
triggerId: string;
|
|
561
561
|
subaccountId: string;
|
|
562
562
|
symbolId: number;
|
|
563
|
-
status: "unspecified" | "
|
|
563
|
+
status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
|
|
564
564
|
parentOrderId: string | undefined;
|
|
565
565
|
qty: string;
|
|
566
566
|
feeAsset: "unspecified" | "quote" | "base";
|
|
@@ -712,11 +712,11 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
712
712
|
} | {
|
|
713
713
|
runtimeDetails: TriggerDetailsOutput;
|
|
714
714
|
cancelReason: undefined;
|
|
715
|
-
failureReason: "unspecified" | "internal_error" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "market_halted" | "engine_busy" | "account_unknown" | "order_unknown" | "post_only_cross" | "reduce_only_blocked" | "price_band_violation" | "market_cap_violation" | "empty_book" | "fok_insufficient_liquidity" | "fee_asset_not_allowed" | "market_price_unavailable" | "stale_quote" | "min_quantity" | "step_size" | "invalid_sizing" | "max_quote_debit_too_small" | "fee_ceiling_exceeded" | "trigger_price_invalid" | "trigger_price_source_unsupported" | "trailing_distance_invalid" | "modification_requires_replace" | "order_already_terminal" | "conflict_idempotency_key_reuse" | "rate_limited" | "policy_spot_trade_deny" | "policy_market_deny" | "policy_max_notional" | "policy_max_open_orders" | "policy_trading_halted";
|
|
715
|
+
failureReason: "unspecified" | "internal_error" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "market_halted" | "engine_busy" | "account_unknown" | "order_unknown" | "post_only_cross" | "reduce_only_blocked" | "price_band_violation" | "market_cap_violation" | "empty_book" | "fok_insufficient_liquidity" | "fee_asset_not_allowed" | "market_price_unavailable" | "stale_quote" | "min_quantity" | "step_size" | "invalid_sizing" | "max_quote_debit_too_small" | "fee_ceiling_exceeded" | "trigger_price_invalid" | "trigger_price_source_unsupported" | "trailing_distance_invalid" | "modification_requires_replace" | "order_already_terminal" | "conflict_idempotency_key_reuse" | "rate_limited" | "policy_spot_trade_deny" | "policy_market_deny" | "policy_max_notional" | "policy_max_open_orders" | "policy_trading_halted" | "max_slippage_invalid";
|
|
716
716
|
triggerId: string;
|
|
717
717
|
subaccountId: string;
|
|
718
718
|
symbolId: number;
|
|
719
|
-
status: "unspecified" | "
|
|
719
|
+
status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
|
|
720
720
|
parentOrderId: string | undefined;
|
|
721
721
|
qty: string;
|
|
722
722
|
feeAsset: "unspecified" | "quote" | "base";
|
|
@@ -872,7 +872,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
872
872
|
triggerId: string;
|
|
873
873
|
subaccountId: string;
|
|
874
874
|
symbolId: number;
|
|
875
|
-
status: "unspecified" | "
|
|
875
|
+
status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
|
|
876
876
|
parentOrderId: string | undefined;
|
|
877
877
|
qty: string;
|
|
878
878
|
feeAsset: "unspecified" | "quote" | "base";
|
|
@@ -1078,7 +1078,7 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
|
|
|
1078
1078
|
firePrice: string | undefined;
|
|
1079
1079
|
} | {
|
|
1080
1080
|
cancelReason: undefined;
|
|
1081
|
-
failureReason: "unspecified" | "internal_error" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "market_halted" | "engine_busy" | "account_unknown" | "order_unknown" | "post_only_cross" | "reduce_only_blocked" | "price_band_violation" | "market_cap_violation" | "empty_book" | "fok_insufficient_liquidity" | "fee_asset_not_allowed" | "market_price_unavailable" | "stale_quote" | "min_quantity" | "step_size" | "invalid_sizing" | "max_quote_debit_too_small" | "fee_ceiling_exceeded" | "trigger_price_invalid" | "trigger_price_source_unsupported" | "trailing_distance_invalid" | "modification_requires_replace" | "order_already_terminal" | "conflict_idempotency_key_reuse" | "rate_limited" | "policy_spot_trade_deny" | "policy_market_deny" | "policy_max_notional" | "policy_max_open_orders" | "policy_trading_halted";
|
|
1081
|
+
failureReason: "unspecified" | "internal_error" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "market_halted" | "engine_busy" | "account_unknown" | "order_unknown" | "post_only_cross" | "reduce_only_blocked" | "price_band_violation" | "market_cap_violation" | "empty_book" | "fok_insufficient_liquidity" | "fee_asset_not_allowed" | "market_price_unavailable" | "stale_quote" | "min_quantity" | "step_size" | "invalid_sizing" | "max_quote_debit_too_small" | "fee_ceiling_exceeded" | "trigger_price_invalid" | "trigger_price_source_unsupported" | "trailing_distance_invalid" | "modification_requires_replace" | "order_already_terminal" | "conflict_idempotency_key_reuse" | "rate_limited" | "policy_spot_trade_deny" | "policy_market_deny" | "policy_max_notional" | "policy_max_open_orders" | "policy_trading_halted" | "max_slippage_invalid";
|
|
1082
1082
|
triggerId: string;
|
|
1083
1083
|
subaccountId: string;
|
|
1084
1084
|
symbolId: number;
|
|
@@ -127,6 +127,7 @@ const TriggerFailureReasonCodec = { protoToOutput: {
|
|
|
127
127
|
[49]: "policy_max_notional",
|
|
128
128
|
[50]: "policy_max_open_orders",
|
|
129
129
|
[51]: "policy_trading_halted",
|
|
130
|
+
[53]: "max_slippage_invalid",
|
|
130
131
|
[998]: "missing_reason_code",
|
|
131
132
|
[999]: "internal_error"
|
|
132
133
|
} };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers.codecs.js","names":[],"sources":["../../../src/services/triggers/triggers.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/triggers/v1/triggers_pb.js\";\nimport * as ProtoOrders from \"../../gen/orders/v1/orders_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\nexport {\n FEE_ASSET_VALUES,\n FeeAssetCodec,\n type FeeAssetValue,\n ORDER_SIDE_VALUES as TRIGGER_SIDE_VALUES,\n ORDER_TYPE_VALUES,\n OrderSideCodec as TriggerSideCodec,\n type OrderSideValue as TriggerSideValue,\n OrderTypeCodec,\n type OrderTypeValue,\n SELF_TRADE_PREVENTION_MODE_VALUES,\n SelfTradePreventionModeCodec,\n type SelfTradePreventionModeValue,\n TIME_IN_FORCE_OUTPUT_VALUES,\n TIME_IN_FORCE_VALUES,\n TimeInForceCodec,\n type TimeInForceOutputValue,\n type TimeInForceValue,\n TRIGGER_PRICE_SOURCE_VALUES,\n TriggerPriceSourceCodec,\n type TriggerPriceSourceValue,\n} from \"../orders/order-enums.codecs.js\";\n\nexport const TRIGGER_TYPE_VALUES = [\n \"stop_loss\",\n \"take_profit\",\n \"trailing_stop\",\n \"twap\",\n \"ladder\",\n] as const;\nexport type TriggerTypeValue = (typeof TRIGGER_TYPE_VALUES)[number];\n\nexport const TRIGGER_TYPE_LABEL_VALUES = TRIGGER_TYPE_VALUES;\nexport type TriggerTypeLabelValue = (typeof TRIGGER_TYPE_LABEL_VALUES)[number];\n\nexport const TRIGGER_STATUS_FILTER_VALUES = [\n \"created\",\n \"armed\",\n \"running\",\n \"completed\",\n \"cancelled\",\n \"failed\",\n \"paused\",\n] as const;\nexport type TriggerStatusFilterValue = (typeof TRIGGER_STATUS_FILTER_VALUES)[number];\n\nexport const TRIGGER_STATUS_LABEL_VALUES = TRIGGER_STATUS_FILTER_VALUES;\nexport type TriggerStatusLabelValue = (typeof TRIGGER_STATUS_LABEL_VALUES)[number];\n\nexport const TRIGGER_EVENT_TYPE_VALUES = [\n \"fired\",\n \"canceled\",\n \"updated\",\n \"failed\",\n \"activated\",\n] as const;\nexport type TriggerEventTypeValue = (typeof TRIGGER_EVENT_TYPE_VALUES)[number];\n\nexport const TRIGGER_EVENT_TYPE_LABEL_VALUES = TRIGGER_EVENT_TYPE_VALUES;\nexport type TriggerEventTypeLabelValue = (typeof TRIGGER_EVENT_TYPE_LABEL_VALUES)[number];\n\nexport const TRIGGER_CANCEL_REASON_LABEL_VALUES = [\n \"user_request\",\n \"oco\",\n \"parent_canceled_no_fill\",\n \"missing_reason_code\",\n \"internal_error\",\n] as const;\nexport type TriggerCancelReasonLabelValue = (typeof TRIGGER_CANCEL_REASON_LABEL_VALUES)[number];\n\nexport const TRIGGER_FAILURE_REASON_LABEL_VALUES = [\n \"unknown_symbol\",\n \"pair_disabled\",\n \"min_notional\",\n \"tick_size\",\n \"insufficient_funds\",\n \"risk_limit\",\n \"duplicate_client_id\",\n \"market_halted\",\n \"engine_busy\",\n \"account_unknown\",\n \"order_unknown\",\n \"post_only_cross\",\n \"reduce_only_blocked\",\n \"price_band_violation\",\n \"market_cap_violation\",\n \"empty_book\",\n \"fok_insufficient_liquidity\",\n \"fee_asset_not_allowed\",\n \"market_price_unavailable\",\n \"stale_quote\",\n \"min_quantity\",\n \"step_size\",\n \"invalid_sizing\",\n \"max_quote_debit_too_small\",\n \"fee_ceiling_exceeded\",\n \"trigger_price_invalid\",\n \"trigger_price_source_unsupported\",\n \"trailing_distance_invalid\",\n \"modification_requires_replace\",\n \"order_already_terminal\",\n \"conflict_idempotency_key_reuse\",\n \"rate_limited\",\n \"policy_spot_trade_deny\",\n \"policy_market_deny\",\n \"policy_max_notional\",\n \"policy_max_open_orders\",\n \"policy_trading_halted\",\n \"missing_reason_code\",\n \"internal_error\",\n] as const;\nexport type TriggerFailureReasonLabelValue = (typeof TRIGGER_FAILURE_REASON_LABEL_VALUES)[number];\n\nexport const TRIGGER_DIRECTION_VALUES = [\"above\", \"below\"] as const;\nexport type TriggerDirectionValue = (typeof TRIGGER_DIRECTION_VALUES)[number];\n\nexport const LADDER_DISTRIBUTION_VALUES = [\"linear\"] as const;\nexport type LadderDistributionValue = (typeof LADDER_DISTRIBUTION_VALUES)[number];\n\nexport const LADDER_DISTRIBUTION_LABEL_VALUES = [\n \"linear\",\n \"geometric\",\n \"weighted_favorable\",\n] as const;\nexport type LadderDistributionLabelValue = (typeof LADDER_DISTRIBUTION_LABEL_VALUES)[number];\n\nexport const TriggerTypeCodec = {\n inputToProto: {\n stop_loss: Proto.TriggerType.STOP_LOSS,\n take_profit: Proto.TriggerType.TAKE_PROFIT,\n trailing_stop: Proto.TriggerType.TRAILING_STOP,\n twap: Proto.TriggerType.TWAP,\n ladder: Proto.TriggerType.LADDER,\n } satisfies InputToProto<TriggerTypeValue, Proto.TriggerType>,\n protoToOutput: {\n [Proto.TriggerType.TRIGGER_TYPE_UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerType.STOP_LOSS]: \"stop_loss\",\n [Proto.TriggerType.TAKE_PROFIT]: \"take_profit\",\n [Proto.TriggerType.TRAILING_STOP]: \"trailing_stop\",\n [Proto.TriggerType.TWAP]: \"twap\",\n [Proto.TriggerType.LADDER]: \"ladder\",\n } satisfies ProtoToOutput<Proto.TriggerType, TriggerTypeLabelValue>,\n} as const;\n\nexport const TriggerStatusCodec = {\n inputToProto: {\n created: Proto.TriggerStatus.STATUS_CREATED,\n armed: Proto.TriggerStatus.STATUS_ARMED,\n running: Proto.TriggerStatus.STATUS_RUNNING,\n completed: Proto.TriggerStatus.STATUS_COMPLETED,\n cancelled: Proto.TriggerStatus.STATUS_CANCELED,\n failed: Proto.TriggerStatus.STATUS_FAILED,\n paused: Proto.TriggerStatus.STATUS_PAUSED,\n } satisfies InputToProto<TriggerStatusFilterValue, Proto.TriggerStatus>,\n protoToOutput: {\n [Proto.TriggerStatus.STATUS_UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerStatus.STATUS_CREATED]: \"created\",\n [Proto.TriggerStatus.STATUS_ARMED]: \"armed\",\n [Proto.TriggerStatus.STATUS_RUNNING]: \"running\",\n [Proto.TriggerStatus.STATUS_COMPLETED]: \"completed\",\n [Proto.TriggerStatus.STATUS_CANCELED]: \"cancelled\",\n [Proto.TriggerStatus.STATUS_FAILED]: \"failed\",\n [Proto.TriggerStatus.STATUS_PAUSED]: \"paused\",\n } satisfies ProtoToOutput<Proto.TriggerStatus, TriggerStatusLabelValue>,\n} as const;\n\nexport const TriggerEventTypeCodec = {\n inputToProto: {\n fired: Proto.TriggerEventType.EVENT_FIRED,\n canceled: Proto.TriggerEventType.EVENT_CANCELED,\n updated: Proto.TriggerEventType.EVENT_UPDATED,\n failed: Proto.TriggerEventType.EVENT_FAILED,\n activated: Proto.TriggerEventType.EVENT_ACTIVATED,\n } satisfies InputToProto<TriggerEventTypeValue, Proto.TriggerEventType>,\n protoToOutput: {\n [Proto.TriggerEventType.EVENT_UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerEventType.EVENT_FIRED]: \"fired\",\n [Proto.TriggerEventType.EVENT_CANCELED]: \"canceled\",\n [Proto.TriggerEventType.EVENT_UPDATED]: \"updated\",\n [Proto.TriggerEventType.EVENT_FAILED]: \"failed\",\n [Proto.TriggerEventType.EVENT_ACTIVATED]: \"activated\",\n } satisfies ProtoToOutput<Proto.TriggerEventType, TriggerEventTypeLabelValue>,\n} as const;\n\nexport const TriggerCancelReasonCodec = {\n protoToOutput: {\n [Proto.TriggerCancelReason.UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerCancelReason.USER_REQUEST]: \"user_request\",\n [Proto.TriggerCancelReason.OCO]: \"oco\",\n [Proto.TriggerCancelReason.PARENT_CANCELED_NO_FILL]: \"parent_canceled_no_fill\",\n [Proto.TriggerCancelReason.MISSING_REASON_CODE]: \"missing_reason_code\",\n [Proto.TriggerCancelReason.INTERNAL_ERROR]: \"internal_error\",\n } satisfies ProtoToOutput<Proto.TriggerCancelReason, TriggerCancelReasonLabelValue>,\n} as const;\n\nexport const TriggerFailureReasonCodec = {\n protoToOutput: {\n [Proto.TriggerFailureReason.UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerFailureReason.UNKNOWN_SYMBOL]: \"unknown_symbol\",\n [Proto.TriggerFailureReason.PAIR_DISABLED]: \"pair_disabled\",\n [Proto.TriggerFailureReason.MIN_NOTIONAL]: \"min_notional\",\n [Proto.TriggerFailureReason.TICK_SIZE]: \"tick_size\",\n [Proto.TriggerFailureReason.INSUFFICIENT_FUNDS]: \"insufficient_funds\",\n [Proto.TriggerFailureReason.RISK_LIMIT]: \"risk_limit\",\n [Proto.TriggerFailureReason.DUPLICATE_CLIENT_ID]: \"duplicate_client_id\",\n [Proto.TriggerFailureReason.MARKET_HALTED]: \"market_halted\",\n [Proto.TriggerFailureReason.ENGINE_BUSY]: \"engine_busy\",\n [Proto.TriggerFailureReason.ACCOUNT_UNKNOWN]: \"account_unknown\",\n [Proto.TriggerFailureReason.ORDER_UNKNOWN]: \"order_unknown\",\n [Proto.TriggerFailureReason.POST_ONLY_CROSS]: \"post_only_cross\",\n [Proto.TriggerFailureReason.REDUCE_ONLY_BLOCKED]: \"reduce_only_blocked\",\n [Proto.TriggerFailureReason.PRICE_BAND_VIOLATION]: \"price_band_violation\",\n [Proto.TriggerFailureReason.MARKET_CAP_VIOLATION]: \"market_cap_violation\",\n [Proto.TriggerFailureReason.EMPTY_BOOK]: \"empty_book\",\n [Proto.TriggerFailureReason.FOK_INSUFFICIENT_LIQUIDITY]: \"fok_insufficient_liquidity\",\n [Proto.TriggerFailureReason.FEE_ASSET_NOT_ALLOWED]: \"fee_asset_not_allowed\",\n [Proto.TriggerFailureReason.MARKET_PRICE_UNAVAILABLE]: \"market_price_unavailable\",\n [Proto.TriggerFailureReason.STALE_QUOTE]: \"stale_quote\",\n [Proto.TriggerFailureReason.MIN_QUANTITY]: \"min_quantity\",\n [Proto.TriggerFailureReason.STEP_SIZE]: \"step_size\",\n [Proto.TriggerFailureReason.INVALID_SIZING]: \"invalid_sizing\",\n [Proto.TriggerFailureReason.MAX_QUOTE_DEBIT_TOO_SMALL]: \"max_quote_debit_too_small\",\n [Proto.TriggerFailureReason.FEE_CEILING_EXCEEDED]: \"fee_ceiling_exceeded\",\n [Proto.TriggerFailureReason.TRIGGER_PRICE_INVALID]: \"trigger_price_invalid\",\n [Proto.TriggerFailureReason.TRIGGER_PRICE_SOURCE_UNSUPPORTED]:\n \"trigger_price_source_unsupported\",\n [Proto.TriggerFailureReason.TRAILING_DISTANCE_INVALID]: \"trailing_distance_invalid\",\n [Proto.TriggerFailureReason.MODIFICATION_REQUIRES_REPLACE]: \"modification_requires_replace\",\n [Proto.TriggerFailureReason.ORDER_ALREADY_TERMINAL]: \"order_already_terminal\",\n [Proto.TriggerFailureReason.CONFLICT_IDEMPOTENCY_KEY_REUSE]:\n \"conflict_idempotency_key_reuse\",\n [Proto.TriggerFailureReason.RATE_LIMITED]: \"rate_limited\",\n [Proto.TriggerFailureReason.POLICY_SPOT_TRADE_DENY]: \"policy_spot_trade_deny\",\n [Proto.TriggerFailureReason.POLICY_MARKET_DENY]: \"policy_market_deny\",\n [Proto.TriggerFailureReason.POLICY_MAX_NOTIONAL]: \"policy_max_notional\",\n [Proto.TriggerFailureReason.POLICY_MAX_OPEN_ORDERS]: \"policy_max_open_orders\",\n [Proto.TriggerFailureReason.POLICY_TRADING_HALTED]: \"policy_trading_halted\",\n [Proto.TriggerFailureReason.MISSING_REASON_CODE]: \"missing_reason_code\",\n [Proto.TriggerFailureReason.INTERNAL_ERROR]: \"internal_error\",\n } satisfies ProtoToOutput<Proto.TriggerFailureReason, TriggerFailureReasonLabelValue>,\n} as const;\n\nexport const TriggerDirectionCodec = {\n inputToProto: {\n above: ProtoOrders.TriggerDirection.ABOVE,\n below: ProtoOrders.TriggerDirection.BELOW,\n } satisfies InputToProto<TriggerDirectionValue, ProtoOrders.TriggerDirection>,\n protoToOutput: {\n [ProtoOrders.TriggerDirection.TRIGGER_DIRECTION_UNSPECIFIED]: \"unspecified\",\n [ProtoOrders.TriggerDirection.ABOVE]: \"above\",\n [ProtoOrders.TriggerDirection.BELOW]: \"below\",\n } satisfies ProtoToOutput<ProtoOrders.TriggerDirection, TriggerDirectionValue>,\n} as const;\n\nexport const LadderDistributionCodec = {\n inputToProto: {\n linear: Proto.LadderDistribution.LINEAR,\n } satisfies InputToProto<LadderDistributionValue, Proto.LadderDistribution>,\n protoToOutput: {\n [Proto.LadderDistribution.LADDER_DISTRIBUTION_UNSPECIFIED]: \"unspecified\",\n [Proto.LadderDistribution.LINEAR]: \"linear\",\n [Proto.LadderDistribution.GEOMETRIC]: \"geometric\",\n [Proto.LadderDistribution.WEIGHTED_FAVORABLE]: \"weighted_favorable\",\n } satisfies ProtoToOutput<Proto.LadderDistribution, LadderDistributionLabelValue>,\n} as const;\n"],"mappings":";;;;AA0BA,MAAa,sBAAsB;CAC/B;CACA;CACA;CACA;CACA;AACJ;AAMA,MAAa,+BAA+B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAMA,MAAa,4BAA4B;CACrC;CACA;CACA;CACA;CACA;AACJ;AAuEA,MAAa,mBAAmB;CAC5B,cAAc;EACV,WAAA;EACA,aAAA;EACA,eAAA;EACA,MAAA;EACA,QAAA;CACJ;CACA,eAAe;GACmC,IAAA;GACf,IAAA;GACE,IAAA;GACE,IAAA;GACT,IAAA;GACE,IAAA;CAChC;AACJ;AAEA,MAAa,qBAAqB;CAC9B,cAAc;EACV,SAAA;EACA,OAAA;EACA,SAAA;EACA,WAAA;EACA,WAAA;EACA,QAAA;EACA,QAAA;CACJ;CACA,eAAe;GAC+B,IAAA;GACJ,IAAA;GACF,IAAA;GACE,IAAA;GACE,IAAA;GACD,IAAA;GACF,IAAA;GACA,IAAA;CACzC;AACJ;AAEA,MAAa,wBAAwB;CACjC,cAAc;EACV,OAAA;EACA,UAAA;EACA,SAAA;EACA,QAAA;EACA,WAAA;CACJ;CACA,eAAe;GACiC,IAAA;GACN,IAAA;GACG,IAAA;GACD,IAAA;GACD,IAAA;GACG,IAAA;CAC9C;AACJ;AAEA,MAAa,2BAA2B,EACpC,eAAe;EAC8B,IAAA;EACC,IAAA;EACT,IAAA;EACoB,IAAA;EACJ,MAAA;EACL,MAAA;AAChD,EACJ;AAEA,MAAa,4BAA4B,EACrC,eAAe;EAC+B,IAAA;EACG,IAAA;EACD,IAAA;EACD,IAAA;EACH,IAAA;EACS,IAAA;EACR,IAAA;EACS,IAAA;EACN,IAAA;EACF,IAAA;EACI,KAAA;EACF,KAAA;EACE,KAAA;EACI,KAAA;EACC,KAAA;EACA,KAAA;EACV,KAAA;EACgB,KAAA;EACL,KAAA;EACG,KAAA;EACb,KAAA;EACC,KAAA;EACH,KAAA;EACK,KAAA;EACW,KAAA;EACL,KAAA;EACC,KAAA;EAEhD,KAAA;EACoD,KAAA;EACI,KAAA;EACP,KAAA;EAEjD,KAAA;EACuC,KAAA;EACU,KAAA;EACJ,KAAA;EACC,KAAA;EACG,KAAA;EACD,KAAA;EACF,MAAA;EACL,MAAA;AACjD,EACJ;AAEA,MAAa,wBAAwB;CACjC,cAAc;EACV,OAAA;EACA,OAAA;CACJ;CACA,eAAe;GACmD,IAAA;GACxB,IAAA;GACA,IAAA;CAC1C;AACJ;AAEA,MAAa,0BAA0B;CACnC,cAAc,EACV,QAAA,EACJ;CACA,eAAe;GACiD,IAAA;GACzB,IAAA;GACG,IAAA;GACS,IAAA;CACnD;AACJ"}
|
|
1
|
+
{"version":3,"file":"triggers.codecs.js","names":[],"sources":["../../../src/services/triggers/triggers.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/triggers/v1/triggers_pb.js\";\nimport * as ProtoOrders from \"../../gen/orders/v1/orders_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\nexport {\n FEE_ASSET_VALUES,\n FeeAssetCodec,\n type FeeAssetValue,\n ORDER_SIDE_VALUES as TRIGGER_SIDE_VALUES,\n ORDER_TYPE_VALUES,\n OrderSideCodec as TriggerSideCodec,\n type OrderSideValue as TriggerSideValue,\n OrderTypeCodec,\n type OrderTypeValue,\n SELF_TRADE_PREVENTION_MODE_VALUES,\n SelfTradePreventionModeCodec,\n type SelfTradePreventionModeValue,\n TIME_IN_FORCE_OUTPUT_VALUES,\n TIME_IN_FORCE_VALUES,\n TimeInForceCodec,\n type TimeInForceOutputValue,\n type TimeInForceValue,\n TRIGGER_PRICE_SOURCE_VALUES,\n TriggerPriceSourceCodec,\n type TriggerPriceSourceValue,\n} from \"../orders/order-enums.codecs.js\";\n\nexport const TRIGGER_TYPE_VALUES = [\n \"stop_loss\",\n \"take_profit\",\n \"trailing_stop\",\n \"twap\",\n \"ladder\",\n] as const;\nexport type TriggerTypeValue = (typeof TRIGGER_TYPE_VALUES)[number];\n\nexport const TRIGGER_TYPE_LABEL_VALUES = TRIGGER_TYPE_VALUES;\nexport type TriggerTypeLabelValue = (typeof TRIGGER_TYPE_LABEL_VALUES)[number];\n\nexport const TRIGGER_STATUS_FILTER_VALUES = [\n \"created\",\n \"armed\",\n \"running\",\n \"completed\",\n \"cancelled\",\n \"failed\",\n \"paused\",\n] as const;\nexport type TriggerStatusFilterValue = (typeof TRIGGER_STATUS_FILTER_VALUES)[number];\n\nexport const TRIGGER_STATUS_LABEL_VALUES = TRIGGER_STATUS_FILTER_VALUES;\nexport type TriggerStatusLabelValue = (typeof TRIGGER_STATUS_LABEL_VALUES)[number];\n\nexport const TRIGGER_EVENT_TYPE_VALUES = [\n \"fired\",\n \"canceled\",\n \"updated\",\n \"failed\",\n \"activated\",\n] as const;\nexport type TriggerEventTypeValue = (typeof TRIGGER_EVENT_TYPE_VALUES)[number];\n\nexport const TRIGGER_EVENT_TYPE_LABEL_VALUES = TRIGGER_EVENT_TYPE_VALUES;\nexport type TriggerEventTypeLabelValue = (typeof TRIGGER_EVENT_TYPE_LABEL_VALUES)[number];\n\nexport const TRIGGER_CANCEL_REASON_LABEL_VALUES = [\n \"user_request\",\n \"oco\",\n \"parent_canceled_no_fill\",\n \"missing_reason_code\",\n \"internal_error\",\n] as const;\nexport type TriggerCancelReasonLabelValue = (typeof TRIGGER_CANCEL_REASON_LABEL_VALUES)[number];\n\nexport const TRIGGER_FAILURE_REASON_LABEL_VALUES = [\n \"unknown_symbol\",\n \"pair_disabled\",\n \"min_notional\",\n \"tick_size\",\n \"insufficient_funds\",\n \"risk_limit\",\n \"duplicate_client_id\",\n \"market_halted\",\n \"engine_busy\",\n \"account_unknown\",\n \"order_unknown\",\n \"post_only_cross\",\n \"reduce_only_blocked\",\n \"price_band_violation\",\n \"market_cap_violation\",\n \"empty_book\",\n \"fok_insufficient_liquidity\",\n \"fee_asset_not_allowed\",\n \"market_price_unavailable\",\n \"stale_quote\",\n \"min_quantity\",\n \"step_size\",\n \"invalid_sizing\",\n \"max_quote_debit_too_small\",\n \"fee_ceiling_exceeded\",\n \"trigger_price_invalid\",\n \"trigger_price_source_unsupported\",\n \"trailing_distance_invalid\",\n \"modification_requires_replace\",\n \"order_already_terminal\",\n \"conflict_idempotency_key_reuse\",\n \"rate_limited\",\n \"policy_spot_trade_deny\",\n \"policy_market_deny\",\n \"policy_max_notional\",\n \"policy_max_open_orders\",\n \"policy_trading_halted\",\n \"max_slippage_invalid\",\n \"missing_reason_code\",\n \"internal_error\",\n] as const;\nexport type TriggerFailureReasonLabelValue = (typeof TRIGGER_FAILURE_REASON_LABEL_VALUES)[number];\n\nexport const TRIGGER_DIRECTION_VALUES = [\"above\", \"below\"] as const;\nexport type TriggerDirectionValue = (typeof TRIGGER_DIRECTION_VALUES)[number];\n\nexport const LADDER_DISTRIBUTION_VALUES = [\"linear\"] as const;\nexport type LadderDistributionValue = (typeof LADDER_DISTRIBUTION_VALUES)[number];\n\nexport const LADDER_DISTRIBUTION_LABEL_VALUES = [\n \"linear\",\n \"geometric\",\n \"weighted_favorable\",\n] as const;\nexport type LadderDistributionLabelValue = (typeof LADDER_DISTRIBUTION_LABEL_VALUES)[number];\n\nexport const TriggerTypeCodec = {\n inputToProto: {\n stop_loss: Proto.TriggerType.STOP_LOSS,\n take_profit: Proto.TriggerType.TAKE_PROFIT,\n trailing_stop: Proto.TriggerType.TRAILING_STOP,\n twap: Proto.TriggerType.TWAP,\n ladder: Proto.TriggerType.LADDER,\n } satisfies InputToProto<TriggerTypeValue, Proto.TriggerType>,\n protoToOutput: {\n [Proto.TriggerType.TRIGGER_TYPE_UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerType.STOP_LOSS]: \"stop_loss\",\n [Proto.TriggerType.TAKE_PROFIT]: \"take_profit\",\n [Proto.TriggerType.TRAILING_STOP]: \"trailing_stop\",\n [Proto.TriggerType.TWAP]: \"twap\",\n [Proto.TriggerType.LADDER]: \"ladder\",\n } satisfies ProtoToOutput<Proto.TriggerType, TriggerTypeLabelValue>,\n} as const;\n\nexport const TriggerStatusCodec = {\n inputToProto: {\n created: Proto.TriggerStatus.STATUS_CREATED,\n armed: Proto.TriggerStatus.STATUS_ARMED,\n running: Proto.TriggerStatus.STATUS_RUNNING,\n completed: Proto.TriggerStatus.STATUS_COMPLETED,\n cancelled: Proto.TriggerStatus.STATUS_CANCELED,\n failed: Proto.TriggerStatus.STATUS_FAILED,\n paused: Proto.TriggerStatus.STATUS_PAUSED,\n } satisfies InputToProto<TriggerStatusFilterValue, Proto.TriggerStatus>,\n protoToOutput: {\n [Proto.TriggerStatus.STATUS_UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerStatus.STATUS_CREATED]: \"created\",\n [Proto.TriggerStatus.STATUS_ARMED]: \"armed\",\n [Proto.TriggerStatus.STATUS_RUNNING]: \"running\",\n [Proto.TriggerStatus.STATUS_COMPLETED]: \"completed\",\n [Proto.TriggerStatus.STATUS_CANCELED]: \"cancelled\",\n [Proto.TriggerStatus.STATUS_FAILED]: \"failed\",\n [Proto.TriggerStatus.STATUS_PAUSED]: \"paused\",\n } satisfies ProtoToOutput<Proto.TriggerStatus, TriggerStatusLabelValue>,\n} as const;\n\nexport const TriggerEventTypeCodec = {\n inputToProto: {\n fired: Proto.TriggerEventType.EVENT_FIRED,\n canceled: Proto.TriggerEventType.EVENT_CANCELED,\n updated: Proto.TriggerEventType.EVENT_UPDATED,\n failed: Proto.TriggerEventType.EVENT_FAILED,\n activated: Proto.TriggerEventType.EVENT_ACTIVATED,\n } satisfies InputToProto<TriggerEventTypeValue, Proto.TriggerEventType>,\n protoToOutput: {\n [Proto.TriggerEventType.EVENT_UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerEventType.EVENT_FIRED]: \"fired\",\n [Proto.TriggerEventType.EVENT_CANCELED]: \"canceled\",\n [Proto.TriggerEventType.EVENT_UPDATED]: \"updated\",\n [Proto.TriggerEventType.EVENT_FAILED]: \"failed\",\n [Proto.TriggerEventType.EVENT_ACTIVATED]: \"activated\",\n } satisfies ProtoToOutput<Proto.TriggerEventType, TriggerEventTypeLabelValue>,\n} as const;\n\nexport const TriggerCancelReasonCodec = {\n protoToOutput: {\n [Proto.TriggerCancelReason.UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerCancelReason.USER_REQUEST]: \"user_request\",\n [Proto.TriggerCancelReason.OCO]: \"oco\",\n [Proto.TriggerCancelReason.PARENT_CANCELED_NO_FILL]: \"parent_canceled_no_fill\",\n [Proto.TriggerCancelReason.MISSING_REASON_CODE]: \"missing_reason_code\",\n [Proto.TriggerCancelReason.INTERNAL_ERROR]: \"internal_error\",\n } satisfies ProtoToOutput<Proto.TriggerCancelReason, TriggerCancelReasonLabelValue>,\n} as const;\n\nexport const TriggerFailureReasonCodec = {\n protoToOutput: {\n [Proto.TriggerFailureReason.UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerFailureReason.UNKNOWN_SYMBOL]: \"unknown_symbol\",\n [Proto.TriggerFailureReason.PAIR_DISABLED]: \"pair_disabled\",\n [Proto.TriggerFailureReason.MIN_NOTIONAL]: \"min_notional\",\n [Proto.TriggerFailureReason.TICK_SIZE]: \"tick_size\",\n [Proto.TriggerFailureReason.INSUFFICIENT_FUNDS]: \"insufficient_funds\",\n [Proto.TriggerFailureReason.RISK_LIMIT]: \"risk_limit\",\n [Proto.TriggerFailureReason.DUPLICATE_CLIENT_ID]: \"duplicate_client_id\",\n [Proto.TriggerFailureReason.MARKET_HALTED]: \"market_halted\",\n [Proto.TriggerFailureReason.ENGINE_BUSY]: \"engine_busy\",\n [Proto.TriggerFailureReason.ACCOUNT_UNKNOWN]: \"account_unknown\",\n [Proto.TriggerFailureReason.ORDER_UNKNOWN]: \"order_unknown\",\n [Proto.TriggerFailureReason.POST_ONLY_CROSS]: \"post_only_cross\",\n [Proto.TriggerFailureReason.REDUCE_ONLY_BLOCKED]: \"reduce_only_blocked\",\n [Proto.TriggerFailureReason.PRICE_BAND_VIOLATION]: \"price_band_violation\",\n [Proto.TriggerFailureReason.MARKET_CAP_VIOLATION]: \"market_cap_violation\",\n [Proto.TriggerFailureReason.EMPTY_BOOK]: \"empty_book\",\n [Proto.TriggerFailureReason.FOK_INSUFFICIENT_LIQUIDITY]: \"fok_insufficient_liquidity\",\n [Proto.TriggerFailureReason.FEE_ASSET_NOT_ALLOWED]: \"fee_asset_not_allowed\",\n [Proto.TriggerFailureReason.MARKET_PRICE_UNAVAILABLE]: \"market_price_unavailable\",\n [Proto.TriggerFailureReason.STALE_QUOTE]: \"stale_quote\",\n [Proto.TriggerFailureReason.MIN_QUANTITY]: \"min_quantity\",\n [Proto.TriggerFailureReason.STEP_SIZE]: \"step_size\",\n [Proto.TriggerFailureReason.INVALID_SIZING]: \"invalid_sizing\",\n [Proto.TriggerFailureReason.MAX_QUOTE_DEBIT_TOO_SMALL]: \"max_quote_debit_too_small\",\n [Proto.TriggerFailureReason.FEE_CEILING_EXCEEDED]: \"fee_ceiling_exceeded\",\n [Proto.TriggerFailureReason.TRIGGER_PRICE_INVALID]: \"trigger_price_invalid\",\n [Proto.TriggerFailureReason.TRIGGER_PRICE_SOURCE_UNSUPPORTED]:\n \"trigger_price_source_unsupported\",\n [Proto.TriggerFailureReason.TRAILING_DISTANCE_INVALID]: \"trailing_distance_invalid\",\n [Proto.TriggerFailureReason.MODIFICATION_REQUIRES_REPLACE]: \"modification_requires_replace\",\n [Proto.TriggerFailureReason.ORDER_ALREADY_TERMINAL]: \"order_already_terminal\",\n [Proto.TriggerFailureReason.CONFLICT_IDEMPOTENCY_KEY_REUSE]:\n \"conflict_idempotency_key_reuse\",\n [Proto.TriggerFailureReason.RATE_LIMITED]: \"rate_limited\",\n [Proto.TriggerFailureReason.POLICY_SPOT_TRADE_DENY]: \"policy_spot_trade_deny\",\n [Proto.TriggerFailureReason.POLICY_MARKET_DENY]: \"policy_market_deny\",\n [Proto.TriggerFailureReason.POLICY_MAX_NOTIONAL]: \"policy_max_notional\",\n [Proto.TriggerFailureReason.POLICY_MAX_OPEN_ORDERS]: \"policy_max_open_orders\",\n [Proto.TriggerFailureReason.POLICY_TRADING_HALTED]: \"policy_trading_halted\",\n [Proto.TriggerFailureReason.MAX_SLIPPAGE_INVALID]: \"max_slippage_invalid\",\n [Proto.TriggerFailureReason.MISSING_REASON_CODE]: \"missing_reason_code\",\n [Proto.TriggerFailureReason.INTERNAL_ERROR]: \"internal_error\",\n } satisfies ProtoToOutput<Proto.TriggerFailureReason, TriggerFailureReasonLabelValue>,\n} as const;\n\nexport const TriggerDirectionCodec = {\n inputToProto: {\n above: ProtoOrders.TriggerDirection.ABOVE,\n below: ProtoOrders.TriggerDirection.BELOW,\n } satisfies InputToProto<TriggerDirectionValue, ProtoOrders.TriggerDirection>,\n protoToOutput: {\n [ProtoOrders.TriggerDirection.TRIGGER_DIRECTION_UNSPECIFIED]: \"unspecified\",\n [ProtoOrders.TriggerDirection.ABOVE]: \"above\",\n [ProtoOrders.TriggerDirection.BELOW]: \"below\",\n } satisfies ProtoToOutput<ProtoOrders.TriggerDirection, TriggerDirectionValue>,\n} as const;\n\nexport const LadderDistributionCodec = {\n inputToProto: {\n linear: Proto.LadderDistribution.LINEAR,\n } satisfies InputToProto<LadderDistributionValue, Proto.LadderDistribution>,\n protoToOutput: {\n [Proto.LadderDistribution.LADDER_DISTRIBUTION_UNSPECIFIED]: \"unspecified\",\n [Proto.LadderDistribution.LINEAR]: \"linear\",\n [Proto.LadderDistribution.GEOMETRIC]: \"geometric\",\n [Proto.LadderDistribution.WEIGHTED_FAVORABLE]: \"weighted_favorable\",\n } satisfies ProtoToOutput<Proto.LadderDistribution, LadderDistributionLabelValue>,\n} as const;\n"],"mappings":";;;;AA0BA,MAAa,sBAAsB;CAC/B;CACA;CACA;CACA;CACA;AACJ;AAMA,MAAa,+BAA+B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAMA,MAAa,4BAA4B;CACrC;CACA;CACA;CACA;CACA;AACJ;AAwEA,MAAa,mBAAmB;CAC5B,cAAc;EACV,WAAA;EACA,aAAA;EACA,eAAA;EACA,MAAA;EACA,QAAA;CACJ;CACA,eAAe;GACmC,IAAA;GACf,IAAA;GACE,IAAA;GACE,IAAA;GACT,IAAA;GACE,IAAA;CAChC;AACJ;AAEA,MAAa,qBAAqB;CAC9B,cAAc;EACV,SAAA;EACA,OAAA;EACA,SAAA;EACA,WAAA;EACA,WAAA;EACA,QAAA;EACA,QAAA;CACJ;CACA,eAAe;GAC+B,IAAA;GACJ,IAAA;GACF,IAAA;GACE,IAAA;GACE,IAAA;GACD,IAAA;GACF,IAAA;GACA,IAAA;CACzC;AACJ;AAEA,MAAa,wBAAwB;CACjC,cAAc;EACV,OAAA;EACA,UAAA;EACA,SAAA;EACA,QAAA;EACA,WAAA;CACJ;CACA,eAAe;GACiC,IAAA;GACN,IAAA;GACG,IAAA;GACD,IAAA;GACD,IAAA;GACG,IAAA;CAC9C;AACJ;AAEA,MAAa,2BAA2B,EACpC,eAAe;EAC8B,IAAA;EACC,IAAA;EACT,IAAA;EACoB,IAAA;EACJ,MAAA;EACL,MAAA;AAChD,EACJ;AAEA,MAAa,4BAA4B,EACrC,eAAe;EAC+B,IAAA;EACG,IAAA;EACD,IAAA;EACD,IAAA;EACH,IAAA;EACS,IAAA;EACR,IAAA;EACS,IAAA;EACN,IAAA;EACF,IAAA;EACI,KAAA;EACF,KAAA;EACE,KAAA;EACI,KAAA;EACC,KAAA;EACA,KAAA;EACV,KAAA;EACgB,KAAA;EACL,KAAA;EACG,KAAA;EACb,KAAA;EACC,KAAA;EACH,KAAA;EACK,KAAA;EACW,KAAA;EACL,KAAA;EACC,KAAA;EAEhD,KAAA;EACoD,KAAA;EACI,KAAA;EACP,KAAA;EAEjD,KAAA;EACuC,KAAA;EACU,KAAA;EACJ,KAAA;EACC,KAAA;EACG,KAAA;EACD,KAAA;EACD,KAAA;EACD,MAAA;EACL,MAAA;AACjD,EACJ;AAEA,MAAa,wBAAwB;CACjC,cAAc;EACV,OAAA;EACA,OAAA;CACJ;CACA,eAAe;GACmD,IAAA;GACxB,IAAA;GACA,IAAA;CAC1C;AACJ;AAEA,MAAa,0BAA0B;CACnC,cAAc,EACV,QAAA,EACJ;CACA,eAAe;GACiD,IAAA;GACzB,IAAA;GACG,IAAA;GACS,IAAA;CACnD;AACJ"}
|
package/package.json
CHANGED