@polyester/sdk 0.19.1 → 0.19.3
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 +12 -0
- package/dist/gen/triggers/v1/triggers_pb.js +1 -1
- package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
- package/dist/realtime/client.d.ts.map +1 -1
- package/dist/realtime/client.js +11 -4
- package/dist/realtime/client.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +42 -42
- package/dist/services/orders/orders-input.schemas.d.ts +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +6 -6
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +5 -5
- package/dist/services/trailing-oneof-inputs.js +3 -2
- package/dist/services/trailing-oneof-inputs.js.map +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +15 -15
- package/package.json +1 -1
|
@@ -243,7 +243,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
243
243
|
attachedRisk: {
|
|
244
244
|
takeProfit: {
|
|
245
245
|
state: {
|
|
246
|
-
status: "unspecified" | "
|
|
246
|
+
status: "unspecified" | "completed" | "failed" | "created" | "armed" | "running" | "paused" | "canceled" | "not_configured";
|
|
247
247
|
armedTs: number | undefined;
|
|
248
248
|
armedTsNs: string | undefined;
|
|
249
249
|
terminalTs: number | undefined;
|
|
@@ -262,7 +262,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
262
262
|
} | undefined;
|
|
263
263
|
stopLoss: {
|
|
264
264
|
state: {
|
|
265
|
-
status: "unspecified" | "
|
|
265
|
+
status: "unspecified" | "completed" | "failed" | "created" | "armed" | "running" | "paused" | "canceled" | "not_configured";
|
|
266
266
|
armedTs: number | undefined;
|
|
267
267
|
armedTsNs: string | undefined;
|
|
268
268
|
terminalTs: number | undefined;
|
|
@@ -281,7 +281,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
281
281
|
} | undefined;
|
|
282
282
|
trailingStop: {
|
|
283
283
|
state: {
|
|
284
|
-
status: "unspecified" | "
|
|
284
|
+
status: "unspecified" | "completed" | "failed" | "created" | "armed" | "running" | "paused" | "canceled" | "not_configured";
|
|
285
285
|
armedTs: number | undefined;
|
|
286
286
|
armedTsNs: string | undefined;
|
|
287
287
|
terminalTs: number | undefined;
|
|
@@ -586,7 +586,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
586
586
|
attachedRisk: {
|
|
587
587
|
takeProfit: {
|
|
588
588
|
state: {
|
|
589
|
-
status: "unspecified" | "
|
|
589
|
+
status: "unspecified" | "completed" | "failed" | "created" | "armed" | "running" | "paused" | "canceled" | "not_configured";
|
|
590
590
|
armedTs: number | undefined;
|
|
591
591
|
armedTsNs: string | undefined;
|
|
592
592
|
terminalTs: number | undefined;
|
|
@@ -605,7 +605,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
605
605
|
} | undefined;
|
|
606
606
|
stopLoss: {
|
|
607
607
|
state: {
|
|
608
|
-
status: "unspecified" | "
|
|
608
|
+
status: "unspecified" | "completed" | "failed" | "created" | "armed" | "running" | "paused" | "canceled" | "not_configured";
|
|
609
609
|
armedTs: number | undefined;
|
|
610
610
|
armedTsNs: string | undefined;
|
|
611
611
|
terminalTs: number | undefined;
|
|
@@ -624,7 +624,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
624
624
|
} | undefined;
|
|
625
625
|
trailingStop: {
|
|
626
626
|
state: {
|
|
627
|
-
status: "unspecified" | "
|
|
627
|
+
status: "unspecified" | "completed" | "failed" | "created" | "armed" | "running" | "paused" | "canceled" | "not_configured";
|
|
628
628
|
armedTs: number | undefined;
|
|
629
629
|
armedTsNs: string | undefined;
|
|
630
630
|
terminalTs: number | undefined;
|
|
@@ -212,7 +212,7 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
212
212
|
readonly granteeAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
213
213
|
readonly inviterAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
214
214
|
readonly role: v.SchemaWithPipe<readonly [v.EnumSchema<typeof SubaccountRole$1, undefined>, v.TransformAction<SubaccountRole$1, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
215
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof SubaccountInviteStatus$1, undefined>, v.TransformAction<SubaccountInviteStatus$1, "unspecified" | "pending" | "
|
|
215
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof SubaccountInviteStatus$1, undefined>, v.TransformAction<SubaccountInviteStatus$1, "unspecified" | "pending" | "accepted" | "declined" | "cancelled">]>;
|
|
216
216
|
readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
217
217
|
readonly seconds: v.BigintSchema<undefined>;
|
|
218
218
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -239,7 +239,7 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
239
239
|
granteeAccountId: string;
|
|
240
240
|
inviterAccountId: string;
|
|
241
241
|
role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
|
|
242
|
-
status: "unspecified" | "pending" | "
|
|
242
|
+
status: "unspecified" | "pending" | "accepted" | "declined" | "cancelled";
|
|
243
243
|
createdAt?: number | undefined;
|
|
244
244
|
respondedAt?: number | undefined;
|
|
245
245
|
granteeUsername: string;
|
|
@@ -257,7 +257,7 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
257
257
|
granteeAccountId: string;
|
|
258
258
|
inviterAccountId: string;
|
|
259
259
|
role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
|
|
260
|
-
status: "unspecified" | "pending" | "
|
|
260
|
+
status: "unspecified" | "pending" | "accepted" | "declined" | "cancelled";
|
|
261
261
|
createdAt?: number | undefined;
|
|
262
262
|
respondedAt?: number | undefined;
|
|
263
263
|
granteeUsername: string;
|
|
@@ -279,8 +279,8 @@ declare const SubaccountActivityEventSchema: v.ObjectSchema<{
|
|
|
279
279
|
seconds: bigint;
|
|
280
280
|
nanos: number;
|
|
281
281
|
} | undefined, number | undefined>]>;
|
|
282
|
-
readonly entityKind: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEntityKind, undefined>, v.TransformAction<ActivityEntityKind, "unspecified" | "api_key" | "account" | "subaccount" | "destination" | "session" | "
|
|
283
|
-
readonly eventAction: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEventAction, undefined>, v.TransformAction<ActivityEventAction, "unspecified" | "enabled" | "disabled" | "
|
|
282
|
+
readonly entityKind: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEntityKind, undefined>, v.TransformAction<ActivityEntityKind, "unspecified" | "api_key" | "account" | "subaccount" | "destination" | "session" | "member" | "policy" | "invite" | "security">]>;
|
|
283
|
+
readonly eventAction: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEventAction, undefined>, v.TransformAction<ActivityEventAction, "unspecified" | "enabled" | "disabled" | "revoked" | "failed" | "created" | "updated" | "deleted" | "removed" | "role_set" | "received" | "replied" | "blocked" | "hold_placed" | "hold_released">]>;
|
|
284
284
|
readonly source: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEventSource, undefined>, v.TransformAction<ActivityEventSource, "unspecified" | "web" | "mobile" | "api">]>;
|
|
285
285
|
readonly ip: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
286
286
|
readonly userAgent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { parseOptionalPositiveIntLike } from "../utils/numbers.js";
|
|
2
|
-
import
|
|
2
|
+
import "../shared/wire-bounds.js";
|
|
3
3
|
import { CatalogConversionError } from "../catalogs/types.js";
|
|
4
4
|
import { positiveDecimalInputToScaled } from "../shared/decimal-surface.js";
|
|
5
5
|
//#region src/services/trailing-oneof-inputs.ts
|
|
6
6
|
/** Product-wide cap for bps slippage inputs (market IOC, attached and standalone trailing stops). */
|
|
7
7
|
const MAX_SLIPPAGE_BPS = 1e4;
|
|
8
|
+
const MAX_TRAILING_DISTANCE_BPS = 1e4;
|
|
8
9
|
function parseTrailingDistanceInput(scales, distance, fieldName) {
|
|
9
10
|
if (distance.kind === "none") return {
|
|
10
11
|
case: void 0,
|
|
@@ -15,7 +16,7 @@ function parseTrailingDistanceInput(scales, distance, fieldName) {
|
|
|
15
16
|
value: positiveDecimalInputToScaled(`${fieldName}.distance`, distance.distance, scales.price())
|
|
16
17
|
};
|
|
17
18
|
const bps = parseOptionalPositiveIntLike(distance.bps);
|
|
18
|
-
if (bps === void 0 || bps >
|
|
19
|
+
if (bps === void 0 || bps > MAX_TRAILING_DISTANCE_BPS) throw new CatalogConversionError(`${fieldName}.bps`, `${fieldName}Bps must be between 1 and ${MAX_TRAILING_DISTANCE_BPS}`);
|
|
19
20
|
return {
|
|
20
21
|
case: "trailingDistanceBps",
|
|
21
22
|
value: bps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trailing-oneof-inputs.js","names":[],"sources":["../../src/services/trailing-oneof-inputs.ts"],"sourcesContent":["import { positiveDecimalInputToScaled, type SdkScales } from \"../shared/decimal-surface.js\";\nimport { CatalogConversionError } from \"../catalogs/types.js\";\nimport { parseOptionalPositiveIntLike } from \"../utils/numbers.js\";\nimport { PROTOBUF_INT32_MAX } from \"../shared/wire-bounds.js\";\n\ntype PositiveIntLikeInput = string | number;\n\n/** Product-wide cap for bps slippage inputs (market IOC, attached and standalone trailing stops). */\nexport const MAX_SLIPPAGE_BPS = 10_000;\n\n/**\n * Trailing distance and slippage inputs: absolute price distances and\n * slippages are decimal price strings (e.g. \"0.50\"), converted to wire ticks\n * via the price scale; basis points are integers.\n */\nexport type TrailingDistanceInput =\n | { kind: \"distance\"; distance: string }\n | { kind: \"bps\"; bps: PositiveIntLikeInput }\n | { kind: \"none\" };\n\nexport type SlippageInput =\n | { kind: \"slippage\"; slippage: string }\n | { kind: \"bps\"; bps: PositiveIntLikeInput }\n | { kind: \"none\" };\n\ntype UnsetOneof = { case: undefined; value: undefined };\n\ntype TrailingDistanceOneof =\n | { case: \"trailingDistanceTicks\"; value: bigint }\n | { case: \"trailingDistanceBps\"; value: number }\n | UnsetOneof;\n\ntype SlippageOneof<TicksCase extends string, BpsCase extends string> =\n | { case: TicksCase; value: number }\n | { case: BpsCase; value: number }\n | UnsetOneof;\n\ntype SlippageOptions<TicksCase extends string, BpsCase extends string> = {\n fieldName: string;\n ticksCase: TicksCase;\n bpsCase: BpsCase;\n maxBps?: number;\n};\n\nexport function parseTrailingDistanceInput(\n scales: SdkScales,\n distance: TrailingDistanceInput,\n fieldName: string,\n): TrailingDistanceOneof {\n if (distance.kind === \"none\") {\n return { case: undefined, value: undefined };\n }\n if (distance.kind === \"distance\") {\n return {\n case: \"trailingDistanceTicks\",\n value: positiveDecimalInputToScaled(\n `${fieldName}.distance`,\n distance.distance,\n scales.price(),\n ),\n };\n }\n\n const bps = parseOptionalPositiveIntLike(distance.bps);\n if (bps === undefined || bps >
|
|
1
|
+
{"version":3,"file":"trailing-oneof-inputs.js","names":[],"sources":["../../src/services/trailing-oneof-inputs.ts"],"sourcesContent":["import { positiveDecimalInputToScaled, type SdkScales } from \"../shared/decimal-surface.js\";\nimport { CatalogConversionError } from \"../catalogs/types.js\";\nimport { parseOptionalPositiveIntLike } from \"../utils/numbers.js\";\nimport { PROTOBUF_INT32_MAX } from \"../shared/wire-bounds.js\";\n\ntype PositiveIntLikeInput = string | number;\n\n/** Product-wide cap for bps slippage inputs (market IOC, attached and standalone trailing stops). */\nexport const MAX_SLIPPAGE_BPS = 10_000;\n\nconst MAX_TRAILING_DISTANCE_BPS = 10_000;\n\n/**\n * Trailing distance and slippage inputs: absolute price distances and\n * slippages are decimal price strings (e.g. \"0.50\"), converted to wire ticks\n * via the price scale; basis points are integers.\n */\nexport type TrailingDistanceInput =\n | { kind: \"distance\"; distance: string }\n | { kind: \"bps\"; bps: PositiveIntLikeInput }\n | { kind: \"none\" };\n\nexport type SlippageInput =\n | { kind: \"slippage\"; slippage: string }\n | { kind: \"bps\"; bps: PositiveIntLikeInput }\n | { kind: \"none\" };\n\ntype UnsetOneof = { case: undefined; value: undefined };\n\ntype TrailingDistanceOneof =\n | { case: \"trailingDistanceTicks\"; value: bigint }\n | { case: \"trailingDistanceBps\"; value: number }\n | UnsetOneof;\n\ntype SlippageOneof<TicksCase extends string, BpsCase extends string> =\n | { case: TicksCase; value: number }\n | { case: BpsCase; value: number }\n | UnsetOneof;\n\ntype SlippageOptions<TicksCase extends string, BpsCase extends string> = {\n fieldName: string;\n ticksCase: TicksCase;\n bpsCase: BpsCase;\n maxBps?: number;\n};\n\nexport function parseTrailingDistanceInput(\n scales: SdkScales,\n distance: TrailingDistanceInput,\n fieldName: string,\n): TrailingDistanceOneof {\n if (distance.kind === \"none\") {\n return { case: undefined, value: undefined };\n }\n if (distance.kind === \"distance\") {\n return {\n case: \"trailingDistanceTicks\",\n value: positiveDecimalInputToScaled(\n `${fieldName}.distance`,\n distance.distance,\n scales.price(),\n ),\n };\n }\n\n const bps = parseOptionalPositiveIntLike(distance.bps);\n if (bps === undefined || bps > MAX_TRAILING_DISTANCE_BPS) {\n throw new CatalogConversionError(\n `${fieldName}.bps`,\n `${fieldName}Bps must be between 1 and ${MAX_TRAILING_DISTANCE_BPS}`,\n );\n }\n return { case: \"trailingDistanceBps\", value: bps };\n}\n\nexport function parseSlippageInput<const TicksCase extends string, const BpsCase extends string>(\n scales: SdkScales,\n slippage: SlippageInput | undefined,\n options: SlippageOptions<TicksCase, BpsCase>,\n): SlippageOneof<TicksCase, BpsCase> {\n if (!slippage || slippage.kind === \"none\") {\n return { case: undefined, value: undefined };\n }\n if (slippage.kind === \"slippage\") {\n const ticks = positiveDecimalInputToScaled(\n `${options.fieldName}.slippage`,\n slippage.slippage,\n scales.price(),\n );\n if (ticks > PROTOBUF_INT32_MAX) {\n throw new CatalogConversionError(\n `${options.fieldName}.slippage`,\n `${options.fieldName}.slippage exceeds the maximum supported price distance: ${slippage.slippage}`,\n );\n }\n return { case: options.ticksCase, value: Number(ticks) };\n }\n\n const bps = parseOptionalPositiveIntLike(slippage.bps);\n if (bps === undefined || bps <= 0 || exceedsMax(bps, options.maxBps)) {\n throw new CatalogConversionError(\n `${options.fieldName}.bps`,\n `${options.fieldName}Bps must be ${\n options.maxBps === undefined\n ? \"a positive integer\"\n : `between 1 and ${options.maxBps}`\n }`,\n );\n }\n return { case: options.bpsCase, value: bps };\n}\n\nfunction exceedsMax(value: number, max: number | undefined): boolean {\n return max !== undefined && value > max;\n}\n"],"mappings":";;;;;;AAQA,MAAa,mBAAmB;AAEhC,MAAM,4BAA4B;AAoClC,SAAgB,2BACZ,QACA,UACA,WACqB;CACrB,IAAI,SAAS,SAAS,QAClB,OAAO;EAAE,MAAM,KAAA;EAAW,OAAO,KAAA;CAAU;CAE/C,IAAI,SAAS,SAAS,YAClB,OAAO;EACH,MAAM;EACN,OAAO,6BACH,GAAG,UAAU,YACb,SAAS,UACT,OAAO,MAAM,CACjB;CACJ;CAGJ,MAAM,MAAM,6BAA6B,SAAS,GAAG;CACrD,IAAI,QAAQ,KAAA,KAAa,MAAM,2BAC3B,MAAM,IAAI,uBACN,GAAG,UAAU,OACb,GAAG,UAAU,4BAA4B,2BAC7C;CAEJ,OAAO;EAAE,MAAM;EAAuB,OAAO;CAAI;AACrD;AAEA,SAAgB,mBACZ,QACA,UACA,SACiC;CACjC,IAAI,CAAC,YAAY,SAAS,SAAS,QAC/B,OAAO;EAAE,MAAM,KAAA;EAAW,OAAO,KAAA;CAAU;CAE/C,IAAI,SAAS,SAAS,YAAY;EAC9B,MAAM,QAAQ,6BACV,GAAG,QAAQ,UAAU,YACrB,SAAS,UACT,OAAO,MAAM,CACjB;EACA,IAAI,QAAA,aACA,MAAM,IAAI,uBACN,GAAG,QAAQ,UAAU,YACrB,GAAG,QAAQ,UAAU,0DAA0D,SAAS,UAC5F;EAEJ,OAAO;GAAE,MAAM,QAAQ;GAAW,OAAO,OAAO,KAAK;EAAE;CAC3D;CAEA,MAAM,MAAM,6BAA6B,SAAS,GAAG;CACrD,IAAI,QAAQ,KAAA,KAAa,OAAO,KAAK,WAAW,KAAK,QAAQ,MAAM,GAC/D,MAAM,IAAI,uBACN,GAAG,QAAQ,UAAU,OACrB,GAAG,QAAQ,UAAU,cACjB,QAAQ,WAAW,KAAA,IACb,uBACA,iBAAiB,QAAQ,UAEvC;CAEJ,OAAO;EAAE,MAAM,QAAQ;EAAS,OAAO;CAAI;AAC/C;AAEA,SAAS,WAAW,OAAe,KAAkC;CACjE,OAAO,QAAQ,KAAA,KAAa,QAAQ;AACxC"}
|
|
@@ -809,7 +809,7 @@ type CreateTriggerInput = v.InferInput<ReturnType<typeof createCreateTriggerInpu
|
|
|
809
809
|
declare const ListTriggersInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
810
810
|
readonly parentOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>;
|
|
811
811
|
readonly symbolId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, undefined>;
|
|
812
|
-
readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("
|
|
812
|
+
readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
|
|
813
813
|
readonly triggerType: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["stop_loss", "take_profit", "trailing_stop", "twap", "ladder"], undefined>, undefined>, v.TransformAction<"twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop" | undefined, TriggerType>]>;
|
|
814
814
|
readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 1000, undefined>]>, 50>;
|
|
815
815
|
readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
|
|
@@ -31,62 +31,62 @@ declare const CreateTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSche
|
|
|
31
31
|
type CreateTriggerResult = v.InferOutput<typeof CreateTriggerResultSchema>;
|
|
32
32
|
declare const CancelTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
33
33
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
34
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "
|
|
34
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused">]>;
|
|
35
35
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
36
36
|
}, undefined>, v.TransformAction<{
|
|
37
37
|
triggerId: string;
|
|
38
|
-
status: "unspecified" | "
|
|
38
|
+
status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
|
|
39
39
|
tsNs: bigint;
|
|
40
40
|
}, {
|
|
41
41
|
ts: number;
|
|
42
42
|
tsNs: string;
|
|
43
43
|
triggerId: string;
|
|
44
|
-
status: "unspecified" | "
|
|
44
|
+
status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
|
|
45
45
|
}>]>;
|
|
46
46
|
type CancelTriggerResult = v.InferOutput<typeof CancelTriggerResultSchema>;
|
|
47
47
|
declare const ModifyTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
48
48
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
49
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "
|
|
49
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused">]>;
|
|
50
50
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
51
51
|
}, undefined>, v.TransformAction<{
|
|
52
52
|
triggerId: string;
|
|
53
|
-
status: "unspecified" | "
|
|
53
|
+
status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
|
|
54
54
|
tsNs: bigint;
|
|
55
55
|
}, {
|
|
56
56
|
ts: number;
|
|
57
57
|
tsNs: string;
|
|
58
58
|
triggerId: string;
|
|
59
|
-
status: "unspecified" | "
|
|
59
|
+
status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
|
|
60
60
|
}>]>;
|
|
61
61
|
type ModifyTriggerResult = v.InferOutput<typeof ModifyTriggerResultSchema>;
|
|
62
62
|
declare const PauseTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
63
63
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
64
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "
|
|
64
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused">]>;
|
|
65
65
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
66
66
|
}, undefined>, v.TransformAction<{
|
|
67
67
|
triggerId: string;
|
|
68
|
-
status: "unspecified" | "
|
|
68
|
+
status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
|
|
69
69
|
tsNs: bigint;
|
|
70
70
|
}, {
|
|
71
71
|
ts: number;
|
|
72
72
|
tsNs: string;
|
|
73
73
|
triggerId: string;
|
|
74
|
-
status: "unspecified" | "
|
|
74
|
+
status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
|
|
75
75
|
}>]>;
|
|
76
76
|
type PauseTriggerResult = v.InferOutput<typeof PauseTriggerResultSchema>;
|
|
77
77
|
declare const ResumeTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
78
78
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
79
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "
|
|
79
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused">]>;
|
|
80
80
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
81
81
|
}, undefined>, v.TransformAction<{
|
|
82
82
|
triggerId: string;
|
|
83
|
-
status: "unspecified" | "
|
|
83
|
+
status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
|
|
84
84
|
tsNs: bigint;
|
|
85
85
|
}, {
|
|
86
86
|
ts: number;
|
|
87
87
|
tsNs: string;
|
|
88
88
|
triggerId: string;
|
|
89
|
-
status: "unspecified" | "
|
|
89
|
+
status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
|
|
90
90
|
}>]>;
|
|
91
91
|
type ResumeTriggerResult = v.InferOutput<typeof ResumeTriggerResultSchema>;
|
|
92
92
|
type StopDetailsOutput = {
|
|
@@ -528,7 +528,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
528
528
|
triggerId: string;
|
|
529
529
|
subaccountId: string;
|
|
530
530
|
symbolId: number;
|
|
531
|
-
status: "unspecified" | "
|
|
531
|
+
status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
|
|
532
532
|
parentOrderId: string | undefined;
|
|
533
533
|
qty: string;
|
|
534
534
|
feeAsset: "unspecified" | "quote" | "base";
|
|
@@ -669,7 +669,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
669
669
|
triggerId: string;
|
|
670
670
|
subaccountId: string;
|
|
671
671
|
symbolId: number;
|
|
672
|
-
status: "unspecified" | "
|
|
672
|
+
status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
|
|
673
673
|
parentOrderId: string | undefined;
|
|
674
674
|
qty: string;
|
|
675
675
|
feeAsset: "unspecified" | "quote" | "base";
|
|
@@ -810,7 +810,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
810
810
|
triggerId: string;
|
|
811
811
|
subaccountId: string;
|
|
812
812
|
symbolId: number;
|
|
813
|
-
status: "unspecified" | "
|
|
813
|
+
status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
|
|
814
814
|
parentOrderId: string | undefined;
|
|
815
815
|
qty: string;
|
|
816
816
|
feeAsset: "unspecified" | "quote" | "base";
|
package/package.json
CHANGED