@pear-protocol/types 0.0.15 → 0.0.17

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.
Files changed (66) hide show
  1. package/dist/auth/entities.d.ts +10 -1
  2. package/dist/auth/entities.js +4 -2
  3. package/dist/auth/response.d.ts +13 -12
  4. package/dist/auth/response.js +6 -2
  5. package/dist/bundle.d.ts +1 -0
  6. package/dist/bundle.js +1 -0
  7. package/dist/common/address.d.ts +3 -0
  8. package/dist/common/address.js +5 -0
  9. package/dist/common/hex-string.d.ts +3 -0
  10. package/dist/common/hex-string.js +5 -0
  11. package/dist/common/refinement.d.ts +1 -0
  12. package/dist/common/refinement.js +9 -1
  13. package/dist/common/request.js +1 -1
  14. package/dist/common/schema.d.ts +1 -1
  15. package/dist/common/schema.js +1 -1
  16. package/dist/connector/index.d.ts +4 -1
  17. package/dist/execution/entities.d.ts +6 -6
  18. package/dist/execution/responses.d.ts +2 -2
  19. package/dist/fill/entities.d.ts +20 -2
  20. package/dist/fill/entities.js +30 -5
  21. package/dist/fill/queries.d.ts +1 -0
  22. package/dist/fill/queries.js +3 -3
  23. package/dist/fill/responses.d.ts +44 -4
  24. package/dist/fill/responses.js +10 -1
  25. package/dist/instrument/responses.d.ts +4 -0
  26. package/dist/instrument/responses.js +5 -2
  27. package/dist/misc/index.d.ts +3 -1
  28. package/dist/misc/index.js +2 -1
  29. package/dist/misc/payloads.d.ts +33 -0
  30. package/dist/misc/payloads.js +31 -0
  31. package/dist/misc/responses.d.ts +26 -0
  32. package/dist/misc/responses.js +24 -0
  33. package/dist/position/entities.d.ts +5 -5
  34. package/dist/position/responses.d.ts +32 -2
  35. package/dist/position/responses.js +13 -1
  36. package/dist/schedule/entities.d.ts +82 -16
  37. package/dist/schedule/entities.js +5 -5
  38. package/dist/schedule/payloads.d.ts +4 -4
  39. package/dist/schedule/payloads.js +7 -7
  40. package/dist/schedule/responses.d.ts +66 -14
  41. package/dist/statistics/entities.d.ts +10 -3
  42. package/dist/statistics/entities.js +9 -3
  43. package/dist/statistics/queries.d.ts +26 -3
  44. package/dist/statistics/queries.js +11 -2
  45. package/dist/statistics/responses.d.ts +12 -3
  46. package/dist/statistics/responses.js +7 -4
  47. package/dist/sync/index.d.ts +2 -0
  48. package/dist/sync/index.js +2 -0
  49. package/dist/sync/payloads.d.ts +279 -0
  50. package/dist/sync/payloads.js +78 -0
  51. package/dist/sync/responses.d.ts +10 -0
  52. package/dist/sync/responses.js +11 -0
  53. package/dist/trade/payloads.d.ts +14 -4
  54. package/dist/trade/responses.d.ts +8 -8
  55. package/dist/trade-accounts/entities.d.ts +6 -0
  56. package/dist/trade-accounts/entities.js +4 -1
  57. package/dist/trade-accounts/payloads.d.ts +46 -10
  58. package/dist/trade-accounts/payloads.js +30 -6
  59. package/dist/trade-accounts/response.d.ts +10 -0
  60. package/dist/trade-accounts/response.js +9 -1
  61. package/dist/trigger/entities/index.d.ts +216 -46
  62. package/dist/trigger/entities/index.js +35 -9
  63. package/dist/trigger/payloads/index.d.ts +21 -6
  64. package/dist/trigger/payloads/index.js +24 -7
  65. package/dist/trigger/responses.d.ts +128 -28
  66. package/package.json +2 -2
@@ -208,10 +208,15 @@ export declare const CreateTriggerMarketClose: z.ZodObject<{
208
208
  }, z.core.$strip>;
