@nadohq/mobile-client 0.64.0 → 0.66.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 +124 -7
- package/dist/MobileClient-M4oC4lrX.cjs +1101 -0
- package/dist/MobileClient-M4oC4lrX.cjs.map +1 -0
- package/dist/MobileClient.cjs +1 -1
- package/dist/MobileClient.d.cts +306 -10
- package/dist/MobileClient.d.cts.map +1 -1
- package/dist/MobileClient.d.ts +306 -10
- package/dist/MobileClient.d.ts.map +1 -1
- package/dist/MobileClient.js +544 -5
- package/dist/MobileClient.js.map +1 -1
- package/dist/{MobileServerFailureError-Dd3c6P_Z.d.ts → MobileServerFailureError-C9iqNsxI.d.ts} +2 -3
- package/dist/MobileServerFailureError-C9iqNsxI.d.ts.map +1 -0
- package/dist/{MobileServerFailureError-Bpa_WA9f.d.cts → MobileServerFailureError-MtS2reel.d.cts} +2 -3
- package/dist/MobileServerFailureError-MtS2reel.d.cts.map +1 -0
- 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/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.cts +15 -0
- package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.cts.map +1 -0
- package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.ts +15 -0
- package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.ts.map +1 -0
- package/dist/{buildSignedMobileRequest-Cb1T74xV.d.ts → buildSignedMobileRequest-BR-KJhIF.d.ts} +2 -2
- package/dist/{buildSignedMobileRequest-Cb1T74xV.d.ts.map → buildSignedMobileRequest-BR-KJhIF.d.ts.map} +1 -1
- package/dist/{buildSignedMobileRequest-NHbMAPzd.d.cts → buildSignedMobileRequest-DyKCK34Y.d.cts} +2 -2
- package/dist/{buildSignedMobileRequest-NHbMAPzd.d.cts.map → buildSignedMobileRequest-DyKCK34Y.d.cts.map} +1 -1
- package/dist/{canonicalize-BBYGh17w.d.ts → canonicalize-Bv6UIAbR.d.ts} +2 -2
- package/dist/canonicalize-Bv6UIAbR.d.ts.map +1 -0
- package/dist/{canonicalize-BF_SiNvO.d.cts → canonicalize-CWh3XZzj.d.cts} +2 -2
- package/dist/canonicalize-CWh3XZzj.d.cts.map +1 -0
- package/dist/clientTypes-BUn5_OzK.d.ts +1665 -0
- package/dist/clientTypes-BUn5_OzK.d.ts.map +1 -0
- package/dist/clientTypes-DOpUcu80.d.cts +1665 -0
- package/dist/clientTypes-DOpUcu80.d.cts.map +1 -0
- package/dist/dataMappers.cjs +691 -14
- package/dist/dataMappers.cjs.map +1 -1
- package/dist/dataMappers.d.cts +254 -8
- package/dist/dataMappers.d.cts.map +1 -1
- package/dist/dataMappers.d.ts +254 -8
- package/dist/dataMappers.d.ts.map +1 -1
- package/dist/dataMappers.js +651 -15
- package/dist/dataMappers.js.map +1 -1
- package/dist/{eip712MethodByType-BSx11xG-.d.cts → eip712MethodByType-CJ6BoayT.d.cts} +2 -2
- package/dist/eip712MethodByType-CJ6BoayT.d.cts.map +1 -0
- package/dist/{eip712MethodByType-DkiAjCLs.d.ts → eip712MethodByType-Dx4mvgni.d.ts} +2 -2
- package/dist/eip712MethodByType-Dx4mvgni.d.ts.map +1 -0
- package/dist/{feed-DTJlsg8W.d.ts → feed-DErOLaoY.d.cts} +4 -2
- package/dist/feed-DErOLaoY.d.cts.map +1 -0
- package/dist/{feed-DTJlsg8W.d.cts → feed-DErOLaoY.d.ts} +4 -2
- package/dist/feed-DErOLaoY.d.ts.map +1 -0
- package/dist/index.cjs +9 -2
- package/dist/index.d.cts +15 -16
- package/dist/index.d.ts +15 -16
- package/dist/index.js +5 -3
- package/dist/{mobileErrorCodes-3LtreeZM.d.ts → mobileErrorCodes-vD6rbFuF.d.cts} +25 -6
- package/dist/mobileErrorCodes-vD6rbFuF.d.cts.map +1 -0
- package/dist/{mobileErrorCodes-3LtreeZM.d.cts → mobileErrorCodes-vD6rbFuF.d.ts} +25 -6
- package/dist/mobileErrorCodes-vD6rbFuF.d.ts.map +1 -0
- package/dist/{payloadHash-BOWGjqdb.d.cts → payloadHash-CdkF2Ocr.d.cts} +2 -2
- package/dist/payloadHash-CdkF2Ocr.d.cts.map +1 -0
- package/dist/{payloadHash-Bzf4CtjV.d.ts → payloadHash-HD29K77M.d.ts} +2 -2
- package/dist/payloadHash-HD29K77M.d.ts.map +1 -0
- package/dist/serverExecuteTypes-5JyyIXRK.d.ts +178 -0
- package/dist/serverExecuteTypes-5JyyIXRK.d.ts.map +1 -0
- package/dist/serverExecuteTypes-CHrQ9Rtq.d.cts +178 -0
- package/dist/serverExecuteTypes-CHrQ9Rtq.d.cts.map +1 -0
- package/dist/serverModelTypes-CGUZCi0y.d.cts +938 -0
- package/dist/serverModelTypes-CGUZCi0y.d.cts.map +1 -0
- package/dist/serverModelTypes-CGUZCi0y.d.ts +938 -0
- package/dist/serverModelTypes-CGUZCi0y.d.ts.map +1 -0
- package/dist/{serverResponseGuards-BU1Xv_tG.d.ts → serverResponseGuards-Bvw8ltYJ.d.ts} +2 -2
- package/dist/{serverResponseGuards-BU1Xv_tG.d.ts.map → serverResponseGuards-Bvw8ltYJ.d.ts.map} +1 -1
- package/dist/{serverResponseGuards-Dkdok0Sm.d.cts → serverResponseGuards-i1njcYKN.d.cts} +2 -2
- package/dist/{serverResponseGuards-Dkdok0Sm.d.cts.map → serverResponseGuards-i1njcYKN.d.cts.map} +1 -1
- package/dist/signing/buildSignedMobileRequest.d.cts +1 -1
- package/dist/signing/buildSignedMobileRequest.d.ts +1 -1
- package/dist/signing/canonicalize.cjs +86 -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 +86 -0
- package/dist/signing/canonicalize.js.map +1 -1
- package/dist/signing/eip712MethodByType.cjs +12 -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 +12 -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.cjs +1 -1
- package/dist/signing/payloadHash.d.cts +1 -1
- package/dist/signing/payloadHash.d.ts +1 -1
- package/dist/signing/payloadHash.js +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/MobileUnsupportedNotificationRouteError.cjs +19 -0
- package/dist/types/MobileUnsupportedNotificationRouteError.cjs.map +1 -0
- package/dist/types/MobileUnsupportedNotificationRouteError.d.cts +2 -0
- package/dist/types/MobileUnsupportedNotificationRouteError.d.ts +2 -0
- package/dist/types/MobileUnsupportedNotificationRouteError.js +18 -0
- package/dist/types/MobileUnsupportedNotificationRouteError.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 +6 -0
- package/dist/types/index.d.cts +9 -9
- package/dist/types/index.d.ts +9 -9
- package/dist/types/index.js +4 -2
- package/dist/types/mobileErrorCodes.cjs +39 -1
- 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 +39 -1
- 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 +15 -0
- 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 +14 -1
- 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 +2 -2
- package/dist/types/serverRequestTypes.d.ts +2 -2
- package/dist/types-C9YE4EIt.d.cts +794 -0
- package/dist/types-C9YE4EIt.d.cts.map +1 -0
- package/dist/types-Cwy1y_9x.d.ts +794 -0
- package/dist/types-Cwy1y_9x.d.ts.map +1 -0
- package/dist/utils/buildMobileFeedImageMultipart.cjs +31 -0
- package/dist/utils/buildMobileFeedImageMultipart.cjs.map +1 -0
- package/dist/utils/buildMobileFeedImageMultipart.d.cts +15 -0
- package/dist/utils/buildMobileFeedImageMultipart.d.cts.map +1 -0
- package/dist/utils/buildMobileFeedImageMultipart.d.ts +15 -0
- package/dist/utils/buildMobileFeedImageMultipart.d.ts.map +1 -0
- package/dist/utils/buildMobileFeedImageMultipart.js +30 -0
- package/dist/utils/buildMobileFeedImageMultipart.js.map +1 -0
- package/dist/utils/feed.cjs +3 -0
- package/dist/utils/feed.cjs.map +1 -1
- package/dist/utils/feed.d.cts +2 -2
- package/dist/utils/feed.d.ts +2 -2
- package/dist/utils/feed.js +3 -1
- package/dist/utils/feed.js.map +1 -1
- package/dist/utils/index.cjs +2 -1
- package/dist/utils/index.d.cts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +2 -2
- 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 +789 -7
- package/src/dataMappers.test.ts +848 -0
- package/src/dataMappers.ts +924 -17
- package/src/feedImages.test.ts +309 -0
- package/src/notifications.test.ts +950 -0
- package/src/signing/canonicalize.ts +119 -0
- package/src/signing/eip712MethodByType.ts +15 -0
- package/src/signing/signing.test.ts +362 -0
- package/src/signing/types.ts +108 -13
- package/src/socialFeed.test.ts +38 -2
- package/src/types/MobileUnsupportedFeedItemError.ts +18 -0
- package/src/types/MobileUnsupportedNotificationRouteError.ts +16 -0
- package/src/types/clientTypes.ts +1012 -34
- package/src/types/index.ts +2 -0
- package/src/types/mobileErrorCodes.ts +38 -0
- package/src/types/serverExecuteTypes.ts +112 -3
- package/src/types/serverModelTypes.ts +581 -28
- package/src/types/serverQueryTypes.ts +212 -5
- package/src/types/serverRequestTypes.ts +213 -13
- package/src/utils/buildMobileFeedImageMultipart.test.ts +45 -0
- package/src/utils/buildMobileFeedImageMultipart.ts +36 -0
- package/src/utils/feed.ts +3 -0
- package/dist/MobileClient-aDxiM_Kf.cjs +0 -562
- package/dist/MobileClient-aDxiM_Kf.cjs.map +0 -1
- package/dist/MobileServerFailureError-Bpa_WA9f.d.cts.map +0 -1
- package/dist/MobileServerFailureError-Dd3c6P_Z.d.ts.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 +0 -844
- package/dist/clientTypes-BWFKo9oE.d.cts.map +0 -1
- package/dist/clientTypes-DCTiUV0H.d.ts +0 -844
- 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/feed-DTJlsg8W.d.cts.map +0 -1
- package/dist/feed-DTJlsg8W.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/serverBaseTypes-DWf3iGWy.d.ts +0 -25
- package/dist/serverBaseTypes-DWf3iGWy.d.ts.map +0 -1
- package/dist/serverBaseTypes-KREDe2M9.d.cts +0 -25
- package/dist/serverBaseTypes-KREDe2M9.d.cts.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 +0 -508
- package/dist/serverModelTypes-DAqEyYtB.d.cts.map +0 -1
- package/dist/serverModelTypes-DAqEyYtB.d.ts +0 -508
- package/dist/serverModelTypes-DAqEyYtB.d.ts.map +0 -1
- package/dist/serverQueryTypes-BFdwq0Z2.d.ts +0 -171
- package/dist/serverQueryTypes-BFdwq0Z2.d.ts.map +0 -1
- package/dist/serverQueryTypes-DNdMpmDr.d.cts +0 -171
- package/dist/serverQueryTypes-DNdMpmDr.d.cts.map +0 -1
- package/dist/serverRequestTypes-BNA7FCY6.d.ts +0 -200
- package/dist/serverRequestTypes-BNA7FCY6.d.ts.map +0 -1
- package/dist/serverRequestTypes-CxDRFKfv.d.cts +0 -200
- package/dist/serverRequestTypes-CxDRFKfv.d.cts.map +0 -1
- package/dist/types-BCr2G5gS.d.cts +0 -84
- package/dist/types-BCr2G5gS.d.cts.map +0 -1
- package/dist/types-C18k-9Vy.d.ts +0 -84
- package/dist/types-C18k-9Vy.d.ts.map +0 -1
package/dist/MobileClient.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as MobileSignedRequest, i as MobileSignedInnerParams, n as MobileSignedInner, r as MobileSignedInnerByType } from "./types-
|
|
3
|
-
import {
|
|
4
|
-
import { n as MobileServerSuccessResponse } from "./serverBaseTypes-DWf3iGWy.js";
|
|
5
|
-
import { a as MobileServerExecuteSuccessResponse, l as MobileServerPublicExecuteRequest } from "./serverExecuteTypes-DlYZCp1f.js";
|
|
6
|
-
import { c as MobileServerPublicQuerySuccessResponse } from "./serverQueryTypes-BFdwq0Z2.js";
|
|
1
|
+
import { $ as MobileNotificationPreferences, $t as MobileSocialFeedLikeResult, An as MobileSocialFeedViewsResult, Bn as SearchMobileProfilesParams, Bt as MobileSocialFeedDrawingMutationResult, C as GetMobileProfileFeedParams, Ct as MobileSignedRequestParams, D as GetMobileTopTradersFeedParams, E as GetMobileSelfFeedPositionsParams, Et as MobileSocialFeedActionResolutionResult, F as MobileCreateFeedPostParams, Fn as MobileUpdateNotificationSubscriptionsParams, Ft as MobileSocialFeedCommentResult, I as MobileFeedChartDrawingParams, In as MobileUsernameAvailability, It as MobileSocialFeedCommentsPage, Kt as MobileSocialFeedImage, L as MobileFeedImageRequest, M as MobileCreateAvatarUploadParams, Mn as MobileUnregisterExpoTokenParams, N as MobileCreateFeedCommentParams, Nn as MobileUpdateNotificationPreferencesParams, O as GetMobileUsernameAvailabilityParams, On as MobileSocialFeedUpdates, P as MobileCreateFeedImageUploadParams, Pn as MobileUpdateNotificationSettingsV2Params, Qt as MobileSocialFeedItemResponse, Rn as ResolveMobileFeedActionParams, S as GetMobilePositionWatchersParams, St as MobileSetUsernameParams, T as GetMobileRegisteredWalletParams, U as MobileFollowListPage, V as MobileFollowBatchResultItem, Vt as MobileSocialFeedDrawingResult, W as MobileFollowMutationResult, X as MobileNotificationInboxV2, Yt as MobileSocialFeedItem, _ as GetMobileNotificationSettingsV2Params, _t as MobileSetBioParams, a as GetMobileFeedItemParams, b as GetMobilePositionFeedParams, bt as MobileSetFollowParams, cn as MobileSocialFeedPositionHistory, ct as MobileProfileSearchPage, d as GetMobileForYouFeedParams, dn as MobileSocialFeedPositionResolutionResult, dt as MobileRecordFeedViewsParams, et as MobileNotificationRegistrationV2, f as GetMobileFriendsFeedParams, fn as MobileSocialFeedPositionsPage, ft as MobileRecordProductEventsParams, g as GetMobileNotificationRegistrationV2Params, gn as MobileSocialFeedRankedPage, gt as MobileSetAvatarParams, h as GetMobileNotificationPreferencesParams, ht as MobileRegisteredWallet, i as GetMobileFeedImageRequestParams, it as MobileNotificationSubscriptions, j as MobileAvatarUpload, jn as MobileSocialFeedWatchers, k as MobileAvatarPreset, l as GetMobileFollowersParams, m as GetMobileNotificationInboxV2Params, mn as MobileSocialFeedPresence, mt as MobileRegisterExpoTokenV2Params, n as GetMobileFeedCommentsParams, o as GetMobileFeedParams, ot as MobilePositionPresenceParams, p as GetMobileMarketFeedParams, pt as MobileRegisterExpoTokenParams, r as GetMobileFeedImageBytesParams, rn as MobileSocialFeedPage, rt as MobileNotificationSettingsV2, s as GetMobileFeedUpdatesParams, sn as MobileSocialFeedPositionChart, t as GetMobileFeedChartDrawingParams, u as GetMobileFollowingParams, ut as MobilePublicProfile, v as GetMobileNotificationSubscriptionsParams, vt as MobileSetFeedLikeParams, w as GetMobileProfilesParams, x as GetMobilePositionHistoryParams, xn as MobileSocialFeedTopTradersPage, xt as MobileSetPrivateModeParams, y as GetMobilePositionChartParams, yt as MobileSetFollowBatchParams, z as MobileFeedPage, zn as ResolveMobileFeedPositionParams } from "./clientTypes-BUn5_OzK.js";
|
|
2
|
+
import { P as MobileServerPublicQuerySuccessResponse, R as MobileServerSignedQuerySuccessResponse, a as MobileSignedRequest, d as MobileServerPublicExecuteRequestType, et as MobileServerSuccessResponse, f as MobileServerPublicQueryRequestByType, i as MobileSignedInnerParams, n as MobileSignedInner, o as MobileServerExecuteRequestType, p as MobileServerPublicQueryRequestType, r as MobileSignedInnerByType, u as MobileServerPublicExecuteRequestByType, v as MobileServerSignedQueryRequestType } from "./types-Cwy1y_9x.js";
|
|
3
|
+
import { a as MobileServerExecuteSuccessResponse, d as MobileServerPublicExecuteSuccessResponse } from "./serverExecuteTypes-5JyyIXRK.js";
|
|
7
4
|
import { WalletClientWithAccount } from "@nadohq/shared";
|
|
8
5
|
import { AxiosInstance } from "axios";
|
|
9
6
|
|
|
@@ -128,6 +125,7 @@ declare class MobileClient {
|
|
|
128
125
|
* @param params - Filters, pagination, optional viewing account, and browser credential; no signing identity.
|
|
129
126
|
* @returns A fixed-session page with its ranking version and new-content watermark.
|
|
130
127
|
* @throws {MobileServerFailureError} On invalid parameters, session mismatch/expiry, or unavailable data.
|
|
128
|
+
* @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.
|
|
131
129
|
*/
|
|
132
130
|
getForYouFeed(params?: GetMobileForYouFeedParams): Promise<MobileSocialFeedRankedPage>;
|
|
133
131
|
/**
|
|
@@ -136,6 +134,7 @@ declare class MobileClient {
|
|
|
136
134
|
* @param params - Filters, pagination, optional viewing account, and browser credential.
|
|
137
135
|
* @returns A page with its qualification cohort; an unavailable cohort fails instead of returning an empty ranking.
|
|
138
136
|
* @throws {MobileServerFailureError} On request/session errors or unavailable cohort data.
|
|
137
|
+
* @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.
|
|
139
138
|
*/
|
|
140
139
|
getTopTradersFeed(params?: GetMobileTopTradersFeedParams): Promise<MobileSocialFeedTopTradersPage>;
|
|
141
140
|
/**
|
|
@@ -143,6 +142,7 @@ declare class MobileClient {
|
|
|
143
142
|
* @param params - Required viewing account on every request, filters, pagination, and browser credential.
|
|
144
143
|
* @returns A chronological Friends page and reading session.
|
|
145
144
|
* @throws {MobileServerFailureError} On invalid viewing account, session errors, or feed query failure.
|
|
145
|
+
* @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.
|
|
146
146
|
*/
|
|
147
147
|
getFriendsFeed(params: GetMobileFriendsFeedParams): Promise<MobileSocialFeedRankedPage>;
|
|
148
148
|
/**
|
|
@@ -150,6 +150,7 @@ declare class MobileClient {
|
|
|
150
150
|
* @param params - Target identity, filters, pagination, and optional public viewing account.
|
|
151
151
|
* @returns An author page without main-feed ranking or cohort fields.
|
|
152
152
|
* @throws {MobileServerFailureError} On invalid parameters, session errors, or inaccessible content.
|
|
153
|
+
* @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.
|
|
153
154
|
*/
|
|
154
155
|
getProfileFeed(params: GetMobileProfileFeedParams): Promise<MobileSocialFeedPage>;
|
|
155
156
|
/**
|
|
@@ -157,6 +158,7 @@ declare class MobileClient {
|
|
|
157
158
|
* @param params - Product ID, content/size filters, pagination, and public viewing account.
|
|
158
159
|
* @returns A market page without main-feed ranking fields.
|
|
159
160
|
* @throws {MobileServerFailureError} On an unknown market, session errors, or unavailable data.
|
|
161
|
+
* @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.
|
|
160
162
|
*/
|
|
161
163
|
getMarketFeed(params: GetMobileMarketFeedParams): Promise<MobileSocialFeedPage>;
|
|
162
164
|
/**
|
|
@@ -165,14 +167,18 @@ declare class MobileClient {
|
|
|
165
167
|
* @param params - Position UUID, filters, pagination, and public viewing account.
|
|
166
168
|
* @returns A fixed-session position feed page.
|
|
167
169
|
* @throws {MobileServerFailureError} On inaccessible content, session errors, or unavailable data.
|
|
170
|
+
* @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.
|
|
168
171
|
*/
|
|
169
172
|
getPositionFeed(params: GetMobilePositionFeedParams): Promise<MobileSocialFeedPage>;
|
|
170
173
|
/**
|
|
171
174
|
* Reads one item visible to viewAs, including that account's own hidden content.
|
|
172
175
|
* Creates an item session directly when sessionId is omitted.
|
|
173
|
-
* @
|
|
176
|
+
* Pass {@link GetMobileFeedItemParams.viewEventId} when the user navigates into the detail so the
|
|
177
|
+
* subsequent {@link recordFeedViews} call can count that visit; omit it for prefetch.
|
|
178
|
+
* @param params - Item UUID, optional detail-visit event, preview limit, and optional existing session/read identity.
|
|
174
179
|
* @returns The complete item and authorized reading session.
|
|
175
180
|
* @throws {MobileServerFailureError} On inaccessible content or session mismatch/expiry.
|
|
181
|
+
* @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.
|
|
176
182
|
*/
|
|
177
183
|
getFeedItem(params: GetMobileFeedItemParams): Promise<MobileSocialFeedItemResponse>;
|
|
178
184
|
/**
|
|
@@ -194,6 +200,7 @@ declare class MobileClient {
|
|
|
194
200
|
*
|
|
195
201
|
* @throws {MobileServerFailureError} With error code `INVALID_EXPO_TOKEN` if the token is malformed, or is
|
|
196
202
|
* not currently registered to a wallet.
|
|
203
|
+
* @deprecated Use {@link getNotificationSettingsV2} instead.
|
|
197
204
|
*/
|
|
198
205
|
getNotificationPreferences(params: GetMobileNotificationPreferencesParams): Promise<MobileNotificationPreferences>;
|
|
199
206
|
/**
|
|
@@ -207,6 +214,131 @@ declare class MobileClient {
|
|
|
207
214
|
* distinguish those cases.
|
|
208
215
|
*/
|
|
209
216
|
getRegisteredWallet(params: GetMobileRegisteredWalletParams): Promise<MobileRegisteredWallet>;
|
|
217
|
+
/**
|
|
218
|
+
* Lists a selected account's current positions without signing or authenticating ownership.
|
|
219
|
+
* Publication and attachment eligibility are hints that the service rechecks on writes.
|
|
220
|
+
* @param params - Viewing subaccount, optional market filter, page size, and opaque cursor.
|
|
221
|
+
* @returns Current position candidates, their eligibility hints, the next cursor, and observation time.
|
|
222
|
+
* @throws {MobileServerFailureError} On invalid parameters, an unsupported viewing account, or unavailable
|
|
223
|
+
* position data. An account with no open positions returns an empty page instead of an error.
|
|
224
|
+
*/
|
|
225
|
+
getSelfFeedPositions(params: GetMobileSelfFeedPositionsParams): Promise<MobileSocialFeedPositionsPage>;
|
|
226
|
+
/**
|
|
227
|
+
* Resolves a slash command against a selected account without changing the caller's input.
|
|
228
|
+
* @param params - Viewing subaccount, original command text, and optional market disambiguation.
|
|
229
|
+
* @returns The resolution, nullable market, candidate positions, and reason for an empty result.
|
|
230
|
+
* @throws {MobileServerFailureError} On invalid parameters, an unsupported viewing account, or unavailable
|
|
231
|
+
* source data. Unknown markets and accounts without open positions are normal resolution results.
|
|
232
|
+
*/
|
|
233
|
+
resolveFeedPosition(params: ResolveMobileFeedPositionParams): Promise<MobileSocialFeedPositionResolutionResult>;
|
|
234
|
+
/**
|
|
235
|
+
* Resolves every trusted lifecycle segment of an order without requiring a signature.
|
|
236
|
+
* @param params - Order-owning subaccount and order digest; selecting the account is not authentication.
|
|
237
|
+
* @returns Trusted action candidates and their observation time, or a pending result with no actions.
|
|
238
|
+
* @throws {MobileServerFailureError} On invalid parameters, an inaccessible order, or unavailable source
|
|
239
|
+
* data. Pending projection is a successful result, not a source failure.
|
|
240
|
+
*/
|
|
241
|
+
resolveFeedAction(params: ResolveMobileFeedActionParams): Promise<MobileSocialFeedActionResolutionResult>;
|
|
242
|
+
/**
|
|
243
|
+
* Reads a drawing publicly without issuing a reading session. Supplied sessions retain their scope.
|
|
244
|
+
* @param params - Parent item, optional viewing account, and optional original session and viewer token.
|
|
245
|
+
* @returns The parent ID and version, with a nullable drawing whose data may legitimately be false or zero.
|
|
246
|
+
* @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, unavailable data,
|
|
247
|
+
* or `SOCIAL_FEED_DRAWING_UNAVAILABLE` when the parent is inaccessible. A readable parent without a drawing
|
|
248
|
+
* returns null. Acquire a new reading session when the original has expired.
|
|
249
|
+
*/
|
|
250
|
+
getFeedChartDrawing(params: GetMobileFeedChartDrawingParams): Promise<MobileSocialFeedDrawingResult>;
|
|
251
|
+
/**
|
|
252
|
+
* Resolves a backend feed image path against this client's mobile gateway URL.
|
|
253
|
+
* @param path - Backend path from image metadata, rooted at /v1/mobile or the mobile service root.
|
|
254
|
+
* @returns An absolute URL suitable for authenticated fetches.
|
|
255
|
+
*/
|
|
256
|
+
resolveFeedImageUrl(path: string): string;
|
|
257
|
+
/**
|
|
258
|
+
* Prepares a protected image request for native image components without downloading or encoding bytes.
|
|
259
|
+
* Does not count as a detail visit or recorded view.
|
|
260
|
+
* @param params - Image path from metadata plus the original session credentials.
|
|
261
|
+
* @returns Absolute URL and headers; pass them as the image source's URI and headers.
|
|
262
|
+
*/
|
|
263
|
+
getFeedImageRequest(params: GetMobileFeedImageRequestParams): MobileFeedImageRequest;
|
|
264
|
+
/**
|
|
265
|
+
* Fetches protected feed image bytes using the reading session that fully delivered the parent item.
|
|
266
|
+
* Does not count as a detail visit or recorded view.
|
|
267
|
+
* @param params - Image path from metadata plus the original session credentials.
|
|
268
|
+
* @returns Raw image bytes.
|
|
269
|
+
* @throws {MobileServerFailureError} On session, permission, or availability errors.
|
|
270
|
+
*/
|
|
271
|
+
getFeedImageBytes(params: GetMobileFeedImageBytesParams): Promise<Uint8Array>;
|
|
272
|
+
/**
|
|
273
|
+
* Reads a comment thread with an optional anchor and bidirectional pagination.
|
|
274
|
+
* Independent reads create a public-only session; reused sessions retain their original scope.
|
|
275
|
+
* @param params - Root item, optional anchor or cursor (mutually exclusive), page size, and read perspective.
|
|
276
|
+
* Paging requires the original session and viewer token.
|
|
277
|
+
* @returns Replies, total count, forward and backward cursors, the anchor, and the actual reading session.
|
|
278
|
+
* @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, inaccessible content,
|
|
279
|
+
* or unavailable data. Restart pagination with a new session after expiry; do not reuse the old cursor.
|
|
280
|
+
*/
|
|
281
|
+
getFeedComments(params: GetMobileFeedCommentsParams): Promise<MobileSocialFeedCommentsPage>;
|
|
282
|
+
/**
|
|
283
|
+
* Reads the full position lifecycle and creates or reuses a position session.
|
|
284
|
+
* Unlike getPositionFeed, this includes lifecycle actions as well as published takes.
|
|
285
|
+
* @param params - Position, optional takes-only filter, pagination, and read perspective. Paging requires
|
|
286
|
+
* the original position session and viewer token, not a feed session.
|
|
287
|
+
* @returns Position metrics, ordered action/take history, summary, trading hints, cursor, and reading session.
|
|
288
|
+
* @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, inaccessible content,
|
|
289
|
+
* or unavailable source data. Restart with a new position session after expiry.
|
|
290
|
+
* @throws {MobileUnsupportedFeedItemError} If a timeline entry or take has an unsupported kind.
|
|
291
|
+
*/
|
|
292
|
+
getPositionHistory(params: GetMobilePositionHistoryParams): Promise<MobileSocialFeedPositionHistory>;
|
|
293
|
+
/**
|
|
294
|
+
* Reads candles and action markers without creating a reading session.
|
|
295
|
+
* Preserve the original range, interval, and read perspective when paging with nextBeforeMs.
|
|
296
|
+
* @param params - Position, candle interval, half-open time range, pagination, and optional original session
|
|
297
|
+
* and viewer token. An independent read omits both session credentials.
|
|
298
|
+
* @returns Candles with decimal prices and x18 volume, action markers, a nullable liquidation line, and paging metadata.
|
|
299
|
+
* @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, inaccessible content,
|
|
300
|
+
* or wholly unavailable chart sources. Partially available data is returned with its quality indicator.
|
|
301
|
+
*/
|
|
302
|
+
getPositionChart(params: GetMobilePositionChartParams): Promise<MobileSocialFeedPositionChart>;
|
|
303
|
+
/**
|
|
304
|
+
* Reads active visitor counts and self-reported account previews without registering presence.
|
|
305
|
+
* @param params - Position and optional viewing account, used only for preview relationship information.
|
|
306
|
+
* @returns The visitor count, public account previews, and observation time; previews need not match the count.
|
|
307
|
+
* @throws {MobileServerFailureError} On invalid parameters, an unavailable position, or unavailable source data.
|
|
308
|
+
*/
|
|
309
|
+
getPositionWatchers(params: GetMobilePositionWatchersParams): Promise<MobileSocialFeedWatchers>;
|
|
310
|
+
/**
|
|
311
|
+
* Reads the token's latest registration generation and saved capabilities, including legacy v1 registrations.
|
|
312
|
+
* @param params - Active Expo token credential; no wallet signature is needed.
|
|
313
|
+
* @returns Saved generation as an opaque string and the complete capability declaration.
|
|
314
|
+
* @throws {MobileServerFailureError} If the token is invalid or inactive (`INVALID_EXPO_TOKEN`).
|
|
315
|
+
*/
|
|
316
|
+
getNotificationRegistrationV2(params: GetMobileNotificationRegistrationV2Params): Promise<MobileNotificationRegistrationV2>;
|
|
317
|
+
/**
|
|
318
|
+
* Reads the wallet's full v2 settings document, including legacy preference mappings.
|
|
319
|
+
* @param params - Active Expo token credential. Before displaying settings, compare the wallet returned by
|
|
320
|
+
* {@link MobileClient.getRegisteredWallet} with the connected wallet (case-insensitively).
|
|
321
|
+
* @returns CamelCase settings with the current settings revision.
|
|
322
|
+
* @throws {MobileServerFailureError} If the token is invalid or inactive (`INVALID_EXPO_TOKEN`).
|
|
323
|
+
*/
|
|
324
|
+
getNotificationSettingsV2(params: GetMobileNotificationSettingsV2Params): Promise<MobileNotificationSettingsV2>;
|
|
325
|
+
/**
|
|
326
|
+
* Reads wallet market subscriptions and the signing Identity's enabled trader bells.
|
|
327
|
+
* @param params - Wallet authentication context; no Expo token is needed.
|
|
328
|
+
* @returns Subscriptions, import state, and the independent subscription revision.
|
|
329
|
+
* @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.
|
|
330
|
+
* @throws {MobileServerFailureError} If authentication or the query fails.
|
|
331
|
+
*/
|
|
332
|
+
getNotificationSubscriptions(params: GetMobileNotificationSubscriptionsParams): Promise<MobileNotificationSubscriptions>;
|
|
333
|
+
/**
|
|
334
|
+
* Reads private accepted notification intents, not delivery receipts or read states.
|
|
335
|
+
* @param params - Wallet authentication and optional cursor/page size (1-50, default 20).
|
|
336
|
+
* @returns A camelCase page; discard cached pages and cursors when switching wallets.
|
|
337
|
+
* @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.
|
|
338
|
+
* @throws {MobileServerFailureError} If authentication or pagination validation fails.
|
|
339
|
+
* @throws {MobileUnsupportedNotificationRouteError} If a notification has an unsupported route name.
|
|
340
|
+
*/
|
|
341
|
+
getNotificationInboxV2(params: GetMobileNotificationInboxV2Params): Promise<MobileNotificationInboxV2>;
|
|
210
342
|
/**
|
|
211
343
|
* Unregisters an Expo push token, stopping delivery to that device. Unsigned, so it still works at logout
|
|
212
344
|
* when a wallet signature may no longer be obtainable. Idempotent: unregistering an inactive or unknown
|
|
@@ -229,8 +361,40 @@ declare class MobileClient {
|
|
|
229
361
|
*
|
|
230
362
|
* @throws {MobileServerFailureError} With error code `INVALID_PREFERENCES` if those rules are violated, or
|
|
231
363
|
* `INVALID_EXPO_TOKEN` if the token is malformed or is not currently registered to a wallet.
|
|
364
|
+
* @deprecated Use {@link updateNotificationSettingsV2} instead.
|
|
232
365
|
*/
|
|
233
366
|
updateNotificationPreferences(params: MobileUpdateNotificationPreferencesParams): Promise<MobileServerSuccessResponse>;
|
|
367
|
+
/**
|
|
368
|
+
* Replaces all v2 settings fields using optimistic concurrency; legacy overlapping preferences are synced.
|
|
369
|
+
* @param params - Active Expo token, latest settings revision, and complete replacement settings.
|
|
370
|
+
* @returns The saved settings document with its incremented revision.
|
|
371
|
+
* @throws {MobileServerFailureError} On invalid token/settings or revision conflict (`NOTIFICATION_REVISION_CONFLICT`). Re-read and
|
|
372
|
+
* merge only the user's current change before retrying; never blindly replay a stale document.
|
|
373
|
+
*/
|
|
374
|
+
updateNotificationSettingsV2(params: MobileUpdateNotificationSettingsV2Params): Promise<MobileNotificationSettingsV2>;
|
|
375
|
+
/**
|
|
376
|
+
* Reports a detail visit without signing. Feed-list card impressions and previews do not count.
|
|
377
|
+
* After the primary detail target is shown in the foreground, send the same viewEventId previously
|
|
378
|
+
* registered through {@link getFeedItem}, together with that response's sessionId and viewerToken.
|
|
379
|
+
* Reuse the event ID on retries for the same visit; generate a new one only after leaving and re-entering.
|
|
380
|
+
* @param params - Original reading session and viewer token, the registered detail-visit event, and exactly
|
|
381
|
+
* one fully delivered, readable detail-target item ID.
|
|
382
|
+
* @returns Separate lists of newly accepted and already-counted item IDs for that event.
|
|
383
|
+
* @throws {MobileServerFailureError} On invalid parameters, an unregistered or rebound event
|
|
384
|
+
* (`SOCIAL_FEED_VIEW_EVENT_REBOUND`), session mismatch or expiry, or an ineligible item.
|
|
385
|
+
* Acquire a new session after expiry, re-register the same event via getFeedItem, then retry.
|
|
386
|
+
*/
|
|
387
|
+
recordFeedViews(params: MobileRecordFeedViewsParams): Promise<MobileSocialFeedViewsResult>;
|
|
388
|
+
/**
|
|
389
|
+
* Registers, renews, or leaves a page lease without signing or authenticating the displayed account.
|
|
390
|
+
* Omitting watcherSubaccount preserves its value; null clears it. This operation does not record item views.
|
|
391
|
+
* @param params - Authorized position, original session and viewer token, page-scoped viewSessionId,
|
|
392
|
+
* lease state, and optional self-reported display account. Retain viewSessionId for the lifetime of the page.
|
|
393
|
+
* @returns Visitor count, public previews, recommended heartbeat interval, and remaining lease lifetime.
|
|
394
|
+
* @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, or an inaccessible
|
|
395
|
+
* position. Rejected requests leave leases unchanged; acquire a new reading session after expiry.
|
|
396
|
+
*/
|
|
397
|
+
setPositionPresence(params: MobilePositionPresenceParams): Promise<MobileSocialFeedPresence>;
|
|
234
398
|
/**
|
|
235
399
|
* Updates the biography, or clears it when the text is whitespace-only.
|
|
236
400
|
*
|
|
@@ -282,13 +446,41 @@ declare class MobileClient {
|
|
|
282
446
|
setPrivateMode(params: MobileSetPrivateModeParams): Promise<MobileServerSuccessResponse>;
|
|
283
447
|
/**
|
|
284
448
|
* Registers an Expo push token for the wallet, transferring active ownership of the token if another
|
|
285
|
-
* wallet had registered it.
|
|
449
|
+
* wallet had registered it. Each registration advances its generation and cancels old pending deliveries.
|
|
450
|
+
* This legacy method replaces capabilities with v1; use registerExpoTokenV2 consistently after upgrading.
|
|
286
451
|
*
|
|
287
452
|
* @throws {MobileServerFailureError} With error code `INVALID_EXPO_TOKEN` if the token is not a valid Expo
|
|
288
453
|
* push token, or `INVALID_DEVICE_METADATA` if `locale` (max 35 chars) or `appVersion` (max 64 chars) is
|
|
289
454
|
* too long.
|
|
455
|
+
* @deprecated Use {@link registerExpoTokenV2} instead.
|
|
290
456
|
*/
|
|
291
457
|
registerExpoToken(params: MobileRegisterExpoTokenParams): Promise<MobileServerSuccessResponse>;
|
|
458
|
+
/**
|
|
459
|
+
* Registers a device with its actual v2 capabilities; do not use repeated registration as a heartbeat.
|
|
460
|
+
* @param params - Wallet authentication, Expo token, metadata, and supported notification types/routes.
|
|
461
|
+
* @returns Success only; query registration separately for its new generation.
|
|
462
|
+
* @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.
|
|
463
|
+
* @throws {MobileServerFailureError} On `INVALID_EXPO_TOKEN`, `INVALID_DEVICE_METADATA`,
|
|
464
|
+
* `NOTIFICATION_DEVICE_LIMIT` when the wallet already has 32 active devices, or authentication errors.
|
|
465
|
+
*/
|
|
466
|
+
registerExpoTokenV2(params: MobileRegisterExpoTokenV2Params): Promise<MobileServerSuccessResponse>;
|
|
467
|
+
/**
|
|
468
|
+
* Applies exactly one bell, market, or one-time favorites-import operation.
|
|
469
|
+
* @param params - Wallet authentication and subscription update with the latest subscription revision.
|
|
470
|
+
* @returns Success only; re-query subscriptions for the new revision even after a repeated ON/OFF.
|
|
471
|
+
* @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.
|
|
472
|
+
* @throws {MobileServerFailureError} On `NOTIFICATION_REVISION_CONFLICT`, `INVALID_NOTIFICATION_REQUEST`, or
|
|
473
|
+
* `INVALID_IDENTITY_TARGET`.
|
|
474
|
+
*/
|
|
475
|
+
updateNotificationSubscriptions(params: MobileUpdateNotificationSubscriptionsParams): Promise<MobileServerSuccessResponse>;
|
|
476
|
+
/**
|
|
477
|
+
* Atomically records 1-50 analytics events after the user has consented to analytics.
|
|
478
|
+
* @param params - Wallet authentication and events with stable UUIDs and actual millisecond timestamps.
|
|
479
|
+
* @returns Success only; reuse event IDs on retries. Notification clicks do not mark an inbox item as read.
|
|
480
|
+
* @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.
|
|
481
|
+
* @throws {MobileServerFailureError} If any event, timestamp, batch size, or notification ownership is invalid.
|
|
482
|
+
*/
|
|
483
|
+
recordProductEvents(params: MobileRecordProductEventsParams): Promise<MobileServerSuccessResponse>;
|
|
292
484
|
/**
|
|
293
485
|
* Sets whether the signing subaccount follows a Profile. Both directions are idempotent: following again
|
|
294
486
|
* keeps the original relationship creation time, so it does not move the account in recency order, and
|
|
@@ -322,14 +514,118 @@ declare class MobileClient {
|
|
|
322
514
|
* is isolated. Either rejects the whole batch before any write, so do not retry it unchanged.
|
|
323
515
|
*/
|
|
324
516
|
setFollowBatch(params: MobileSetFollowBatchParams): Promise<MobileFollowBatchResultItem[]>;
|
|
517
|
+
/**
|
|
518
|
+
* Publishes text, a drawing, or both atomically using the signed author identity.
|
|
519
|
+
* For an idempotent retry, reuse clientRequestId and the exact original content with a valid signature.
|
|
520
|
+
* The SDK does not trim text or reformat the signed drawing JSON.
|
|
521
|
+
* @param params - Author subaccount and signing options, request UUID, owned position, original text and
|
|
522
|
+
* mentions, plus an optional trusted action and original drawing JSON.
|
|
523
|
+
* @returns The published item, including authoritative interaction state and any drawing or comment preview.
|
|
524
|
+
* @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.
|
|
525
|
+
* @throws {MobileServerFailureError} On authentication, ownership, eligibility, content, mention, or drawing
|
|
526
|
+
* errors, or `SOCIAL_FEED_REQUEST_CONFLICT` when a request UUID is reused with different content. Do not
|
|
527
|
+
* change an earlier request to retry it; use a new UUID for a genuinely new publication.
|
|
528
|
+
* @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.
|
|
529
|
+
*/
|
|
530
|
+
createFeedPost(params: MobileCreateFeedPostParams): Promise<MobileSocialFeedItem>;
|
|
531
|
+
/**
|
|
532
|
+
* Uploads one static JPEG/PNG for a later {@link createFeedPost} via multipart execute.
|
|
533
|
+
* The whole HTTP request must stay within 2 MiB including signature overhead; upload one file per call
|
|
534
|
+
* and bind up to nine ready IDs at publication. There is no complete/PUT step — success means ready.
|
|
535
|
+
* @param params - Author subaccount and signing options, plus the original file bytes.
|
|
536
|
+
* @returns Ready image metadata, including original and thumbnail paths.
|
|
537
|
+
* @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.
|
|
538
|
+
* @throws {RangeError} If the complete multipart request exceeds {@link MOBILE_FEED_IMAGE_MAX_REQUEST_BYTES}.
|
|
539
|
+
* @throws {MobileServerFailureError} On authentication, format/size/hash errors (`INVALID_SOCIAL_FEED_IMAGE`),
|
|
540
|
+
* or when publishing is disabled (`SERVICE_UNAVAILABLE`), or image storage is unavailable
|
|
541
|
+
* (`SOCIAL_FEED_DATA_UNAVAILABLE`, 6320, HTTP 503).
|
|
542
|
+
*/
|
|
543
|
+
createFeedPostImageUpload(params: MobileCreateFeedImageUploadParams): Promise<MobileSocialFeedImage>;
|
|
544
|
+
/**
|
|
545
|
+
* Uploads one static JPEG/PNG for a later {@link createFeedComment} via multipart execute.
|
|
546
|
+
* Same size and readiness rules as {@link createFeedPostImageUpload}; comment text remains required.
|
|
547
|
+
* @param params - Author subaccount and signing options, plus the original file bytes.
|
|
548
|
+
* @returns Ready image metadata, including original and thumbnail paths.
|
|
549
|
+
* @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.
|
|
550
|
+
* @throws {RangeError} If the complete multipart request exceeds {@link MOBILE_FEED_IMAGE_MAX_REQUEST_BYTES}.
|
|
551
|
+
* @throws {MobileServerFailureError} On authentication, format/size/hash errors (`INVALID_SOCIAL_FEED_IMAGE`),
|
|
552
|
+
* or when comments are disabled (`SERVICE_UNAVAILABLE`), or image storage is unavailable
|
|
553
|
+
* (`SOCIAL_FEED_DATA_UNAVAILABLE`, 6320, HTTP 503).
|
|
554
|
+
*/
|
|
555
|
+
createFeedCommentImageUpload(params: MobileCreateFeedImageUploadParams): Promise<MobileSocialFeedImage>;
|
|
556
|
+
/**
|
|
557
|
+
* First attaches a drawing to an owned post or trade card while the author still holds its position.
|
|
558
|
+
* The original JSON is signed unchanged; false and zero are valid drawing documents.
|
|
559
|
+
* For an exact retry after a timeout, generate a nonce up front with {@link getMobileNonce} and reuse
|
|
560
|
+
* that nonce and the original JSON before its receive deadline. A fresh nonce is not an exact replay.
|
|
561
|
+
* If a retry returns `SOCIAL_FEED_DRAWING_EXISTS`, use {@link getFeedChartDrawing} to confirm that the
|
|
562
|
+
* stored data matches the intended drawing before treating the original create as successful.
|
|
563
|
+
* @param params - Author subaccount and signing options, parent item, and complete original drawing JSON.
|
|
564
|
+
* @returns The parent ID and updated version together with the stored drawing.
|
|
565
|
+
* @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.
|
|
566
|
+
* @throws {MobileServerFailureError} On authentication, ownership, eligibility, or invalid/oversized drawing
|
|
567
|
+
* errors, an unavailable parent, or `SOCIAL_FEED_DRAWING_EXISTS` for a conflicting existing drawing.
|
|
568
|
+
* Read the existing drawing and use updateFeedChartDrawing when replacement is intended.
|
|
569
|
+
*/
|
|
570
|
+
createFeedChartDrawing(params: MobileFeedChartDrawingParams): Promise<MobileSocialFeedDrawingMutationResult>;
|
|
571
|
+
/**
|
|
572
|
+
* Replaces an existing drawing, including after the associated position has closed.
|
|
573
|
+
* Serialize writes per item and preserve the original JSON text when retrying.
|
|
574
|
+
* @param params - Author subaccount and signing options, parent item, and complete replacement JSON.
|
|
575
|
+
* @returns The parent ID and updated version together with the stored replacement drawing.
|
|
576
|
+
* @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.
|
|
577
|
+
* @throws {MobileServerFailureError} On authentication, ownership, or invalid/oversized drawing errors, an
|
|
578
|
+
* unavailable parent or drawing, or `STALE_SOCIAL_FEED_DRAWING_UPDATE`. Re-read the drawing before retrying
|
|
579
|
+
* a stale or conflicting update instead of blindly replacing newer content.
|
|
580
|
+
*/
|
|
581
|
+
updateFeedChartDrawing(params: MobileFeedChartDrawingParams): Promise<MobileSocialFeedDrawingMutationResult>;
|
|
582
|
+
/**
|
|
583
|
+
* Publishes a comment or reply atomically; an invalid position attachment rejects the entire request.
|
|
584
|
+
* For an idempotent retry, reuse clientRequestId and the unmodified text, mentions, and attachment.
|
|
585
|
+
* @param params - Author subaccount and signing options, request UUID, root item, original nonblank text
|
|
586
|
+
* and mentions, plus an optional reply target in the same thread and currently owned position attachment.
|
|
587
|
+
* @returns The created reply and authoritative root comment count; this write does not create a reading session.
|
|
588
|
+
* @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.
|
|
589
|
+
* @throws {MobileServerFailureError} On authentication, inaccessible content, invalid text/mentions/reply
|
|
590
|
+
* relationships, an ineligible attachment, or `SOCIAL_FEED_REQUEST_CONFLICT`. Correct invalid input before
|
|
591
|
+
* a new submission, and never reuse an existing request UUID with different content.
|
|
592
|
+
*/
|
|
593
|
+
createFeedComment(params: MobileCreateFeedCommentParams): Promise<MobileSocialFeedCommentResult>;
|
|
594
|
+
/**
|
|
595
|
+
* Sets or clears a signed user's like without requiring an open position.
|
|
596
|
+
* Serialize mutations per item and author. Retrying the same isLiked state with a fresh nonce is safe
|
|
597
|
+
* when no newer change intervenes; an unchanged state does not increment the count or version again.
|
|
598
|
+
* Pass the original nonce on a retry before its deadline to avoid overwriting a newer change from
|
|
599
|
+
* another device. Re-read the current state if that retry conflicts.
|
|
600
|
+
* @param params - Acting subaccount and signing options, interactive item, and desired like state.
|
|
601
|
+
* @returns The applied like state, authoritative count, and item version after the mutation.
|
|
602
|
+
* @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.
|
|
603
|
+
* @throws {MobileServerFailureError} On authentication errors, inaccessible or non-interactive content,
|
|
604
|
+
* or `STALE_SOCIAL_FEED_LIKE_UPDATE`. Re-read the current state before submitting a new mutation after a conflict.
|
|
605
|
+
*/
|
|
606
|
+
setFeedLike(params: MobileSetFeedLikeParams): Promise<MobileSocialFeedLikeResult>;
|
|
325
607
|
protected getSignedRequest<T extends MobileSignedInner['type']>(type: T, params: MobileSignedRequestParams, innerParams: MobileSignedInnerParams<T>): Promise<MobileSignedRequest<MobileSignedInnerByType<T>>>;
|
|
326
608
|
protected publicQuery<T extends MobileServerPublicQueryRequestType>(body: {
|
|
327
609
|
type: T;
|
|
328
610
|
} & MobileServerPublicQueryRequestByType[T]): Promise<MobileServerPublicQuerySuccessResponse<T>>;
|
|
329
|
-
protected
|
|
611
|
+
protected publicGetBytes(url: string, headers: Record<string, string>): Promise<Uint8Array>;
|
|
612
|
+
protected publicExecute<T extends MobileServerPublicExecuteRequestType>(body: {
|
|
613
|
+
type: T;
|
|
614
|
+
} & MobileServerPublicExecuteRequestByType[T]): Promise<MobileServerPublicExecuteSuccessResponse<T>>;
|
|
615
|
+
/**
|
|
616
|
+
* Sends an authenticated read through the signed query route.
|
|
617
|
+
* @param body - Canonical inner payload with its signature, sender, and nonce.
|
|
618
|
+
* @returns The successful query envelope and its type-specific payload.
|
|
619
|
+
* @throws {MobileServerFailureError} For a structured service failure, including non-2xx responses.
|
|
620
|
+
*/
|
|
621
|
+
protected query<T extends MobileServerSignedQueryRequestType>(body: MobileSignedRequest & {
|
|
622
|
+
type: T;
|
|
623
|
+
}): Promise<MobileServerSignedQuerySuccessResponse<T>>;
|
|
330
624
|
protected execute<T extends MobileServerExecuteRequestType>(body: MobileSignedRequest & {
|
|
331
625
|
type: T;
|
|
332
|
-
}): Promise<MobileServerExecuteSuccessResponse<T>>;
|
|
626
|
+
}, fileBytes?: Uint8Array): Promise<MobileServerExecuteSuccessResponse<T>>;
|
|
627
|
+
private createFeedImageUpload;
|
|
628
|
+
private checkFeedImageRequestSize;
|
|
333
629
|
/**
|
|
334
630
|
* Validates the HTTP status before interpreting the body. Unlike the engine, the mobile backend returns
|
|
335
631
|
* failure envelopes with non-2xx statuses (e.g. 404 for `PROFILE_NOT_FOUND`), so a non-2xx response with a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileClient.d.ts","names":[],"sources":["../src/src/MobileClient.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MobileClient.d.ts","names":[],"sources":["../src/src/MobileClient.ts"],"mappings":";;;;;;;AAyLA;;;AAAA,UAAiB,gBAAA;EAIf;;;EAAA,GAAA;EAQ2B;;;EAJ3B,YAAA,GAAe,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