@pear-protocol/types 2.12.1 → 2.13.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/dist/auth/payloads.js +2 -2
- package/dist/auth/response.js +2 -2
- package/dist/statistics/entities.d.ts +1 -0
- package/dist/statistics/entities.js +4 -0
- package/dist/statistics/responses.d.ts +1 -0
- package/dist/traders/public.d.ts +5 -1
- package/dist/traders/public.js +6 -1
- package/dist/users/entities.js +1 -1
- package/package.json +1 -1
package/dist/auth/payloads.js
CHANGED
|
@@ -25,8 +25,8 @@ const StartXLinkRequest = z.object({
|
|
|
25
25
|
returnTo: z.string().optional().describe("Page to send the browser back to once the link finishes, normally the page the user is on. Must be on the calling origin; defaults to that origin.")
|
|
26
26
|
}).describe("Start of the X account link flow");
|
|
27
27
|
const SetXVisibilityRequest = z.object({
|
|
28
|
-
xHidden: z.boolean().describe("True to withhold the linked X account from the leaderboard, false to publish it. The wanted state rather than a flip, so a retry lands on the same result and two tabs cannot disagree. Named to match `xHidden` on the user profile - one name for one value.")
|
|
29
|
-
}).describe("
|
|
28
|
+
xHidden: z.boolean().describe("True to withhold the linked X account from the leaderboard and public trader profiles, false to publish it. The wanted state rather than a flip, so a retry lands on the same result and two tabs cannot disagree. Named to match `xHidden` on the user profile - one name for one value.")
|
|
29
|
+
}).describe("Visibility of the X account on the leaderboard and public trader profiles");
|
|
30
30
|
const PkceValue = z.string().regex(/^[A-Za-z0-9_-]{43}$/, "Must be 43 base64url characters");
|
|
31
31
|
const StartXLoginRequest = z.object({
|
|
32
32
|
returnTo: z.string().optional().describe("Page to send the browser back to once the sign-in finishes, normally the page the user is on. Must be on the calling origin; defaults to that origin. Any fragment is dropped - the flow returns its ticket there."),
|
package/dist/auth/response.js
CHANGED
|
@@ -38,8 +38,8 @@ const StartXLinkResponse = z.object({
|
|
|
38
38
|
authorizeUrl: z.string().describe("X authorization URL to send the browser to. Expires with the flow's state.")
|
|
39
39
|
}).describe("Start of the X account link flow");
|
|
40
40
|
const SetXVisibilityResponse = z.object({
|
|
41
|
-
xHidden: z.boolean().describe("The stored state, read back from the write: true when the leaderboard
|
|
42
|
-
}).describe("
|
|
41
|
+
xHidden: z.boolean().describe("The stored state, read back from the write: true when the leaderboard and public trader profiles withhold the X account. A confirmation of what was asked for, not a value the caller could not otherwise know.")
|
|
42
|
+
}).describe("Visibility of the X account on the leaderboard and public trader profiles after the write");
|
|
43
43
|
const DisconnectXResponse = z.void().describe("Successful X account disconnect response");
|
|
44
44
|
const StartXLoginResponse = z.object({
|
|
45
45
|
authorizeUrl: z.string().describe("X authorization URL to send the browser to. Expires with the flow's state.")
|
|
@@ -10,8 +10,12 @@ const LeaderboardRow = z.object({
|
|
|
10
10
|
// address beside a real name and a PnL deanonymizes a trader for good, and an address is
|
|
11
11
|
// not reversible once scraped. Neither id here is a credential — every route that takes
|
|
12
12
|
// one checks ownership or role, never knowledge of the id.
|
|
13
|
+
// This guarantee applies to private routes. Shared public profiles are addressable by
|
|
14
|
+
// tradeAccountId and omit the exchange identifier, including when the owner shows X identity.
|
|
13
15
|
userId: z.string(),
|
|
14
16
|
connector: Connector,
|
|
17
|
+
// Current owner consent; venue support and admission availability also apply.
|
|
18
|
+
copyingEnabled: z.boolean().describe("Whether the owner allows new copy subscriptions; venue support and admission availability also apply"),
|
|
15
19
|
// Followers when this board was cached, independent of the performance date range.
|
|
16
20
|
followers: z.array(CopyFollower),
|
|
17
21
|
followerCount: z.number().int().nonnegative(),
|
package/dist/traders/public.d.ts
CHANGED
|
@@ -2571,7 +2571,11 @@ export declare const PublicTraderResponse: z.ZodObject<{
|
|
|
2571
2571
|
lighter: "lighter";
|
|
2572
2572
|
lighter_rhc: "lighter_rhc";
|
|
2573
2573
|
}>;
|
|
2574
|
-
|
|
2574
|
+
copyingEnabled: z.ZodBoolean;
|
|
2575
|
+
xHandle: z.ZodOptional<z.ZodString>;
|
|
2576
|
+
xName: z.ZodOptional<z.ZodString>;
|
|
2577
|
+
xAvatarUrl: z.ZodOptional<z.ZodString>;
|
|
2578
|
+
xUserId: z.ZodOptional<z.ZodString>;
|
|
2575
2579
|
followers: z.ZodArray<z.ZodObject<{
|
|
2576
2580
|
tradeAccountId: z.ZodUUID;
|
|
2577
2581
|
status: z.ZodLiteral<"ACTIVE">;
|
package/dist/traders/public.js
CHANGED
|
@@ -148,7 +148,12 @@ const PublicLadder = Ladder.pick({
|
|
|
148
148
|
});
|
|
149
149
|
const PublicTraderResponse = z.object({
|
|
150
150
|
connector: Connector.describe("Exchange connector type"),
|
|
151
|
-
|
|
151
|
+
copyingEnabled: z.boolean().describe("Whether the owner allows new copy subscriptions; venue support and admission availability also apply"),
|
|
152
|
+
// Omit X identity when the owner hides it or has not linked an account.
|
|
153
|
+
xHandle: z.string().optional().describe("Public X handle at the last authorization; absent when hidden or unlinked"),
|
|
154
|
+
xName: z.string().optional().describe("Public X display name; absent when hidden or unlinked"),
|
|
155
|
+
xAvatarUrl: z.string().optional().describe("Public X avatar URL; absent when hidden or unlinked"),
|
|
156
|
+
xUserId: z.string().optional().describe("Immutable X numeric user ID; absent when hidden or unlinked"),
|
|
152
157
|
// Followers are complete; the latest-20 limit applies only to trading records.
|
|
153
158
|
followers: z.array(CopyFollower),
|
|
154
159
|
followerCount: z.number().int().nonnegative(),
|
package/dist/users/entities.js
CHANGED
|
@@ -24,7 +24,7 @@ const UserProfile = z.object({
|
|
|
24
24
|
// A plain boolean rather than nullable, matching `emailVerified` above: this is the
|
|
25
25
|
// owner's own setting, which is known whether or not an X account is linked. With none
|
|
26
26
|
// linked it describes what would happen once one is.
|
|
27
|
-
xHidden: z.boolean().describe("Whether the leaderboard
|
|
27
|
+
xHidden: z.boolean().describe("Whether the leaderboard and public trader profiles withhold the linked X account")
|
|
28
28
|
}).describe("User profile of the authenticated user");
|
|
29
29
|
const BoundReferralReferee = z.object({
|
|
30
30
|
status: z.literal("BOUND").describe("The referee resolves to a V3 user with a permanent binding"),
|