209
209
  }, z.core.$strip>], "type">;
210
210
  positionId: z.ZodUUID;
211
- bracketType: z.ZodOptional<z.ZodEnum<{
211
+ bracketType: z.ZodEnum<{
212
212
  STOP_LOSS: "STOP_LOSS";
213
213
  TAKE_PROFIT: "TAKE_PROFIT";
214
- }>>;
214
+ NONE: "NONE";
215
+ }>;
216
+ trailing: z.ZodOptional<z.ZodObject<{
217
+ deltaValue: z.ZodNumber;
218
+ activationValue: z.ZodNumber;
219
+ }, z.core.$strip>>;
215
220
  }, z.core.$strip>;
216
221
  export declare const AttachTriggerMarketClose: z.ZodObject<{
217
222
  intent: z.ZodLiteral<"CLOSE">;
@@ -256,10 +261,15 @@ export declare const AttachTriggerMarketClose: z.ZodObject<{
256
261
  threshold_bps: z.ZodNumber;
257
262
  }, z.core.$strip>;
258
263
  }, z.core.$strip>], "type">;
259
- bracketType: z.ZodOptional<z.ZodEnum<{
264
+ bracketType: z.ZodEnum<{
260
265
  STOP_LOSS: "STOP_LOSS";
261
266
  TAKE_PROFIT: "TAKE_PROFIT";
262
- }>>;
267
+ NONE: "NONE";
268
+ }>;
269
+ trailing: z.ZodOptional<z.ZodObject<{
270
+ deltaValue: z.ZodNumber;
271
+ activationValue: z.ZodNumber;
272
+ }, z.core.$strip>>;
263
273
  }, z.core.$strip>;
264
274
  export declare const CreateTriggerOpen: z.ZodDiscriminatedUnion<[z.ZodObject<{
265
275
  intent: z.ZodLiteral<"OPEN">;
@@ -470,10 +480,15 @@ export declare const CreateTriggerClose: z.ZodDiscriminatedUnion<[z.ZodObject<{
470
480
  }, z.core.$strip>;
471
481
  }, z.core.$strip>], "type">;
472
482
  positionId: z.ZodUUID;
473
- bracketType: z.ZodOptional<z.ZodEnum<{
483
+ bracketType: z.ZodEnum<{
474
484
  STOP_LOSS: "STOP_LOSS";
475
485
  TAKE_PROFIT: "TAKE_PROFIT";
476
- }>>;
486
+ NONE: "NONE";
487
+ }>;
488
+ trailing: z.ZodOptional<z.ZodObject<{
489
+ deltaValue: z.ZodNumber;
490
+ activationValue: z.ZodNumber;
491
+ }, z.core.$strip>>;
477
492
  }, z.core.$strip>], "type">;
478
493
  export type CreateTriggerMarketOpen = z.output<typeof CreateTriggerMarketOpen>;
479
494
  export type CreateTriggerMarketClose = z.output<typeof CreateTriggerMarketClose>;
@@ -1,9 +1,18 @@
1
1
  import { z } from 'zod';
2
2
  import { RefineMinimumOneSymbol, RefineUniqueSymbols } from '../../common/refinement';
3
3
  import { TradeLegPostOnly } from '../../common/trade-legs';
4
- import { BracketType } from '../entities';
4
+ import { BracketType, Trailing } from '../entities';
5
5
  import { CreateTriggerConditionOpen, CreateTriggerConditionClose, CreateTriggerConditionAttach } from './conditions';
6
6
 
