@nadohq/mobile-client 0.64.0 → 0.65.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/README.md +20 -2
- package/dist/{MobileClient-aDxiM_Kf.cjs → MobileClient-CfVZXTcz.cjs} +298 -1
- package/dist/MobileClient-CfVZXTcz.cjs.map +1 -0
- package/dist/MobileClient.cjs +1 -1
- package/dist/MobileClient.d.cts +173 -7
- package/dist/MobileClient.d.cts.map +1 -1
- package/dist/MobileClient.d.ts +173 -7
- package/dist/MobileClient.d.ts.map +1 -1
- package/dist/MobileClient.js +298 -1
- package/dist/MobileClient.js.map +1 -1
- package/dist/{MobileServerFailureError-Dd3c6P_Z.d.ts → MobileServerFailureError-BZVwlsMg.d.ts} +3 -3
- package/dist/{MobileServerFailureError-Dd3c6P_Z.d.ts.map → MobileServerFailureError-BZVwlsMg.d.ts.map} +1 -1
- package/dist/{MobileServerFailureError-Bpa_WA9f.d.cts → MobileServerFailureError-CbtK8kD4.d.cts} +3 -3
- package/dist/{MobileServerFailureError-Bpa_WA9f.d.cts.map → MobileServerFailureError-CbtK8kD4.d.cts.map} +1 -1
- package/dist/MobileUnsupportedFeedItemError-BsZvW8i2.d.cts +15 -0
- package/dist/MobileUnsupportedFeedItemError-BsZvW8i2.d.cts.map +1 -0
- package/dist/MobileUnsupportedFeedItemError-BsZvW8i2.d.ts +15 -0
- package/dist/MobileUnsupportedFeedItemError-BsZvW8i2.d.ts.map +1 -0
- package/dist/{buildSignedMobileRequest-NHbMAPzd.d.cts → buildSignedMobileRequest-C1v0flCR.d.cts} +2 -2
- package/dist/{buildSignedMobileRequest-NHbMAPzd.d.cts.map → buildSignedMobileRequest-C1v0flCR.d.cts.map} +1 -1
- package/dist/{buildSignedMobileRequest-Cb1T74xV.d.ts → buildSignedMobileRequest-UeeWdYGU.d.ts} +2 -2
- package/dist/{buildSignedMobileRequest-Cb1T74xV.d.ts.map → buildSignedMobileRequest-UeeWdYGU.d.ts.map} +1 -1
- package/dist/{canonicalize-BBYGh17w.d.ts → canonicalize-5eeZrkzQ.d.ts} +2 -2
- package/dist/canonicalize-5eeZrkzQ.d.ts.map +1 -0
- package/dist/{canonicalize-BF_SiNvO.d.cts → canonicalize-CBaZprTo.d.cts} +2 -2
- package/dist/canonicalize-CBaZprTo.d.cts.map +1 -0
- package/dist/{clientTypes-BWFKo9oE.d.cts → clientTypes-C9dJufxk.d.ts} +569 -25
- package/dist/clientTypes-C9dJufxk.d.ts.map +1 -0
- package/dist/{clientTypes-DCTiUV0H.d.ts → clientTypes-_mEgzmNs.d.cts} +569 -25
- package/dist/clientTypes-_mEgzmNs.d.cts.map +1 -0
- package/dist/dataMappers.cjs +488 -9
- package/dist/dataMappers.cjs.map +1 -1
- package/dist/dataMappers.d.cts +190 -7
- package/dist/dataMappers.d.cts.map +1 -1
- package/dist/dataMappers.d.ts +190 -7
- package/dist/dataMappers.d.ts.map +1 -1
- package/dist/dataMappers.js +460 -10
- package/dist/dataMappers.js.map +1 -1
- package/dist/{eip712MethodByType-BSx11xG-.d.cts → eip712MethodByType-D8jLoxDu.d.cts} +2 -2
- package/dist/eip712MethodByType-D8jLoxDu.d.cts.map +1 -0
- package/dist/{eip712MethodByType-DkiAjCLs.d.ts → eip712MethodByType-DcUh8h-l.d.ts} +2 -2
- package/dist/eip712MethodByType-DcUh8h-l.d.ts.map +1 -0
- package/dist/index.cjs +3 -1
- package/dist/index.d.cts +16 -15
- package/dist/index.d.ts +16 -15
- package/dist/index.js +2 -1
- package/dist/{mobileErrorCodes-3LtreeZM.d.ts → mobileErrorCodes-CmjYEIYm.d.cts} +18 -4
- package/dist/mobileErrorCodes-CmjYEIYm.d.cts.map +1 -0
- package/dist/{mobileErrorCodes-3LtreeZM.d.cts → mobileErrorCodes-CmjYEIYm.d.ts} +18 -4
- package/dist/mobileErrorCodes-CmjYEIYm.d.ts.map +1 -0
- package/dist/{payloadHash-BOWGjqdb.d.cts → payloadHash-DhHmgRqL.d.cts} +2 -2
- package/dist/payloadHash-DhHmgRqL.d.cts.map +1 -0
- package/dist/{payloadHash-Bzf4CtjV.d.ts → payloadHash-E1_8fpLW.d.ts} +2 -2
- package/dist/payloadHash-E1_8fpLW.d.ts.map +1 -0
- package/dist/{serverBaseTypes-KREDe2M9.d.cts → serverBaseTypes-B5J1_TyC.d.cts} +2 -2
- package/dist/{serverBaseTypes-KREDe2M9.d.cts.map → serverBaseTypes-B5J1_TyC.d.cts.map} +1 -1
- package/dist/{serverBaseTypes-DWf3iGWy.d.ts → serverBaseTypes-DnLzsdm-.d.ts} +2 -2
- package/dist/{serverBaseTypes-DWf3iGWy.d.ts.map → serverBaseTypes-DnLzsdm-.d.ts.map} +1 -1
- package/dist/serverExecuteTypes-B-OJok19.d.cts +162 -0
- package/dist/serverExecuteTypes-B-OJok19.d.cts.map +1 -0
- package/dist/serverExecuteTypes-BwWGspOg.d.ts +162 -0
- package/dist/serverExecuteTypes-BwWGspOg.d.ts.map +1 -0
- package/dist/{serverModelTypes-DAqEyYtB.d.cts → serverModelTypes-CiA-dy1R.d.cts} +299 -24
- package/dist/serverModelTypes-CiA-dy1R.d.cts.map +1 -0
- package/dist/{serverModelTypes-DAqEyYtB.d.ts → serverModelTypes-CiA-dy1R.d.ts} +299 -24
- package/dist/serverModelTypes-CiA-dy1R.d.ts.map +1 -0
- package/dist/{serverQueryTypes-DNdMpmDr.d.cts → serverQueryTypes-CJcjLB7n.d.ts} +117 -5
- package/dist/serverQueryTypes-CJcjLB7n.d.ts.map +1 -0
- package/dist/{serverQueryTypes-BFdwq0Z2.d.ts → serverQueryTypes-V1f9yE7L.d.cts} +117 -5
- package/dist/serverQueryTypes-V1f9yE7L.d.cts.map +1 -0
- package/dist/{serverRequestTypes-CxDRFKfv.d.cts → serverRequestTypes-CRlkNSu5.d.cts} +77 -7
- package/dist/serverRequestTypes-CRlkNSu5.d.cts.map +1 -0
- package/dist/{serverRequestTypes-BNA7FCY6.d.ts → serverRequestTypes-DZoOhV2o.d.ts} +77 -7
- package/dist/serverRequestTypes-DZoOhV2o.d.ts.map +1 -0
- package/dist/{serverResponseGuards-Dkdok0Sm.d.cts → serverResponseGuards-BW69PS7O.d.cts} +2 -2
- package/dist/{serverResponseGuards-Dkdok0Sm.d.cts.map → serverResponseGuards-BW69PS7O.d.cts.map} +1 -1
- package/dist/{serverResponseGuards-BU1Xv_tG.d.ts → serverResponseGuards-CShiXpHT.d.ts} +2 -2
- package/dist/{serverResponseGuards-BU1Xv_tG.d.ts.map → serverResponseGuards-CShiXpHT.d.ts.map} +1 -1
- package/dist/signing/buildSignedMobileRequest.d.cts +1 -1
- package/dist/signing/buildSignedMobileRequest.d.ts +1 -1
- package/dist/signing/canonicalize.cjs +37 -0
- package/dist/signing/canonicalize.cjs.map +1 -1
- package/dist/signing/canonicalize.d.cts +1 -1
- package/dist/signing/canonicalize.d.ts +1 -1
- package/dist/signing/canonicalize.js +37 -0
- package/dist/signing/canonicalize.js.map +1 -1
- package/dist/signing/eip712MethodByType.cjs +5 -0
- package/dist/signing/eip712MethodByType.cjs.map +1 -1
- package/dist/signing/eip712MethodByType.d.cts +1 -1
- package/dist/signing/eip712MethodByType.d.ts +1 -1
- package/dist/signing/eip712MethodByType.js +5 -0
- package/dist/signing/eip712MethodByType.js.map +1 -1
- package/dist/signing/index.d.cts +5 -5
- package/dist/signing/index.d.ts +5 -5
- package/dist/signing/payloadHash.d.cts +1 -1
- package/dist/signing/payloadHash.d.ts +1 -1
- package/dist/signing/types.d.cts +1 -1
- package/dist/signing/types.d.ts +1 -1
- package/dist/types/MobileServerFailureError.d.cts +1 -1
- package/dist/types/MobileServerFailureError.d.ts +1 -1
- package/dist/types/MobileUnsupportedFeedItemError.cjs +19 -0
- package/dist/types/MobileUnsupportedFeedItemError.cjs.map +1 -0
- package/dist/types/MobileUnsupportedFeedItemError.d.cts +2 -0
- package/dist/types/MobileUnsupportedFeedItemError.d.ts +2 -0
- package/dist/types/MobileUnsupportedFeedItemError.js +18 -0
- package/dist/types/MobileUnsupportedFeedItemError.js.map +1 -0
- package/dist/types/clientTypes.d.cts +2 -2
- package/dist/types/clientTypes.d.ts +2 -2
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +10 -9
- package/dist/types/index.d.ts +10 -9
- package/dist/types/index.js +2 -1
- package/dist/types/mobileErrorCodes.cjs +28 -0
- package/dist/types/mobileErrorCodes.cjs.map +1 -1
- package/dist/types/mobileErrorCodes.d.cts +1 -1
- package/dist/types/mobileErrorCodes.d.ts +1 -1
- package/dist/types/mobileErrorCodes.js +28 -0
- package/dist/types/mobileErrorCodes.js.map +1 -1
- package/dist/types/serverBaseTypes.d.cts +1 -1
- package/dist/types/serverBaseTypes.d.ts +1 -1
- package/dist/types/serverExecuteTypes.d.cts +2 -2
- package/dist/types/serverExecuteTypes.d.ts +2 -2
- package/dist/types/serverModelTypes.cjs.map +1 -1
- package/dist/types/serverModelTypes.d.cts +2 -2
- package/dist/types/serverModelTypes.d.ts +2 -2
- package/dist/types/serverModelTypes.js.map +1 -1
- package/dist/types/serverQueryTypes.d.cts +2 -2
- package/dist/types/serverQueryTypes.d.ts +2 -2
- package/dist/types/serverRequestTypes.d.cts +1 -1
- package/dist/types/serverRequestTypes.d.ts +1 -1
- package/dist/{types-BCr2G5gS.d.cts → types-BiRmH5Iv.d.cts} +31 -7
- package/dist/types-BiRmH5Iv.d.cts.map +1 -0
- package/dist/{types-C18k-9Vy.d.ts → types-DoJuq0Ij.d.ts} +31 -7
- package/dist/types-DoJuq0Ij.d.ts.map +1 -0
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/serverResponseGuards.d.cts +1 -1
- package/dist/utils/serverResponseGuards.d.ts +1 -1
- package/package.json +3 -3
- package/src/MobileClient.ts +409 -4
- package/src/dataMappers.test.ts +742 -0
- package/src/dataMappers.ts +671 -12
- package/src/signing/canonicalize.ts +53 -0
- package/src/signing/eip712MethodByType.ts +5 -0
- package/src/signing/signing.test.ts +347 -0
- package/src/signing/types.ts +57 -4
- package/src/types/MobileUnsupportedFeedItemError.ts +18 -0
- package/src/types/clientTypes.ts +645 -23
- package/src/types/index.ts +1 -0
- package/src/types/mobileErrorCodes.ts +28 -0
- package/src/types/serverExecuteTypes.ts +92 -3
- package/src/types/serverModelTypes.ts +376 -22
- package/src/types/serverQueryTypes.ts +138 -0
- package/src/types/serverRequestTypes.ts +115 -4
- package/dist/MobileClient-aDxiM_Kf.cjs.map +0 -1
- package/dist/canonicalize-BBYGh17w.d.ts.map +0 -1
- package/dist/canonicalize-BF_SiNvO.d.cts.map +0 -1
- package/dist/clientTypes-BWFKo9oE.d.cts.map +0 -1
- package/dist/clientTypes-DCTiUV0H.d.ts.map +0 -1
- package/dist/eip712MethodByType-BSx11xG-.d.cts.map +0 -1
- package/dist/eip712MethodByType-DkiAjCLs.d.ts.map +0 -1
- package/dist/mobileErrorCodes-3LtreeZM.d.cts.map +0 -1
- package/dist/mobileErrorCodes-3LtreeZM.d.ts.map +0 -1
- package/dist/payloadHash-BOWGjqdb.d.cts.map +0 -1
- package/dist/payloadHash-Bzf4CtjV.d.ts.map +0 -1
- package/dist/serverExecuteTypes-DVRa6ifu.d.cts +0 -89
- package/dist/serverExecuteTypes-DVRa6ifu.d.cts.map +0 -1
- package/dist/serverExecuteTypes-DlYZCp1f.d.ts +0 -89
- package/dist/serverExecuteTypes-DlYZCp1f.d.ts.map +0 -1
- package/dist/serverModelTypes-DAqEyYtB.d.cts.map +0 -1
- package/dist/serverModelTypes-DAqEyYtB.d.ts.map +0 -1
- package/dist/serverQueryTypes-BFdwq0Z2.d.ts.map +0 -1
- package/dist/serverQueryTypes-DNdMpmDr.d.cts.map +0 -1
- package/dist/serverRequestTypes-BNA7FCY6.d.ts.map +0 -1
- package/dist/serverRequestTypes-CxDRFKfv.d.cts.map +0 -1
- package/dist/types-BCr2G5gS.d.cts.map +0 -1
- package/dist/types-C18k-9Vy.d.ts.map +0 -1
package/src/types/clientTypes.ts
CHANGED
|
@@ -7,21 +7,34 @@ import {
|
|
|
7
7
|
MobileFeedTradePositionDirection,
|
|
8
8
|
MobileNotificationCategory,
|
|
9
9
|
MobileNotificationPlatform,
|
|
10
|
+
MobileSocialFeedAction,
|
|
11
|
+
MobileSocialFeedActionPriceBasis,
|
|
12
|
+
MobileSocialFeedActionResolution,
|
|
13
|
+
MobileSocialFeedActionUnavailableReason,
|
|
14
|
+
MobileSocialFeedAttachmentStatus,
|
|
15
|
+
MobileSocialFeedChartDataQuality,
|
|
16
|
+
MobileSocialFeedChartInterval,
|
|
10
17
|
MobileSocialFeedCohortStatus,
|
|
11
18
|
MobileSocialFeedHistoryQuality,
|
|
12
19
|
MobileSocialFeedLeverage,
|
|
20
|
+
MobileSocialFeedLiquidationPriceQuality,
|
|
13
21
|
MobileSocialFeedMarketCategory,
|
|
22
|
+
MobileSocialFeedMention,
|
|
14
23
|
MobileSocialFeedPnlBasis,
|
|
15
24
|
MobileSocialFeedPnlMode,
|
|
16
25
|
MobileSocialFeedPnlQuality,
|
|
17
26
|
MobileSocialFeedPositionDisplayBasis,
|
|
27
|
+
MobileSocialFeedPositionResolution,
|
|
28
|
+
MobileSocialFeedPositionResolutionReason,
|
|
18
29
|
MobileSocialFeedPositionState,
|
|
30
|
+
MobileSocialFeedPresenceState,
|
|
19
31
|
MobileSocialFeedReadSessionMode,
|
|
20
32
|
MobileSocialFeedSourceCategory,
|
|
21
33
|
MobileSocialFeedTradeCardAction,
|
|
22
34
|
MobileSocialFeedTradeSizeChangeAction,
|
|
23
35
|
MobileSocialFeedTraderBadgeCode,
|
|
24
36
|
MobileSocialFeedTraderDataStatus,
|
|
37
|
+
MobileSocialFeedTradingResolution,
|
|
25
38
|
MobileSocialFeedType,
|
|
26
39
|
MobileSocialFeedUnavailableTarget,
|
|
27
40
|
} from './serverModelTypes';
|
|
@@ -290,8 +303,15 @@ export interface MobileRegisteredWallet {
|
|
|
290
303
|
/**
|
|
291
304
|
* Common params for signed requests that authenticate as a given subaccount.
|
|
292
305
|
*/
|
|
293
|
-
export interface MobileSignedRequestParams
|
|
294
|
-
|
|
306
|
+
export interface MobileSignedRequestParams extends Subaccount, SignatureParams {
|
|
307
|
+
/**
|
|
308
|
+
* Optional nonce from {@link getMobileNonce}. For clock synchronization, use EngineWebClient.getTime()
|
|
309
|
+
* from @nadohq/engine-client as a reference; the mobile service has no time endpoint. The receive deadline
|
|
310
|
+
* must be later than mobile server time and no more than 100 seconds ahead, expressed in milliseconds.
|
|
311
|
+
* The SDK does not fetch server time automatically.
|
|
312
|
+
*/
|
|
313
|
+
nonce?: bigint;
|
|
314
|
+
}
|
|
295
315
|
|
|
296
316
|
/**
|
|
297
317
|
* Common params for the unsigned notification requests, which name their target with an Expo push token
|
|
@@ -580,6 +600,8 @@ export interface MobileSocialFeedPnl {
|
|
|
580
600
|
|
|
581
601
|
/** Complete mutable position fields delivered together at one version. */
|
|
582
602
|
export interface MobileSocialFeedPositionPatch {
|
|
603
|
+
/** Additional metrics for a position history session, when supplied. */
|
|
604
|
+
currentPosition?: MobileSocialFeedHistoryMetrics;
|
|
583
605
|
/** Position lifecycle UUID. */
|
|
584
606
|
positionId: string;
|
|
585
607
|
/** Positive integer string; compare as integers without Number conversion. */
|
|
@@ -620,7 +642,7 @@ export interface MobileSocialFeedPositionCard extends MobileSocialFeedPositionPa
|
|
|
620
642
|
direction: MobileFeedTradePositionDirection;
|
|
621
643
|
}
|
|
622
644
|
|
|
623
|
-
/** Interaction counters
|
|
645
|
+
/** Interaction counters and the viewing account's relationship state. */
|
|
624
646
|
export interface MobileSocialFeedInteraction {
|
|
625
647
|
/** Number of likes. */
|
|
626
648
|
likeCount: number;
|
|
@@ -628,7 +650,7 @@ export interface MobileSocialFeedInteraction {
|
|
|
628
650
|
commentCount: number;
|
|
629
651
|
/** Number of recorded views. */
|
|
630
652
|
viewCount: number;
|
|
631
|
-
/** Null
|
|
653
|
+
/** Null when no viewing account is selected. */
|
|
632
654
|
likedByMe: boolean | null;
|
|
633
655
|
}
|
|
634
656
|
|
|
@@ -644,8 +666,8 @@ export interface MobileSocialFeedCapabilities {
|
|
|
644
666
|
|
|
645
667
|
/** Comment preview metadata for a social trade card. */
|
|
646
668
|
export interface MobileSocialFeedCommentPreview {
|
|
647
|
-
/**
|
|
648
|
-
items:
|
|
669
|
+
/** Most recent readable replies. */
|
|
670
|
+
items: MobileSocialFeedReply[];
|
|
649
671
|
/** Comment count. */
|
|
650
672
|
totalCount: number;
|
|
651
673
|
/** Comment cursor, if available. */
|
|
@@ -682,14 +704,14 @@ export interface MobileSocialFeedCohort {
|
|
|
682
704
|
coverage: MobileSocialFeedCohortCoverage;
|
|
683
705
|
}
|
|
684
706
|
|
|
685
|
-
/** Metadata shared by
|
|
707
|
+
/** Metadata shared by social feed content. */
|
|
686
708
|
export interface MobileSocialFeedItemBase {
|
|
687
709
|
/** Item UUID. */
|
|
688
710
|
id: string;
|
|
689
711
|
/** Whether authored analysis exists. */
|
|
690
712
|
hasAnalysis: boolean;
|
|
691
|
-
/**
|
|
692
|
-
drawing: null;
|
|
713
|
+
/** Parsed drawing document, or null when no drawing is readable. */
|
|
714
|
+
drawing: MobileSocialFeedDrawing | null;
|
|
693
715
|
/** Author identity, badge, and follow perspective. */
|
|
694
716
|
author: MobileSocialFeedAuthor;
|
|
695
717
|
/** Creation time in Unix milliseconds. */
|
|
@@ -700,28 +722,32 @@ export interface MobileSocialFeedItemBase {
|
|
|
700
722
|
version: string;
|
|
701
723
|
/** Market metadata. */
|
|
702
724
|
market: MobileSocialFeedMarket;
|
|
703
|
-
/** Server capability flags
|
|
725
|
+
/** Server capability flags, subject to the corresponding write switches. */
|
|
704
726
|
capabilities: MobileSocialFeedCapabilities;
|
|
705
727
|
}
|
|
706
728
|
|
|
707
|
-
/**
|
|
708
|
-
export interface
|
|
709
|
-
/** Card discriminant. */
|
|
710
|
-
kind: 'trade_card';
|
|
711
|
-
/** Trading action. */
|
|
712
|
-
action: MobileSocialFeedTradeCardAction;
|
|
729
|
+
/** Content shared by authored posts and trade cards. */
|
|
730
|
+
export interface MobileSocialFeedContentBase extends MobileSocialFeedItemBase {
|
|
713
731
|
/** Card text, empty for automatic cards. */
|
|
714
732
|
text: string;
|
|
715
|
-
/**
|
|
716
|
-
mentions:
|
|
733
|
+
/** Mentions in the original, unmodified text. */
|
|
734
|
+
mentions: MobileSocialFeedMention[];
|
|
717
735
|
/** Current or frozen position display. */
|
|
718
736
|
position: MobileSocialFeedPositionCard;
|
|
719
737
|
/** Interaction counters. */
|
|
720
738
|
interaction: MobileSocialFeedInteraction;
|
|
721
|
-
/**
|
|
739
|
+
/** Readable comment preview. */
|
|
722
740
|
commentPreview: MobileSocialFeedCommentPreview;
|
|
723
741
|
}
|
|
724
742
|
|
|
743
|
+
/** Trade card with optional authored text and analysis. */
|
|
744
|
+
export interface MobileSocialFeedTradeCard extends MobileSocialFeedContentBase {
|
|
745
|
+
/** Card discriminant. */
|
|
746
|
+
kind: 'trade_card';
|
|
747
|
+
/** Trading action. */
|
|
748
|
+
action: MobileSocialFeedTradeCardAction;
|
|
749
|
+
}
|
|
750
|
+
|
|
725
751
|
/** Fields shared by size-change and liquidation trade rows. */
|
|
726
752
|
export interface MobileSocialFeedTradeRowBase extends MobileSocialFeedItemBase {
|
|
727
753
|
/** Row discriminant. */
|
|
@@ -769,20 +795,22 @@ export type MobileSocialFeedTradeRow = MobileSocialFeedTradeRowBase &
|
|
|
769
795
|
}
|
|
770
796
|
);
|
|
771
797
|
|
|
772
|
-
/**
|
|
798
|
+
/** Discriminated social feed content. */
|
|
773
799
|
export type MobileSocialFeedItem =
|
|
774
800
|
| MobileSocialFeedTradeCard
|
|
775
|
-
| MobileSocialFeedTradeRow
|
|
801
|
+
| MobileSocialFeedTradeRow
|
|
802
|
+
| MobileSocialFeedPost
|
|
803
|
+
| MobileSocialFeedReply;
|
|
776
804
|
|
|
777
805
|
/** Fixed-duration social feed reading session. Credentials and cursors must be returned unchanged. */
|
|
778
806
|
export interface MobileSocialFeedReadSession {
|
|
779
807
|
/** Session identifier. */
|
|
780
808
|
sessionId: string;
|
|
781
|
-
/** Feed or
|
|
809
|
+
/** Feed, item, or full position history session. */
|
|
782
810
|
mode: MobileSocialFeedReadSessionMode;
|
|
783
811
|
/** Fixed expiration time in Unix milliseconds; pagination does not extend it. */
|
|
784
812
|
expiresAtMs: number;
|
|
785
|
-
/**
|
|
813
|
+
/** Visibility requirements for explicit exposure reporting. */
|
|
786
814
|
viewTracking: MobileSocialFeedViewTracking;
|
|
787
815
|
/** Initial update baseline, distinct from the page cursor. */
|
|
788
816
|
updateCursor: string | null;
|
|
@@ -824,6 +852,10 @@ export interface MobileSocialFeedItemResponse {
|
|
|
824
852
|
|
|
825
853
|
/** Item delta: omitted means unchanged; explicit null clears a prior value. */
|
|
826
854
|
export interface MobileSocialFeedItemPatch {
|
|
855
|
+
/** Updated reply attachment; null clears it, omission leaves it unchanged. */
|
|
856
|
+
attachedPosition?: MobileSocialFeedPositionCard | null;
|
|
857
|
+
/** Updated reply attachment visibility. */
|
|
858
|
+
attachmentStatus?: MobileSocialFeedAttachmentStatus;
|
|
827
859
|
/** Current author identity, follow state, and qualification badge. */
|
|
828
860
|
author: MobileSocialFeedAuthor;
|
|
829
861
|
/** Target item UUID. */
|
|
@@ -969,3 +1001,593 @@ export type GetMobileFeedUpdatesParams = {
|
|
|
969
1001
|
/** Credential belonging to the original public session. */
|
|
970
1002
|
viewerToken: string;
|
|
971
1003
|
};
|
|
1004
|
+
|
|
1005
|
+
/** Parsed drawing; data is opaque to the SDK and may legitimately be false or zero. */
|
|
1006
|
+
export interface MobileSocialFeedDrawing {
|
|
1007
|
+
/** Already parsed drawing document; do not JSON.parse again. */
|
|
1008
|
+
data: unknown;
|
|
1009
|
+
/** Original creation time in milliseconds. */
|
|
1010
|
+
createdAtMs: number;
|
|
1011
|
+
/** Last update time in milliseconds. */
|
|
1012
|
+
updatedAtMs: number;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
/** Nonrecursive root-post preview carried by replies. */
|
|
1016
|
+
export interface MobileSocialFeedCompactCard {
|
|
1017
|
+
/** Root item UUID. */
|
|
1018
|
+
id: string;
|
|
1019
|
+
/** Root author. */
|
|
1020
|
+
author: MobileSocialFeedAuthor;
|
|
1021
|
+
/** Original text excerpt. */
|
|
1022
|
+
textExcerpt: string;
|
|
1023
|
+
/** Visible position summary, or null. */
|
|
1024
|
+
position: Pick<
|
|
1025
|
+
MobileSocialFeedPositionCard,
|
|
1026
|
+
'positionId' | 'market' | 'direction' | 'state' | 'notional'
|
|
1027
|
+
> | null;
|
|
1028
|
+
/** Whether the root has published analysis. */
|
|
1029
|
+
hasAnalysis: boolean;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
/** Authored position post, including text-only, drawing-only, and combined content. */
|
|
1033
|
+
export interface MobileSocialFeedPost extends MobileSocialFeedContentBase {
|
|
1034
|
+
/** Post discriminant. */
|
|
1035
|
+
kind: 'post';
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
/** Reply with independently permissioned position attachment and nonrecursive root preview. */
|
|
1039
|
+
export interface MobileSocialFeedReply extends MobileSocialFeedItemBase {
|
|
1040
|
+
/** Reply discriminant. */
|
|
1041
|
+
kind: 'reply';
|
|
1042
|
+
/** Original text. */
|
|
1043
|
+
text: string;
|
|
1044
|
+
/** Mentions in the text. */
|
|
1045
|
+
mentions: MobileSocialFeedMention[];
|
|
1046
|
+
/** Actual root item UUID. */
|
|
1047
|
+
rootItemId: string;
|
|
1048
|
+
/** Omitted for a direct reply to the root. */
|
|
1049
|
+
replyToItemId?: string;
|
|
1050
|
+
/** Author being replied to, or null. */
|
|
1051
|
+
replyToAuthor: MobileSocialFeedAuthor | null;
|
|
1052
|
+
/** Readable attachment; null when absent or unavailable. */
|
|
1053
|
+
attachedPosition: MobileSocialFeedPositionCard | null;
|
|
1054
|
+
/** Distinguishes an absent attachment from an unreadable one. */
|
|
1055
|
+
attachmentStatus: MobileSocialFeedAttachmentStatus;
|
|
1056
|
+
/** Root preview; does not register root exposure. */
|
|
1057
|
+
original: MobileSocialFeedCompactCard;
|
|
1058
|
+
/** Reply interaction state. */
|
|
1059
|
+
interaction: MobileSocialFeedInteraction;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/** Current eligibility hints; actual writes still recheck the signed author. */
|
|
1063
|
+
export interface MobileSocialFeedPublishablePosition {
|
|
1064
|
+
/** Candidate position. */
|
|
1065
|
+
position: MobileSocialFeedPositionCard;
|
|
1066
|
+
/** Whether this account can publish. */
|
|
1067
|
+
canPublish: boolean;
|
|
1068
|
+
/** Whether this account can attach the position to a comment. */
|
|
1069
|
+
canAttachToComment: boolean;
|
|
1070
|
+
/** Whether this account can first add analysis. */
|
|
1071
|
+
canDrawAnalysis: boolean;
|
|
1072
|
+
/** Unavailability explanation, or null. */
|
|
1073
|
+
unavailableReason: string | null;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
/** An authoritative lifecycle segment of an order. */
|
|
1077
|
+
export interface MobileSocialFeedActionCandidate {
|
|
1078
|
+
/** Action UUID. */
|
|
1079
|
+
actionId: string;
|
|
1080
|
+
/** Lifecycle UUID. */
|
|
1081
|
+
positionId: string;
|
|
1082
|
+
/** Lifecycle action. */
|
|
1083
|
+
action: MobileSocialFeedAction;
|
|
1084
|
+
/** Current publishing eligibility, not proof of caller ownership. */
|
|
1085
|
+
canPublish: boolean;
|
|
1086
|
+
/** Publication restriction, or null when eligible. */
|
|
1087
|
+
unavailableReason: MobileSocialFeedActionUnavailableReason | null;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
/** Additional history metrics; unavailable values are not zero. */
|
|
1091
|
+
export interface MobileSocialFeedHistoryMetrics {
|
|
1092
|
+
/** Estimated liquidation price in decimal units, independent of event Oracle and execution prices. */
|
|
1093
|
+
estimatedLiquidationPrice: BigNumber | null;
|
|
1094
|
+
/** Availability of the estimated price. */
|
|
1095
|
+
liquidationPriceQuality: MobileSocialFeedLiquidationPriceQuality;
|
|
1096
|
+
/** Source time in milliseconds. */
|
|
1097
|
+
liquidationPriceAsOfMs: number | null;
|
|
1098
|
+
/** Signed funding amount in x18. */
|
|
1099
|
+
fundingPnl: BigNumber | null;
|
|
1100
|
+
/** Funding availability. */
|
|
1101
|
+
fundingQuality: MobileSocialFeedPnlQuality;
|
|
1102
|
+
/** Funding source time in milliseconds. */
|
|
1103
|
+
fundingAsOfMs: number | null;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
/** Full position card displayed above its historical timeline. */
|
|
1107
|
+
export interface MobileSocialFeedPositionHistoryCard
|
|
1108
|
+
extends MobileSocialFeedPositionCard, MobileSocialFeedHistoryMetrics {}
|
|
1109
|
+
|
|
1110
|
+
/** Persisted action facts, independent of whether a feed item was published. */
|
|
1111
|
+
export interface MobileSocialFeedPositionAction {
|
|
1112
|
+
/** Action UUID. */
|
|
1113
|
+
id: string;
|
|
1114
|
+
/** Lifecycle UUID. */
|
|
1115
|
+
positionId: string;
|
|
1116
|
+
/** Lifecycle action. */
|
|
1117
|
+
action: MobileSocialFeedAction;
|
|
1118
|
+
/** Position direction. */
|
|
1119
|
+
direction: MobileFeedTradePositionDirection;
|
|
1120
|
+
/** Historical margin mode. */
|
|
1121
|
+
marginMode: MobileFeedMarginMode;
|
|
1122
|
+
/** Quantity before the action, in x18. */
|
|
1123
|
+
quantityBefore: BigNumber;
|
|
1124
|
+
/** Quantity after the action, in x18. */
|
|
1125
|
+
quantityAfter: BigNumber;
|
|
1126
|
+
/** Executed quantity, in x18. */
|
|
1127
|
+
executedQuantity: BigNumber;
|
|
1128
|
+
/** Actual executed notional in x18; may be unknown for liquidation. */
|
|
1129
|
+
executedNotional: BigNumber | null;
|
|
1130
|
+
/** Actual execution price in decimal units. */
|
|
1131
|
+
averagePrice: BigNumber | null;
|
|
1132
|
+
/** Entry price before the action, in decimal units. */
|
|
1133
|
+
entryPriceBefore: BigNumber | null;
|
|
1134
|
+
/** Liquidation event Oracle price in decimal units. */
|
|
1135
|
+
liquidationOraclePrice: BigNumber | null;
|
|
1136
|
+
/** Liquidation Oracle-based notional in x18. */
|
|
1137
|
+
liquidationNotional: BigNumber | null;
|
|
1138
|
+
/** Signed realized trading PnL in x18, excluding ordinary fees and funding. */
|
|
1139
|
+
realizedPnlDelta: BigNumber | null;
|
|
1140
|
+
/** Historical effective leverage. */
|
|
1141
|
+
leverage: MobileSocialFeedLeverage;
|
|
1142
|
+
/** Leverage source time in milliseconds. */
|
|
1143
|
+
leverageAtMs: number | null;
|
|
1144
|
+
/** First event time in milliseconds. */
|
|
1145
|
+
firstEventAtMs: number;
|
|
1146
|
+
/** Last event time in milliseconds. */
|
|
1147
|
+
lastEventAtMs: number;
|
|
1148
|
+
/** Decimal-string version. */
|
|
1149
|
+
version: string;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
/** Full published content appearing in a position timeline. */
|
|
1153
|
+
export type MobileSocialFeedHistoryTake =
|
|
1154
|
+
| MobileSocialFeedTradeCard
|
|
1155
|
+
| MobileSocialFeedPost;
|
|
1156
|
+
|
|
1157
|
+
/** A historical action or authored take; preserve service ordering. */
|
|
1158
|
+
export type MobileSocialFeedTimelineEntry =
|
|
1159
|
+
| {
|
|
1160
|
+
/** Action entry. */
|
|
1161
|
+
kind: 'action';
|
|
1162
|
+
/** Full action facts. */
|
|
1163
|
+
action: MobileSocialFeedPositionAction;
|
|
1164
|
+
/** Actually associated feed item, or null. */
|
|
1165
|
+
relatedItemId: string | null;
|
|
1166
|
+
/** Full published trade card, or null. */
|
|
1167
|
+
relatedTake: MobileSocialFeedTradeCard | null;
|
|
1168
|
+
}
|
|
1169
|
+
| {
|
|
1170
|
+
/** Published take entry. */
|
|
1171
|
+
kind: 'take';
|
|
1172
|
+
/** Full published content. */
|
|
1173
|
+
item: MobileSocialFeedHistoryTake;
|
|
1174
|
+
};
|
|
1175
|
+
|
|
1176
|
+
/** Trusted trading target; this hint does not authorize trading. */
|
|
1177
|
+
export interface MobileSocialFeedTradingTarget {
|
|
1178
|
+
/** Lifecycle UUID. */
|
|
1179
|
+
positionId: string;
|
|
1180
|
+
/** Parent identity. */
|
|
1181
|
+
identitySubaccount: Hex;
|
|
1182
|
+
/** Actual trading subaccount, possibly isolated. */
|
|
1183
|
+
tradingSubaccount: Hex;
|
|
1184
|
+
/** Market product ID. */
|
|
1185
|
+
productId: number;
|
|
1186
|
+
/** Margin mode. */
|
|
1187
|
+
marginMode: MobileFeedMarginMode;
|
|
1188
|
+
/** Isolated name, or null for cross margin. */
|
|
1189
|
+
isoSubaccountName: string | null;
|
|
1190
|
+
/** Position direction. */
|
|
1191
|
+
direction: MobileFeedTradePositionDirection;
|
|
1192
|
+
/** Source time in milliseconds. */
|
|
1193
|
+
stateAsOfMs: number;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
/** Viewing-account trading hints, not authenticated permissions. */
|
|
1197
|
+
export interface MobileSocialFeedTradingContext {
|
|
1198
|
+
/** Market product ID. */
|
|
1199
|
+
productId: number;
|
|
1200
|
+
/** Suggested trade direction. */
|
|
1201
|
+
suggestedDirection: MobileFeedTradePositionDirection;
|
|
1202
|
+
/** Resolution of the viewing account's positions. */
|
|
1203
|
+
resolution: MobileSocialFeedTradingResolution;
|
|
1204
|
+
/** Trusted candidates. */
|
|
1205
|
+
candidates: MobileSocialFeedTradingTarget[];
|
|
1206
|
+
/** Unique candidate, or null. */
|
|
1207
|
+
viewerPositionId: string | null;
|
|
1208
|
+
/** Whether the selected account has a unique reducible position. */
|
|
1209
|
+
canReduce: boolean;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
/** Historical candle; volume is a quantity, not a price. */
|
|
1213
|
+
export interface MobileSocialFeedCandle {
|
|
1214
|
+
/** Candle start time in milliseconds. */
|
|
1215
|
+
timestampMs: number;
|
|
1216
|
+
/** Open price in decimal units. */
|
|
1217
|
+
open: BigNumber;
|
|
1218
|
+
/** High price in decimal units. */
|
|
1219
|
+
high: BigNumber;
|
|
1220
|
+
/** Low price in decimal units. */
|
|
1221
|
+
low: BigNumber;
|
|
1222
|
+
/** Close price in decimal units. */
|
|
1223
|
+
close: BigNumber;
|
|
1224
|
+
/** Base asset volume in x18. */
|
|
1225
|
+
volume: BigNumber;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/** Chart action marker with explicitly identified price basis. */
|
|
1229
|
+
export interface MobileSocialFeedActionMarker {
|
|
1230
|
+
/** Action UUID. */
|
|
1231
|
+
actionId: string;
|
|
1232
|
+
/** Event time in milliseconds. */
|
|
1233
|
+
timestampMs: number;
|
|
1234
|
+
/** Price in decimal units; null does not remove the action. */
|
|
1235
|
+
price: BigNumber | null;
|
|
1236
|
+
/** Lifecycle action. */
|
|
1237
|
+
action: MobileSocialFeedAction;
|
|
1238
|
+
/** Direction. */
|
|
1239
|
+
direction: MobileFeedTradePositionDirection;
|
|
1240
|
+
/** Never substitute actual execution for a liquidation Oracle. */
|
|
1241
|
+
priceBasis: MobileSocialFeedActionPriceBasis;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
/** Parameters for listing the selected account's open position candidates. */
|
|
1245
|
+
export interface GetMobileSelfFeedPositionsParams {
|
|
1246
|
+
/** Full non-isolated identity; selecting it is not authentication. */
|
|
1247
|
+
viewAs: Subaccount;
|
|
1248
|
+
/** Optional market filter. */
|
|
1249
|
+
productId?: number;
|
|
1250
|
+
/** Opaque cursor bound to the account and filters. */
|
|
1251
|
+
cursor?: string;
|
|
1252
|
+
/** Page size, 1-50; defaults to 20. */
|
|
1253
|
+
limit?: number;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
/** Parameters for resolving a slash command against the selected account. */
|
|
1257
|
+
export interface ResolveMobileFeedPositionParams {
|
|
1258
|
+
/** Required non-isolated viewing account. */
|
|
1259
|
+
viewAs: Subaccount;
|
|
1260
|
+
/** Original command, such as /position or /BTC; passed unchanged. */
|
|
1261
|
+
input: string;
|
|
1262
|
+
/** Optional market disambiguation. */
|
|
1263
|
+
productId?: number;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
/** Parameters for resolving all trusted lifecycle segments of an order. */
|
|
1267
|
+
export interface ResolveMobileFeedActionParams {
|
|
1268
|
+
/** Required order-owning identity; the caller need not own it to read. */
|
|
1269
|
+
viewAs: Subaccount;
|
|
1270
|
+
/** Order digest returned by trading. */
|
|
1271
|
+
orderDigest: Hex;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
/** Parameters for atomic text, drawing, or combined publication. */
|
|
1275
|
+
export interface MobileCreateFeedPostParams extends MobileSignedRequestParams {
|
|
1276
|
+
/** Author-scoped idempotency UUID; reuse unchanged for a retry. */
|
|
1277
|
+
clientRequestId: string;
|
|
1278
|
+
/** Lifecycle still held by the signed author. */
|
|
1279
|
+
positionId: string;
|
|
1280
|
+
/** Trusted action for a trading annotation; omit for an independent post. */
|
|
1281
|
+
actionId?: string;
|
|
1282
|
+
/** Original text, at most 2,000 code points; empty is allowed with a drawing. */
|
|
1283
|
+
text: string;
|
|
1284
|
+
/** At most ten mentions, with offsets into the original text. */
|
|
1285
|
+
mentions: MobileSocialFeedMentionParams[];
|
|
1286
|
+
/** Original JSON text, at most 256 KiB UTF-8; never reformatted by the SDK. */
|
|
1287
|
+
drawingDataJson?: string;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
/** Parameters for first adding or replacing a drawing. Writes must be serialized by the caller. */
|
|
1291
|
+
export interface MobileFeedChartDrawingParams extends MobileSignedRequestParams {
|
|
1292
|
+
/** Author-owned item UUID. */
|
|
1293
|
+
itemId: string;
|
|
1294
|
+
/** Complete original JSON text; false and zero are valid documents. */
|
|
1295
|
+
dataJson: string;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
/** Parameters for reading a drawing with the original session or an independent account perspective. */
|
|
1299
|
+
export interface GetMobileFeedChartDrawingParams extends MobileSocialFeedReadParams {
|
|
1300
|
+
/** Parent item UUID. */
|
|
1301
|
+
itemId: string;
|
|
1302
|
+
/** If supplied, the original viewerToken is required; independent reads omit both. */
|
|
1303
|
+
sessionId?: string;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
/** Parameters for a comment thread; cursor and anchorReplyId are mutually exclusive. */
|
|
1307
|
+
export interface GetMobileFeedCommentsParams extends MobileSocialFeedReadParams {
|
|
1308
|
+
/** Root post UUID. */
|
|
1309
|
+
rootItemId: string;
|
|
1310
|
+
/** Forward or backward opaque cursor from the same session. */
|
|
1311
|
+
cursor?: string;
|
|
1312
|
+
/** Page size, 1-50; defaults to 20. */
|
|
1313
|
+
limit?: number;
|
|
1314
|
+
/** First-page reply anchor; cannot be combined with cursor. */
|
|
1315
|
+
anchorReplyId?: string;
|
|
1316
|
+
/** Reuse the original session and viewerToken when navigating or paging. */
|
|
1317
|
+
sessionId?: string;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
/** Parameters for posting a comment or reply with an optional owned position attachment. */
|
|
1321
|
+
export interface MobileCreateFeedCommentParams extends MobileSignedRequestParams {
|
|
1322
|
+
/** Author-scoped idempotency UUID. */
|
|
1323
|
+
clientRequestId: string;
|
|
1324
|
+
/** Commentable root UUID. */
|
|
1325
|
+
rootItemId: string;
|
|
1326
|
+
/** Reply within the same thread; omit to reply to the root. */
|
|
1327
|
+
replyToItemId?: string;
|
|
1328
|
+
/** Nonblank original text, at most 1,000 Unicode code points. */
|
|
1329
|
+
text: string;
|
|
1330
|
+
/** At most ten mentions into the original text. */
|
|
1331
|
+
mentions: MobileSocialFeedMentionParams[];
|
|
1332
|
+
/** Position still held by the signed author; invalid attachment rejects the whole request. */
|
|
1333
|
+
attachedPositionId?: string;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
/** Parameters for setting or cancelling a signed user's like. */
|
|
1337
|
+
export interface MobileSetFeedLikeParams extends MobileSignedRequestParams {
|
|
1338
|
+
/** Readable, interactive item UUID. */
|
|
1339
|
+
itemId: string;
|
|
1340
|
+
/** Desired relationship state. */
|
|
1341
|
+
isLiked: boolean;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
/** Unsigned exposure report; only send after satisfying the session's viewTracking requirements. */
|
|
1345
|
+
export interface MobileRecordFeedViewsParams {
|
|
1346
|
+
/** Original reading session. */
|
|
1347
|
+
sessionId: string;
|
|
1348
|
+
/** Original opaque browsing credential. */
|
|
1349
|
+
viewerToken: string;
|
|
1350
|
+
/** One to fifty fully delivered, readable, interactive item UUIDs. */
|
|
1351
|
+
itemIds: string[];
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
/** Parameters for full position history, not just published feed items. */
|
|
1355
|
+
export interface GetMobilePositionHistoryParams extends MobileSocialFeedReadParams {
|
|
1356
|
+
/** Lifecycle UUID. */
|
|
1357
|
+
positionId: string;
|
|
1358
|
+
/** Only published takes when true; defaults to false. */
|
|
1359
|
+
takesOnly?: boolean;
|
|
1360
|
+
/** Opaque history cursor; requires the original position session and viewerToken. */
|
|
1361
|
+
cursor?: string;
|
|
1362
|
+
/** Page size, 1-50; defaults to 20. */
|
|
1363
|
+
limit?: number;
|
|
1364
|
+
/** History session; do not substitute a feed session. */
|
|
1365
|
+
sessionId?: string;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
/** Counts across the authorized position history. */
|
|
1369
|
+
export interface MobileSocialFeedHistorySummary {
|
|
1370
|
+
/** Action count. */
|
|
1371
|
+
actionCount: number;
|
|
1372
|
+
/** Published take count. */
|
|
1373
|
+
takeCount: number;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
/** Estimated liquidation price and its source time. */
|
|
1377
|
+
export interface MobileSocialFeedEstimatedLiquidationLine {
|
|
1378
|
+
/** Decimal price. */
|
|
1379
|
+
price: BigNumber;
|
|
1380
|
+
/** Source time in milliseconds. */
|
|
1381
|
+
asOfMs: number;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
/** Half-open chart range, preserved across pages. */
|
|
1385
|
+
export interface MobileSocialFeedChartRange {
|
|
1386
|
+
/** Inclusive start in milliseconds. */
|
|
1387
|
+
fromMs: number;
|
|
1388
|
+
/** Exclusive end in milliseconds. */
|
|
1389
|
+
toMs: number;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
/** Parameters for position candles and action markers. */
|
|
1393
|
+
export interface GetMobilePositionChartParams extends MobileSocialFeedReadParams {
|
|
1394
|
+
/** Lifecycle UUID. */
|
|
1395
|
+
positionId: string;
|
|
1396
|
+
/** Original session, if reusing one; must be paired with viewerToken. */
|
|
1397
|
+
sessionId?: string;
|
|
1398
|
+
/** Candle interval. */
|
|
1399
|
+
interval: MobileSocialFeedChartInterval;
|
|
1400
|
+
/** Half-open time range; preserve it when paging. */
|
|
1401
|
+
range: MobileSocialFeedChartRange;
|
|
1402
|
+
/** Exclusive candle upper bound for subsequent pages. */
|
|
1403
|
+
beforeMs?: number;
|
|
1404
|
+
/** Candle count, 1-500; defaults to 200. */
|
|
1405
|
+
limit?: number;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
/** Unsigned, page-scoped presence registration using the original reading credential. */
|
|
1409
|
+
export interface MobilePositionPresenceParams {
|
|
1410
|
+
/** Lifecycle UUID authorized by the session. */
|
|
1411
|
+
positionId: string;
|
|
1412
|
+
/** Original reading session. */
|
|
1413
|
+
sessionId: string;
|
|
1414
|
+
/** Original browsing credential; determines visitor deduplication. */
|
|
1415
|
+
viewerToken: string;
|
|
1416
|
+
/** UUID generated per page, retained for that page's lifetime. */
|
|
1417
|
+
viewSessionId: string;
|
|
1418
|
+
/** Enter, renew, or leave the page. */
|
|
1419
|
+
state: MobileSocialFeedPresenceState;
|
|
1420
|
+
/** Self-reported display account: omission preserves it, null clears it. Not authentication. */
|
|
1421
|
+
watcherSubaccount?: Subaccount | null;
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
/** Parameters for read-only watcher counts; this query never registers presence. */
|
|
1425
|
+
export interface GetMobilePositionWatchersParams {
|
|
1426
|
+
/** Lifecycle UUID. */
|
|
1427
|
+
positionId: string;
|
|
1428
|
+
/** Optional relationship perspective, not a watcher registration. */
|
|
1429
|
+
viewAs?: Subaccount;
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
/** Open position candidates for a selected identity. */
|
|
1433
|
+
export interface MobileSocialFeedPositionsPage {
|
|
1434
|
+
/** Current candidates and eligibility hints. */
|
|
1435
|
+
positions: MobileSocialFeedPublishablePosition[];
|
|
1436
|
+
/** Next opaque cursor, or null. */
|
|
1437
|
+
nextCursor: string | null;
|
|
1438
|
+
/** Observation time in milliseconds. */
|
|
1439
|
+
asOfMs: number;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
/** Position command result, including normal empty/unknown outcomes. */
|
|
1443
|
+
export interface MobileSocialFeedPositionResolutionResult {
|
|
1444
|
+
/** Resolution outcome. */
|
|
1445
|
+
resolution: MobileSocialFeedPositionResolution;
|
|
1446
|
+
/** Resolved market, or null for an unknown or unconstrained market. */
|
|
1447
|
+
product: MobileSocialFeedMarket | null;
|
|
1448
|
+
/** Eligible open position candidates. */
|
|
1449
|
+
candidates: MobileSocialFeedPublishablePosition[];
|
|
1450
|
+
/** Explanation for no position or unknown market. */
|
|
1451
|
+
reason: MobileSocialFeedPositionResolutionReason | null;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
/** Trusted order actions; pending is distinct from a source failure. */
|
|
1455
|
+
export interface MobileSocialFeedActionResolutionResult {
|
|
1456
|
+
/** Requested order digest. */
|
|
1457
|
+
orderDigest: Hex;
|
|
1458
|
+
/** Ready when all currently confirmed segments have been projected. */
|
|
1459
|
+
resolution: MobileSocialFeedActionResolution;
|
|
1460
|
+
/** All trusted segments, or an empty array when pending. */
|
|
1461
|
+
actions: MobileSocialFeedActionCandidate[];
|
|
1462
|
+
/** Observation time in milliseconds. */
|
|
1463
|
+
asOfMs: number;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
/** Readable drawing and parent display version; drawing data is already parsed. */
|
|
1467
|
+
export interface MobileSocialFeedDrawingResult {
|
|
1468
|
+
/** Parent item UUID. */
|
|
1469
|
+
itemId: string;
|
|
1470
|
+
/** Current parent display version. */
|
|
1471
|
+
itemVersion: string;
|
|
1472
|
+
/** Null when the readable parent has no drawing. */
|
|
1473
|
+
drawing: MobileSocialFeedDrawing | null;
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
/** Saved drawing returned by successful creation or replacement. */
|
|
1477
|
+
export interface MobileSocialFeedDrawingMutationResult {
|
|
1478
|
+
/** Parent item UUID. */
|
|
1479
|
+
itemId: string;
|
|
1480
|
+
/** Post-mutation parent display version. */
|
|
1481
|
+
itemVersion: string;
|
|
1482
|
+
/** Saved parsed drawing. */
|
|
1483
|
+
drawing: MobileSocialFeedDrawing;
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
/** Comment thread page, including both directions around an anchor. */
|
|
1487
|
+
export interface MobileSocialFeedCommentsPage {
|
|
1488
|
+
/** Requested anchor, or null when reading without one. */
|
|
1489
|
+
anchorReplyId: string | null;
|
|
1490
|
+
/** Readable replies in service order. */
|
|
1491
|
+
comments: MobileSocialFeedReply[];
|
|
1492
|
+
/** Total readable comment count. */
|
|
1493
|
+
totalCount: number;
|
|
1494
|
+
/** Forward cursor, or null. */
|
|
1495
|
+
nextCursor: string | null;
|
|
1496
|
+
/** Backward cursor, or null. */
|
|
1497
|
+
previousCursor: string | null;
|
|
1498
|
+
/** Original or newly created reading session. */
|
|
1499
|
+
readSession: MobileSocialFeedReadSession;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
/** Atomic comment publication result. */
|
|
1503
|
+
export interface MobileSocialFeedCommentResult {
|
|
1504
|
+
/** Published reply. */
|
|
1505
|
+
comment: MobileSocialFeedReply;
|
|
1506
|
+
/** Post-commit root comment count. */
|
|
1507
|
+
rootCommentCount: number;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
/** Authoritative post-mutation like state. */
|
|
1511
|
+
export interface MobileSocialFeedLikeResult {
|
|
1512
|
+
/** Item UUID. */
|
|
1513
|
+
itemId: string;
|
|
1514
|
+
/** Desired applied state. */
|
|
1515
|
+
isLiked: boolean;
|
|
1516
|
+
/** Post-mutation count. */
|
|
1517
|
+
likeCount: number;
|
|
1518
|
+
/** Item display version. */
|
|
1519
|
+
version: string;
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
/** Exposure deduplication result for the current UTC day. */
|
|
1523
|
+
export interface MobileSocialFeedViewsResult {
|
|
1524
|
+
/** Newly counted item UUIDs. */
|
|
1525
|
+
acceptedItemIds: string[];
|
|
1526
|
+
/** Already counted item UUIDs. */
|
|
1527
|
+
duplicateItemIds: string[];
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
/** Full position history and viewing-account trading hints. */
|
|
1531
|
+
export interface MobileSocialFeedPositionHistory {
|
|
1532
|
+
/** Position and additional history metrics. */
|
|
1533
|
+
position: MobileSocialFeedPositionHistoryCard;
|
|
1534
|
+
/** Whole-history counts. */
|
|
1535
|
+
summary: MobileSocialFeedHistorySummary;
|
|
1536
|
+
/** Ordered actions and takes; no synthesized items. */
|
|
1537
|
+
timeline: MobileSocialFeedTimelineEntry[];
|
|
1538
|
+
/** Next cursor, or null. */
|
|
1539
|
+
nextCursor: string | null;
|
|
1540
|
+
/** Completeness, independent of whether any items were published. */
|
|
1541
|
+
historyQuality: MobileSocialFeedHistoryQuality;
|
|
1542
|
+
/** Position-mode session for navigation, updates, and statistics. */
|
|
1543
|
+
readSession: MobileSocialFeedReadSession;
|
|
1544
|
+
/** Hints only; actual trading requires authentication. */
|
|
1545
|
+
tradingContext: MobileSocialFeedTradingContext;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
/** Candle page and event-price markers, independent of drawing data. */
|
|
1549
|
+
export interface MobileSocialFeedPositionChart {
|
|
1550
|
+
/** Candles in descending timestamp order. */
|
|
1551
|
+
candles: MobileSocialFeedCandle[];
|
|
1552
|
+
/** Actions, retaining markers whose price is unknown. */
|
|
1553
|
+
actionMarkers: MobileSocialFeedActionMarker[];
|
|
1554
|
+
/** Estimated price, never substituted for execution or Oracle event prices. */
|
|
1555
|
+
estimatedLiquidationLine: MobileSocialFeedEstimatedLiquidationLine | null;
|
|
1556
|
+
/** Exclusive candle upper bound for the next page. */
|
|
1557
|
+
nextBeforeMs: number | null;
|
|
1558
|
+
/** Observation time in milliseconds. */
|
|
1559
|
+
asOfMs: number;
|
|
1560
|
+
/** Reliability of this response. */
|
|
1561
|
+
dataQuality: MobileSocialFeedChartDataQuality;
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
/** Current visitor count and self-reported public account previews. */
|
|
1565
|
+
export interface MobileSocialFeedWatchers {
|
|
1566
|
+
/** Distinct active browsing credentials, not unique accounts. */
|
|
1567
|
+
watcherCount: number;
|
|
1568
|
+
/** Deduplicated self-reported accounts; may be fewer than watcherCount. */
|
|
1569
|
+
watcherPreview: MobileSocialFeedAuthor[];
|
|
1570
|
+
/** Observation time in milliseconds. */
|
|
1571
|
+
asOfMs: number;
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
/** Presence result; does not include an observation timestamp. */
|
|
1575
|
+
export interface MobileSocialFeedPresence {
|
|
1576
|
+
/** Distinct active browsing credentials. */
|
|
1577
|
+
watcherCount: number;
|
|
1578
|
+
/** Self-reported account previews, not authenticated visitors. */
|
|
1579
|
+
watcherPreview: MobileSocialFeedAuthor[];
|
|
1580
|
+
/** Recommended heartbeat cadence in seconds. */
|
|
1581
|
+
heartbeatIntervalSeconds: number;
|
|
1582
|
+
/** Remaining lease lifetime in seconds. */
|
|
1583
|
+
expiresInSeconds: number;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
/** Mention input, using the same structured subaccount convention as other signed SDK inputs. */
|
|
1587
|
+
export interface MobileSocialFeedMentionParams extends Omit<
|
|
1588
|
+
MobileSocialFeedMention,
|
|
1589
|
+
'subaccount'
|
|
1590
|
+
> {
|
|
1591
|
+
/** Mentioned identity; serialized to bytes32 for signing. */
|
|
1592
|
+
subaccount: Subaccount;
|
|
1593
|
+
}
|