7
+ const RefineTrailingRequiresBracket = (value, context) => {
8
+ if (value.trailing !== void 0 && value.bracketType === "NONE") {
9
+ context.addIssue({
10
+ code: "custom",
11
+ message: "bracketType must be STOP_LOSS or TAKE_PROFIT when trailing is provided",
12
+ path: ["bracketType"]
13
+ });
14
+ }
15
+ };
7
16
  const CreateTriggerMarketOpen = z.object({
8
17
  intent: z.literal("OPEN"),
9
18
  type: z.literal("MARKET"),
@@ -34,10 +43,14 @@ const CreateTriggerMarketClose = z.object({
34
43
  */
35
44
  positionId: z.uuid(),
36
45
  /**
37
- * Optional: bracket type (stop loss / take profit)
46
+ * Bracket type (stop loss / take profit / none)
38
47
  */
39
- bracketType: BracketType.optional()
40
- });
48
+ bracketType: BracketType,
49
+ /**
50
+ * Optional: trailing configuration
51
+ */
52
+ trailing: Trailing.optional()
53
+ }).superRefine(RefineTrailingRequiresBracket);
41
54
  const AttachTriggerMarketClose = z.object({
42
55
  intent: z.literal("CLOSE"),
43
56
  type: z.literal("MARKET"),
@@ -46,10 +59,14 @@ const AttachTriggerMarketClose = z.object({
46
59
  */
47
60
  condition: CreateTriggerConditionAttach,
48
61
  /**
49
- * Optional: bracket type (stop loss / take profit)
62
+ * Bracket type (stop loss / take profit / none)
50
63
  */
51
- bracketType: BracketType.optional()
52
- });
64
+ bracketType: BracketType,
65
+ /**
66
+ * Optional: trailing configuration
67
+ */
68
+ trailing: Trailing.optional()
69
+ }).superRefine(RefineTrailingRequiresBracket);
53
70
  const CreateTriggerOpen = z.discriminatedUnion("type", [CreateTriggerMarketOpen]);
54
71
  const CreateTriggerClose = z.discriminatedUnion("type", [CreateTriggerMarketClose]);
55
72
 
@@ -23,10 +23,17 @@ export declare const TriggerListResponse: z.ZodObject<{
23
23
  USER: "USER";
24
24
  POSITION_CLOSED: "POSITION_CLOSED";
25
25
  SYSTEM: "SYSTEM";
26
+ POSITION_NETTED: "POSITION_NETTED";
26
27
  }>>;
27
28
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
28
29
  id: z.ZodUUID;
29
- cloid: z.ZodOptional<z.ZodUUID>;
30
+ cloid: z.ZodOptional<z.ZodString>;
31
+ exchangeFillId: z.ZodOptional<z.ZodString>;
32
+ status: z.ZodEnum<{
33
+ PROVISIONAL: "PROVISIONAL";
34
+ CONFIRMED: "CONFIRMED";
35
+ RECONCILED: "RECONCILED";
36
+ }>;
30
37
  tradeAccountId: z.ZodUUID;
31
38
  symbol: z.ZodString;
32
39
  positionId: z.ZodUUID;
@@ -42,16 +49,23 @@ export declare const TriggerListResponse: z.ZodObject<{
42
49
  SELL: "SELL";
43
50
  }>;
44
51
  reduceOnly: z.ZodBoolean;
52
+ isExternal: z.ZodBoolean;
45
53
  quantity: z.ZodString;
46
54
  price: z.ZodString;
47
55
  usd: z.ZodString;
48
- fee: z.ZodOptional<z.ZodString>;
56
+ tradeFee: z.ZodOptional<z.ZodString>;
57
+ pearFee: z.ZodOptional<z.ZodString>;
49
58
  timestamp: z.ZodString;
59
+ original: z.ZodOptional<z.ZodObject<{
60
+ exchangeFillId: z.ZodString;
61
+ quantity: z.ZodString;
62
+ }, z.core.$strip>>;
50
63
  }, z.core.$strip>>>;
51
- bracketType: z.ZodOptional<z.ZodEnum<{
64
+ bracketType: z.ZodEnum<{
52
65
  STOP_LOSS: "STOP_LOSS";
53
66
  TAKE_PROFIT: "TAKE_PROFIT";
54
- }>>;
67
+ NONE: "NONE";
68
+ }>;
55
69
  createdAt: z.ZodString;
56
70
  updatedAt: z.ZodString;
57
71
  intent: z.ZodLiteral<"OPEN">;
@@ -171,10 +185,17 @@ export declare const TriggerListResponse: z.ZodObject<{
171
185
  USER: "USER";
172
186
  POSITION_CLOSED: "POSITION_CLOSED";
173
187
  SYSTEM: "SYSTEM";
188
+ POSITION_NETTED: "POSITION_NETTED";
174
189
  }>>;
175
190
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
176
191
  id: z.ZodUUID;
177
- cloid: z.ZodOptional<z.ZodUUID>;
192
+ cloid: z.ZodOptional<z.ZodString>;
193
+ exchangeFillId: z.ZodOptional<z.ZodString>;
194
+ status: z.ZodEnum<{
195
+ PROVISIONAL: "PROVISIONAL";
196
+ CONFIRMED: "CONFIRMED";
197
+ RECONCILED: "RECONCILED";
198
+ }>;
178
199
  tradeAccountId: z.ZodUUID;
179
200
  symbol: z.ZodString;
180
201
  positionId: z.ZodUUID;
@@ -190,16 +211,23 @@ export declare const TriggerListResponse: z.ZodObject<{
190
211
  SELL: "SELL";
191
212
  }>;
192
213
  reduceOnly: z.ZodBoolean;
214
+ isExternal: z.ZodBoolean;
193
215
  quantity: z.ZodString;
194
216
  price: z.ZodString;
195
217
  usd: z.ZodString;
196
- fee: z.ZodOptional<z.ZodString>;
218
+ tradeFee: z.ZodOptional<z.ZodString>;
219
+ pearFee: z.ZodOptional<z.ZodString>;
197
220
  timestamp: z.ZodString;
221
+ original: z.ZodOptional<z.ZodObject<{
222
+ exchangeFillId: z.ZodString;
223
+ quantity: z.ZodString;
224
+ }, z.core.$strip>>;
198
225
  }, z.core.$strip>>>;
199
- bracketType: z.ZodOptional<z.ZodEnum<{
226
+ bracketType: z.ZodEnum<{
200
227
  STOP_LOSS: "STOP_LOSS";
201
228
  TAKE_PROFIT: "TAKE_PROFIT";
202
- }>>;
229
+ NONE: "NONE";
230
+ }>;
203
231
  createdAt: z.ZodString;
204
232
  updatedAt: z.ZodString;
205
233
  intent: z.ZodLiteral<"ADJUST">;
@@ -315,7 +343,7 @@ export declare const TriggerListResponse: z.ZodObject<{
315
343
  type: z.ZodLiteral<"MARKET">;
316
344
  position: z.ZodObject<{
317
345
  id: z.ZodUUID;
318
- initialExposure: z.ZodRecord<z.ZodString, z.ZodString>;
346
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
319
347
  }, z.core.$strip>;
320
348
  legs: z.ZodTuple<[z.ZodObject<{
321
349
  symbol: z.ZodString;
@@ -343,6 +371,10 @@ export declare const TriggerListResponse: z.ZodObject<{
343
371
  reduceOnly: z.ZodBoolean;
344
372
  }, z.core.$strip>>;
345
373
  }, z.core.$strip>;
374
+ trailing: z.ZodOptional<z.ZodObject<{
375
+ deltaValue: z.ZodNumber;
376
+ activationValue: z.ZodNumber;
377
+ }, z.core.$strip>>;
346
378
  }, z.core.$strip>, z.ZodObject<{
347
379
  id: z.ZodUUID;
348
380
  tradeAccountId: z.ZodUUID;
@@ -364,10 +396,17 @@ export declare const TriggerListResponse: z.ZodObject<{
364
396
  USER: "USER";
365
397
  POSITION_CLOSED: "POSITION_CLOSED";
366
398
  SYSTEM: "SYSTEM";
399
+ POSITION_NETTED: "POSITION_NETTED";
367
400
  }>>;
368
401
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
369
402
  id: z.ZodUUID;
370
- cloid: z.ZodOptional<z.ZodUUID>;
403
+ cloid: z.ZodOptional<z.ZodString>;
404
+ exchangeFillId: z.ZodOptional<z.ZodString>;
405
+ status: z.ZodEnum<{
406
+ PROVISIONAL: "PROVISIONAL";
407
+ CONFIRMED: "CONFIRMED";
408
+ RECONCILED: "RECONCILED";
409
+ }>;
371
410
  tradeAccountId: z.ZodUUID;
372
411
  symbol: z.ZodString;
373
412
  positionId: z.ZodUUID;
@@ -383,16 +422,23 @@ export declare const TriggerListResponse: z.ZodObject<{
383
422
  SELL: "SELL";
384
423
  }>;
385
424
  reduceOnly: z.ZodBoolean;
425
+ isExternal: z.ZodBoolean;
386
426
  quantity: z.ZodString;
387
427
  price: z.ZodString;
388
428
  usd: z.ZodString;
389
- fee: z.ZodOptional<z.ZodString>;
429
+ tradeFee: z.ZodOptional<z.ZodString>;
430
+ pearFee: z.ZodOptional<z.ZodString>;
390
431
  timestamp: z.ZodString;
432
+ original: z.ZodOptional<z.ZodObject<{
433
+ exchangeFillId: z.ZodString;
434
+ quantity: z.ZodString;
435
+ }, z.core.$strip>>;
391
436
  }, z.core.$strip>>>;
392
- bracketType: z.ZodOptional<z.ZodEnum<{
437
+ bracketType: z.ZodEnum<{
393
438
  STOP_LOSS: "STOP_LOSS";
394
439
  TAKE_PROFIT: "TAKE_PROFIT";
395
- }>>;
440
+ NONE: "NONE";
441
+ }>;
396
442
  createdAt: z.ZodString;
397
443
  updatedAt: z.ZodString;
398
444
  intent: z.ZodLiteral<"CLOSE">;
@@ -508,9 +554,13 @@ export declare const TriggerListResponse: z.ZodObject<{
508
554
  type: z.ZodLiteral<"MARKET">;
509
555
  position: z.ZodObject<{
510
556
  id: z.ZodUUID;
511
- initialExposure: z.ZodRecord<z.ZodString, z.ZodString>;
557
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
512
558
  }, z.core.$strip>;
513
559
  }, z.core.$strip>;
560
+ trailing: z.ZodOptional<z.ZodObject<{
561
+ deltaValue: z.ZodNumber;
562
+ activationValue: z.ZodNumber;
563
+ }, z.core.$strip>>;
514
564
  }, z.core.$strip>], "intent">], "type">>;
515
565
  }, z.core.$strip>;
516
566
  export type TriggerListResponse = z.output<typeof TriggerListResponse>;
@@ -536,10 +586,17 @@ export declare const CreateTriggerResponse: z.ZodObject<{
536
586
  USER: "USER";
537
587
  POSITION_CLOSED: "POSITION_CLOSED";
538
588
  SYSTEM: "SYSTEM";
589
+ POSITION_NETTED: "POSITION_NETTED";
539
590
  }>>;
540
591
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
541
592
  id: z.ZodUUID;
542
- cloid: z.ZodOptional<z.ZodUUID>;
593
+ cloid: z.ZodOptional<z.ZodString>;
594
+ exchangeFillId: z.ZodOptional<z.ZodString>;
595
+ status: z.ZodEnum<{
596
+ PROVISIONAL: "PROVISIONAL";
597
+ CONFIRMED: "CONFIRMED";
598
+ RECONCILED: "RECONCILED";
599
+ }>;
543
600
  tradeAccountId: z.ZodUUID;
544
601
  symbol: z.ZodString;
545
602
  positionId: z.ZodUUID;
@@ -555,16 +612,23 @@ export declare const CreateTriggerResponse: z.ZodObject<{
555
612
  SELL: "SELL";
556
613
  }>;
557
614
  reduceOnly: z.ZodBoolean;
615
+ isExternal: z.ZodBoolean;
558
616
  quantity: z.ZodString;
559
617
  price: z.ZodString;
560
618
  usd: z.ZodString;
561
- fee: z.ZodOptional<z.ZodString>;
619
+ tradeFee: z.ZodOptional<z.ZodString>;
620
+ pearFee: z.ZodOptional<z.ZodString>;
562
621
  timestamp: z.ZodString;
622
+ original: z.ZodOptional<z.ZodObject<{
623
+ exchangeFillId: z.ZodString;
624
+ quantity: z.ZodString;
625
+ }, z.core.$strip>>;
563
626
  }, z.core.$strip>>>;
564
- bracketType: z.ZodOptional<z.ZodEnum<{
627
+ bracketType: z.ZodEnum<{
565
628
  STOP_LOSS: "STOP_LOSS";
566
629
  TAKE_PROFIT: "TAKE_PROFIT";
567
- }>>;
630
+ NONE: "NONE";
631
+ }>;
568
632
  createdAt: z.ZodString;
569
633
  updatedAt: z.ZodString;
570
634
  intent: z.ZodLiteral<"OPEN">;
@@ -684,10 +748,17 @@ export declare const CreateTriggerResponse: z.ZodObject<{
684
748
  USER: "USER";
685
749
  POSITION_CLOSED: "POSITION_CLOSED";
686
750
  SYSTEM: "SYSTEM";
751
+ POSITION_NETTED: "POSITION_NETTED";
687
752
  }>>;
688
753
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
689
754
  id: z.ZodUUID;
690
- cloid: z.ZodOptional<z.ZodUUID>;
755
+ cloid: z.ZodOptional<z.ZodString>;
756
+ exchangeFillId: z.ZodOptional<z.ZodString>;
757
+ status: z.ZodEnum<{
758
+ PROVISIONAL: "PROVISIONAL";
759
+ CONFIRMED: "CONFIRMED";
760
+ RECONCILED: "RECONCILED";
761
+ }>;
691
762
  tradeAccountId: z.ZodUUID;
692
763
  symbol: z.ZodString;
693
764
  positionId: z.ZodUUID;
@@ -703,16 +774,23 @@ export declare const CreateTriggerResponse: z.ZodObject<{
703
774
  SELL: "SELL";
704
775
  }>;
705
776
  reduceOnly: z.ZodBoolean;
777
+ isExternal: z.ZodBoolean;
706
778
  quantity: z.ZodString;
707
779
  price: z.ZodString;
708
780
  usd: z.ZodString;
709
- fee: z.ZodOptional<z.ZodString>;
781
+ tradeFee: z.ZodOptional<z.ZodString>;
782
+ pearFee: z.ZodOptional<z.ZodString>;
710
783
  timestamp: z.ZodString;
784
+ original: z.ZodOptional<z.ZodObject<{
785
+ exchangeFillId: z.ZodString;
786
+ quantity: z.ZodString;
787
+ }, z.core.$strip>>;
711
788
  }, z.core.$strip>>>;
712
- bracketType: z.ZodOptional<z.ZodEnum<{
789
+ bracketType: z.ZodEnum<{
713
790
  STOP_LOSS: "STOP_LOSS";
714
791
  TAKE_PROFIT: "TAKE_PROFIT";
715
- }>>;
792
+ NONE: "NONE";
793
+ }>;
716
794
  createdAt: z.ZodString;
717
795
  updatedAt: z.ZodString;
718
796
  intent: z.ZodLiteral<"ADJUST">;
@@ -828,7 +906,7 @@ export declare const CreateTriggerResponse: z.ZodObject<{
828
906
  type: z.ZodLiteral<"MARKET">;
829
907
  position: z.ZodObject<{
830
908
  id: z.ZodUUID;
831
- initialExposure: z.ZodRecord<z.ZodString, z.ZodString>;
909
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
832
910
  }, z.core.$strip>;
833
911
  legs: z.ZodTuple<[z.ZodObject<{
834
912
  symbol: z.ZodString;
@@ -856,6 +934,10 @@ export declare const CreateTriggerResponse: z.ZodObject<{
856
934
  reduceOnly: z.ZodBoolean;
857
935
  }, z.core.$strip>>;
858
936
  }, z.core.$strip>;
937
+ trailing: z.ZodOptional<z.ZodObject<{
938
+ deltaValue: z.ZodNumber;
939
+ activationValue: z.ZodNumber;
940
+ }, z.core.$strip>>;
859
941
  }, z.core.$strip>, z.ZodObject<{
860
942
  id: z.ZodUUID;
861
943
  tradeAccountId: z.ZodUUID;
@@ -877,10 +959,17 @@ export declare const CreateTriggerResponse: z.ZodObject<{
877
959
  USER: "USER";
878
960
  POSITION_CLOSED: "POSITION_CLOSED";
879
961
  SYSTEM: "SYSTEM";
962
+ POSITION_NETTED: "POSITION_NETTED";
880
963
  }>>;
881
964
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
882
965
  id: z.ZodUUID;
883
- cloid: z.ZodOptional<z.ZodUUID>;
966
+ cloid: z.ZodOptional<z.ZodString>;
967
+ exchangeFillId: z.ZodOptional<z.ZodString>;
968
+ status: z.ZodEnum<{
969
+ PROVISIONAL: "PROVISIONAL";
970
+ CONFIRMED: "CONFIRMED";
971
+ RECONCILED: "RECONCILED";
972
+ }>;
884
973
  tradeAccountId: z.ZodUUID;
885
974
  symbol: z.ZodString;
886
975
  positionId: z.ZodUUID;
@@ -896,16 +985,23 @@ export declare const CreateTriggerResponse: z.ZodObject<{
896
985
  SELL: "SELL";
897
986
  }>;
898
987
  reduceOnly: z.ZodBoolean;
988
+ isExternal: z.ZodBoolean;
899
989
  quantity: z.ZodString;
900
990
  price: z.ZodString;
901
991
  usd: z.ZodString;
902
- fee: z.ZodOptional<z.ZodString>;
992
+ tradeFee: z.ZodOptional<z.ZodString>;
993
+ pearFee: z.ZodOptional<z.ZodString>;
903
994
  timestamp: z.ZodString;
995
+ original: z.ZodOptional<z.ZodObject<{
996
+ exchangeFillId: z.ZodString;
997
+ quantity: z.ZodString;
998
+ }, z.core.$strip>>;
904
999
  }, z.core.$strip>>>;
905
- bracketType: z.ZodOptional<z.ZodEnum<{
1000
+ bracketType: z.ZodEnum<{
906
1001
  STOP_LOSS: "STOP_LOSS";
907
1002
  TAKE_PROFIT: "TAKE_PROFIT";
908
- }>>;
1003
+ NONE: "NONE";
1004
+ }>;
909
1005
  createdAt: z.ZodString;
910
1006
  updatedAt: z.ZodString;
911
1007
  intent: z.ZodLiteral<"CLOSE">;
@@ -1021,9 +1117,13 @@ export declare const CreateTriggerResponse: z.ZodObject<{
1021
1117
  type: z.ZodLiteral<"MARKET">;
1022
1118
  position: z.ZodObject<{
1023
1119
  id: z.ZodUUID;
1024
- initialExposure: z.ZodRecord<z.ZodString, z.ZodString>;
1120
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
1025
1121
  }, z.core.$strip>;
1026
1122
  }, z.core.$strip>;
1123
+ trailing: z.ZodOptional<z.ZodObject<{
1124
+ deltaValue: z.ZodNumber;
1125
+ activationValue: z.ZodNumber;
1126
+ }, z.core.$strip>>;
1027
1127
  }, z.core.$strip>], "intent">], "type">;
1028
1128
  }, z.core.$strip>;
1029
1129
  export type CreateTriggerResponse = z.output<typeof CreateTriggerResponse>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/types",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "Pear Protocol Types definitions",
5
5
  "private": false,
6
6
  "type": "module",
@@ -24,7 +24,7 @@
24
24
  "clean": "rm -rf dist .turbo",
25
25
  "typecheck": "tsc --noEmit"
26
26
  },
27
- "peerDependencies": {
27
+ "dependencies": {
28
28
  "zod": "4.1.12"
29
29
  },
30
30
  "devDependencies": {