@steamsets/client-ts 0.33.4 → 0.33.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/README.md +20 -4
  2. package/funcs/accountAccountGetTrending.d.ts +16 -0
  3. package/funcs/accountAccountGetTrending.d.ts.map +1 -0
  4. package/funcs/accountAccountGetTrending.js +134 -0
  5. package/funcs/accountAccountGetTrending.js.map +1 -0
  6. package/funcs/accountGetInfo.d.ts +1 -2
  7. package/funcs/accountGetInfo.d.ts.map +1 -1
  8. package/funcs/accountGetInfo.js +11 -3
  9. package/funcs/accountGetInfo.js.map +1 -1
  10. package/funcs/accountGetViewStats.d.ts +16 -0
  11. package/funcs/accountGetViewStats.d.ts.map +1 -0
  12. package/funcs/accountGetViewStats.js +134 -0
  13. package/funcs/accountGetViewStats.js.map +1 -0
  14. package/funcs/{activityActivityListAccountFeed.d.ts → activityListAccountFeed.d.ts} +2 -2
  15. package/funcs/activityListAccountFeed.d.ts.map +1 -0
  16. package/funcs/{activityActivityListAccountFeed.js → activityListAccountFeed.js} +5 -5
  17. package/funcs/activityListAccountFeed.js.map +1 -0
  18. package/funcs/analyticsTrackEvent.d.ts +15 -0
  19. package/funcs/analyticsTrackEvent.d.ts.map +1 -0
  20. package/funcs/analyticsTrackEvent.js +144 -0
  21. package/funcs/analyticsTrackEvent.js.map +1 -0
  22. package/funcs/badgeSearch.js +8 -0
  23. package/funcs/badgeSearch.js.map +1 -1
  24. package/funcs/leaderboardGetBucketLeaders.d.ts +16 -0
  25. package/funcs/leaderboardGetBucketLeaders.d.ts.map +1 -0
  26. package/funcs/leaderboardGetBucketLeaders.js +134 -0
  27. package/funcs/leaderboardGetBucketLeaders.js.map +1 -0
  28. package/funcs/{leaderboardLeaderboardGetChanges.d.ts → leaderboardGetChanges.d.ts} +2 -2
  29. package/funcs/leaderboardGetChanges.d.ts.map +1 -0
  30. package/funcs/{leaderboardLeaderboardGetChanges.js → leaderboardGetChanges.js} +5 -5
  31. package/funcs/leaderboardGetChanges.js.map +1 -0
  32. package/funcs/searchSearchGetTrending.d.ts +16 -0
  33. package/funcs/searchSearchGetTrending.d.ts.map +1 -0
  34. package/funcs/searchSearchGetTrending.js +134 -0
  35. package/funcs/searchSearchGetTrending.js.map +1 -0
  36. package/jsr.json +1 -1
  37. package/lib/config.d.ts +2 -2
  38. package/lib/config.js +2 -2
  39. package/models/components/accountgettrendingrequestbody.d.ts +35 -0
  40. package/models/components/accountgettrendingrequestbody.d.ts.map +1 -0
  41. package/models/components/accountgettrendingrequestbody.js +61 -0
  42. package/models/components/accountgettrendingrequestbody.js.map +1 -0
  43. package/models/components/accountgettrendingresponsebody.d.ts +15 -0
  44. package/models/components/accountgettrendingresponsebody.d.ts.map +1 -0
  45. package/models/components/accountgettrendingresponsebody.js +57 -0
  46. package/models/components/accountgettrendingresponsebody.js.map +1 -0
  47. package/models/components/accountviewstats.d.ts +37 -0
  48. package/models/components/accountviewstats.d.ts.map +1 -0
  49. package/models/components/accountviewstats.js +61 -0
  50. package/models/components/accountviewstats.js.map +1 -0
  51. package/models/components/analyticstrackeventrequestbody.d.ts +38 -0
  52. package/models/components/analyticstrackeventrequestbody.d.ts.map +1 -0
  53. package/models/components/analyticstrackeventrequestbody.js +59 -0
  54. package/models/components/analyticstrackeventrequestbody.js.map +1 -0
  55. package/models/components/analyticstrackeventresponsebody.d.ts +14 -0
  56. package/models/components/analyticstrackeventresponsebody.d.ts.map +1 -0
  57. package/models/components/analyticstrackeventresponsebody.js +56 -0
  58. package/models/components/analyticstrackeventresponsebody.js.map +1 -0
  59. package/models/components/bucketleader.d.ts +26 -0
  60. package/models/components/bucketleader.d.ts.map +1 -0
  61. package/models/components/bucketleader.js +57 -0
  62. package/models/components/bucketleader.js.map +1 -0
  63. package/models/components/index.d.ts +11 -0
  64. package/models/components/index.d.ts.map +1 -1
  65. package/models/components/index.js +11 -0
  66. package/models/components/index.js.map +1 -1
  67. package/models/components/leaderboardgetchangesrequestbody.d.ts +4 -4
  68. package/models/components/leaderboardgetchangesrequestbody.d.ts.map +1 -1
  69. package/models/components/leaderboardgetchangesrequestbody.js +4 -5
  70. package/models/components/leaderboardgetchangesrequestbody.js.map +1 -1
  71. package/models/components/searchgettrendingrequestbody.d.ts +54 -0
  72. package/models/components/searchgettrendingrequestbody.d.ts.map +1 -0
  73. package/models/components/searchgettrendingrequestbody.js +72 -0
  74. package/models/components/searchgettrendingrequestbody.js.map +1 -0
  75. package/models/components/searchgettrendingresponsebody.d.ts +15 -0
  76. package/models/components/searchgettrendingresponsebody.d.ts.map +1 -0
  77. package/models/components/searchgettrendingresponsebody.js +57 -0
  78. package/models/components/searchgettrendingresponsebody.js.map +1 -0
  79. package/models/components/trendingaccount.d.ts +20 -0
  80. package/models/components/trendingaccount.d.ts.map +1 -0
  81. package/models/components/trendingaccount.js +54 -0
  82. package/models/components/trendingaccount.js.map +1 -0
  83. package/models/components/trendingsearch.d.ts +21 -0
  84. package/models/components/trendingsearch.d.ts.map +1 -0
  85. package/models/components/trendingsearch.js +52 -0
  86. package/models/components/trendingsearch.js.map +1 -0
  87. package/models/components/v1leaderboardgetbucketleadersrequestbody.d.ts +34 -0
  88. package/models/components/v1leaderboardgetbucketleadersrequestbody.d.ts.map +1 -0
  89. package/models/components/v1leaderboardgetbucketleadersrequestbody.js +59 -0
  90. package/models/components/v1leaderboardgetbucketleadersrequestbody.js.map +1 -0
  91. package/models/operations/accountgetinfo.d.ts +16 -0
  92. package/models/operations/accountgetinfo.d.ts.map +1 -1
  93. package/models/operations/accountgetinfo.js +19 -1
  94. package/models/operations/accountgetinfo.js.map +1 -1
  95. package/models/operations/accountgettrending.d.ts +15 -0
  96. package/models/operations/accountgettrending.d.ts.map +1 -0
  97. package/models/operations/accountgettrending.js +59 -0
  98. package/models/operations/accountgettrending.js.map +1 -0
  99. package/models/operations/badgesearchbadges.d.ts +4 -0
  100. package/models/operations/badgesearchbadges.d.ts.map +1 -1
  101. package/models/operations/badgesearchbadges.js +4 -0
  102. package/models/operations/badgesearchbadges.js.map +1 -1
  103. package/models/operations/getbucketleaders.d.ts +15 -0
  104. package/models/operations/getbucketleaders.d.ts.map +1 -0
  105. package/models/operations/getbucketleaders.js +59 -0
  106. package/models/operations/getbucketleaders.js.map +1 -0
  107. package/models/operations/{leaderboardgetchanges.d.ts → getchanges.d.ts} +4 -4
  108. package/models/operations/getchanges.d.ts.map +1 -0
  109. package/models/operations/{leaderboardgetchanges.js → getchanges.js} +6 -6
  110. package/models/operations/getchanges.js.map +1 -0
  111. package/models/operations/getviewstats.d.ts +15 -0
  112. package/models/operations/getviewstats.d.ts.map +1 -0
  113. package/models/operations/getviewstats.js +58 -0
  114. package/models/operations/getviewstats.js.map +1 -0
  115. package/models/operations/index.d.ts +7 -2
  116. package/models/operations/index.d.ts.map +1 -1
  117. package/models/operations/index.js +7 -2
  118. package/models/operations/index.js.map +1 -1
  119. package/models/operations/{activitylistaccountfeed.d.ts → listaccountfeed.d.ts} +4 -4
  120. package/models/operations/listaccountfeed.d.ts.map +1 -0
  121. package/models/operations/{activitylistaccountfeed.js → listaccountfeed.js} +6 -6
  122. package/models/operations/listaccountfeed.js.map +1 -0
  123. package/models/operations/searchgettrending.d.ts +15 -0
  124. package/models/operations/searchgettrending.d.ts.map +1 -0
  125. package/models/operations/searchgettrending.js +59 -0
  126. package/models/operations/searchgettrending.js.map +1 -0
  127. package/models/operations/trackevent.d.ts +31 -0
  128. package/models/operations/trackevent.d.ts.map +1 -0
  129. package/models/operations/trackevent.js +77 -0
  130. package/models/operations/trackevent.js.map +1 -0
  131. package/package.json +1 -1
  132. package/sdk/account.d.ts +9 -1
  133. package/sdk/account.d.ts.map +1 -1
  134. package/sdk/account.js +14 -0
  135. package/sdk/account.js.map +1 -1
  136. package/sdk/activity.d.ts +1 -1
  137. package/sdk/activity.d.ts.map +1 -1
  138. package/sdk/activity.js +3 -3
  139. package/sdk/activity.js.map +1 -1
  140. package/sdk/analytics.d.ts +9 -0
  141. package/sdk/analytics.d.ts.map +1 -0
  142. package/sdk/analytics.js +19 -0
  143. package/sdk/analytics.js.map +1 -0
  144. package/sdk/leaderboard.d.ts +5 -1
  145. package/sdk/leaderboard.d.ts.map +1 -1
  146. package/sdk/leaderboard.js +10 -3
  147. package/sdk/leaderboard.js.map +1 -1
  148. package/sdk/sdk.d.ts +6 -0
  149. package/sdk/sdk.d.ts.map +1 -1
  150. package/sdk/sdk.js +8 -0
  151. package/sdk/sdk.js.map +1 -1
  152. package/sdk/search.d.ts +10 -0
  153. package/sdk/search.d.ts.map +1 -0
  154. package/sdk/search.js +19 -0
  155. package/sdk/search.js.map +1 -0
  156. package/src/funcs/accountAccountGetTrending.ts +188 -0
  157. package/src/funcs/accountGetInfo.ts +18 -6
  158. package/src/funcs/accountGetViewStats.ts +187 -0
  159. package/src/funcs/{activityActivityListAccountFeed.ts → activityListAccountFeed.ts} +6 -6
  160. package/src/funcs/analyticsTrackEvent.ts +201 -0
  161. package/src/funcs/badgeSearch.ts +8 -0
  162. package/src/funcs/leaderboardGetBucketLeaders.ts +190 -0
  163. package/src/funcs/{leaderboardLeaderboardGetChanges.ts → leaderboardGetChanges.ts} +6 -6
  164. package/src/funcs/searchSearchGetTrending.ts +188 -0
  165. package/src/lib/config.ts +2 -2
  166. package/src/models/components/accountgettrendingrequestbody.ts +60 -0
  167. package/src/models/components/accountgettrendingresponsebody.ts +45 -0
  168. package/src/models/components/accountviewstats.ts +69 -0
  169. package/src/models/components/analyticstrackeventrequestbody.ts +62 -0
  170. package/src/models/components/analyticstrackeventresponsebody.ts +41 -0
  171. package/src/models/components/bucketleader.ts +56 -0
  172. package/src/models/components/index.ts +11 -0
  173. package/src/models/components/leaderboardgetchangesrequestbody.ts +10 -6
  174. package/src/models/components/searchgettrendingrequestbody.ts +86 -0
  175. package/src/models/components/searchgettrendingresponsebody.ts +45 -0
  176. package/src/models/components/trendingaccount.ts +47 -0
  177. package/src/models/components/trendingsearch.ts +44 -0
  178. package/src/models/components/v1leaderboardgetbucketleadersrequestbody.ts +64 -0
  179. package/src/models/operations/accountgetinfo.ts +42 -0
  180. package/src/models/operations/accountgettrending.ts +46 -0
  181. package/src/models/operations/badgesearchbadges.ts +8 -0
  182. package/src/models/operations/getbucketleaders.ts +44 -0
  183. package/src/models/operations/{leaderboardgetchanges.ts → getchanges.ts} +7 -7
  184. package/src/models/operations/getviewstats.ts +43 -0
  185. package/src/models/operations/index.ts +7 -2
  186. package/src/models/operations/{activitylistaccountfeed.ts → listaccountfeed.ts} +7 -7
  187. package/src/models/operations/searchgettrending.ts +46 -0
  188. package/src/models/operations/trackevent.ts +90 -0
  189. package/src/sdk/account.ts +31 -1
  190. package/src/sdk/activity.ts +4 -4
  191. package/src/sdk/analytics.ts +24 -0
  192. package/src/sdk/leaderboard.ts +19 -4
  193. package/src/sdk/sdk.ts +12 -0
  194. package/src/sdk/search.ts +25 -0
  195. package/funcs/activityActivityListAccountFeed.d.ts.map +0 -1
  196. package/funcs/activityActivityListAccountFeed.js.map +0 -1
  197. package/funcs/leaderboardLeaderboardGetChanges.d.ts.map +0 -1
  198. package/funcs/leaderboardLeaderboardGetChanges.js.map +0 -1
  199. package/models/operations/activitylistaccountfeed.d.ts.map +0 -1
  200. package/models/operations/activitylistaccountfeed.js.map +0 -1
  201. package/models/operations/leaderboardgetchanges.d.ts.map +0 -1
  202. package/models/operations/leaderboardgetchanges.js.map +0 -1
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ /**
9
+ * Lookback window for trending compute. 24h is high-volatility (small samples); 7d is the default surface.
10
+ */
11
+ export const Window = {
12
+ TwentyFourh: "24h",
13
+ Sevend: "7d",
14
+ Thirtyd: "30d",
15
+ } as const;
16
+ /**
17
+ * Lookback window for trending compute. 24h is high-volatility (small samples); 7d is the default surface.
18
+ */
19
+ export type Window = ClosedEnum<typeof Window>;
20
+
21
+ export type AccountGetTrendingRequestBody = {
22
+ /**
23
+ * Max accounts returned. Default 100.
24
+ */
25
+ limit?: number | undefined;
26
+ /**
27
+ * Lookback window for trending compute. 24h is high-volatility (small samples); 7d is the default surface.
28
+ */
29
+ window: Window;
30
+ };
31
+
32
+ /** @internal */
33
+ export const Window$outboundSchema: z.ZodNativeEnum<typeof Window> = z
34
+ .nativeEnum(Window);
35
+
36
+ /** @internal */
37
+ export type AccountGetTrendingRequestBody$Outbound = {
38
+ limit?: number | undefined;
39
+ window: string;
40
+ };
41
+
42
+ /** @internal */
43
+ export const AccountGetTrendingRequestBody$outboundSchema: z.ZodType<
44
+ AccountGetTrendingRequestBody$Outbound,
45
+ z.ZodTypeDef,
46
+ AccountGetTrendingRequestBody
47
+ > = z.object({
48
+ limit: z.number().int().optional(),
49
+ window: Window$outboundSchema,
50
+ });
51
+
52
+ export function accountGetTrendingRequestBodyToJSON(
53
+ accountGetTrendingRequestBody: AccountGetTrendingRequestBody,
54
+ ): string {
55
+ return JSON.stringify(
56
+ AccountGetTrendingRequestBody$outboundSchema.parse(
57
+ accountGetTrendingRequestBody,
58
+ ),
59
+ );
60
+ }
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ TrendingAccount,
12
+ TrendingAccount$inboundSchema,
13
+ } from "./trendingaccount.js";
14
+
15
+ export type AccountGetTrendingResponseBody = {
16
+ /**
17
+ * A URL to the JSON Schema for this object.
18
+ */
19
+ dollarSchema?: string | undefined;
20
+ accounts: Array<TrendingAccount> | null;
21
+ };
22
+
23
+ /** @internal */
24
+ export const AccountGetTrendingResponseBody$inboundSchema: z.ZodType<
25
+ AccountGetTrendingResponseBody,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ $schema: z.string().optional(),
30
+ accounts: z.nullable(z.array(TrendingAccount$inboundSchema)),
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "$schema": "dollarSchema",
34
+ });
35
+ });
36
+
37
+ export function accountGetTrendingResponseBodyFromJSON(
38
+ jsonString: string,
39
+ ): SafeParseResult<AccountGetTrendingResponseBody, SDKValidationError> {
40
+ return safeParse(
41
+ jsonString,
42
+ (x) => AccountGetTrendingResponseBody$inboundSchema.parse(JSON.parse(x)),
43
+ `Failed to parse 'AccountGetTrendingResponseBody' from JSON`,
44
+ );
45
+ }
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type AccountViewStats = {
12
+ /**
13
+ * A URL to the JSON Schema for this object.
14
+ */
15
+ dollarSchema?: string | undefined;
16
+ /**
17
+ * Total profile loads in the last 24 hours
18
+ */
19
+ total24h: number;
20
+ /**
21
+ * Total profile loads in the last 30 days
22
+ */
23
+ total30d: number;
24
+ /**
25
+ * Total profile loads in the last 7 days
26
+ */
27
+ total7d: number;
28
+ /**
29
+ * Distinct viewers in the last 24 hours
30
+ */
31
+ unique24h: number;
32
+ /**
33
+ * Distinct viewers in the last 30 days
34
+ */
35
+ unique30d: number;
36
+ /**
37
+ * Distinct viewers in the last 7 days
38
+ */
39
+ unique7d: number;
40
+ };
41
+
42
+ /** @internal */
43
+ export const AccountViewStats$inboundSchema: z.ZodType<
44
+ AccountViewStats,
45
+ z.ZodTypeDef,
46
+ unknown
47
+ > = z.object({
48
+ $schema: z.string().optional(),
49
+ total24h: z.number().int(),
50
+ total30d: z.number().int(),
51
+ total7d: z.number().int(),
52
+ unique24h: z.number().int(),
53
+ unique30d: z.number().int(),
54
+ unique7d: z.number().int(),
55
+ }).transform((v) => {
56
+ return remap$(v, {
57
+ "$schema": "dollarSchema",
58
+ });
59
+ });
60
+
61
+ export function accountViewStatsFromJSON(
62
+ jsonString: string,
63
+ ): SafeParseResult<AccountViewStats, SDKValidationError> {
64
+ return safeParse(
65
+ jsonString,
66
+ (x) => AccountViewStats$inboundSchema.parse(JSON.parse(x)),
67
+ `Failed to parse 'AccountViewStats' from JSON`,
68
+ );
69
+ }
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ /**
9
+ * Event class. profile_view is normally emitted server-side; this lets the frontend top it up for client-only flows. search captures account/app searches that bypass the backend.
10
+ */
11
+ export const AnalyticsTrackEventRequestBodyType = {
12
+ ProfileView: "profile_view",
13
+ Search: "search",
14
+ } as const;
15
+ /**
16
+ * Event class. profile_view is normally emitted server-side; this lets the frontend top it up for client-only flows. search captures account/app searches that bypass the backend.
17
+ */
18
+ export type AnalyticsTrackEventRequestBodyType = ClosedEnum<
19
+ typeof AnalyticsTrackEventRequestBodyType
20
+ >;
21
+
22
+ export type AnalyticsTrackEventRequestBody = {
23
+ /**
24
+ * Per-type fields. profile_view: {accountId}. search: {source, query, resultCount}.
25
+ */
26
+ payload: { [k: string]: any };
27
+ /**
28
+ * Event class. profile_view is normally emitted server-side; this lets the frontend top it up for client-only flows. search captures account/app searches that bypass the backend.
29
+ */
30
+ type: AnalyticsTrackEventRequestBodyType;
31
+ };
32
+
33
+ /** @internal */
34
+ export const AnalyticsTrackEventRequestBodyType$outboundSchema: z.ZodNativeEnum<
35
+ typeof AnalyticsTrackEventRequestBodyType
36
+ > = z.nativeEnum(AnalyticsTrackEventRequestBodyType);
37
+
38
+ /** @internal */
39
+ export type AnalyticsTrackEventRequestBody$Outbound = {
40
+ payload: { [k: string]: any };
41
+ type: string;
42
+ };
43
+
44
+ /** @internal */
45
+ export const AnalyticsTrackEventRequestBody$outboundSchema: z.ZodType<
46
+ AnalyticsTrackEventRequestBody$Outbound,
47
+ z.ZodTypeDef,
48
+ AnalyticsTrackEventRequestBody
49
+ > = z.object({
50
+ payload: z.record(z.any()),
51
+ type: AnalyticsTrackEventRequestBodyType$outboundSchema,
52
+ });
53
+
54
+ export function analyticsTrackEventRequestBodyToJSON(
55
+ analyticsTrackEventRequestBody: AnalyticsTrackEventRequestBody,
56
+ ): string {
57
+ return JSON.stringify(
58
+ AnalyticsTrackEventRequestBody$outboundSchema.parse(
59
+ analyticsTrackEventRequestBody,
60
+ ),
61
+ );
62
+ }
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type AnalyticsTrackEventResponseBody = {
12
+ /**
13
+ * A URL to the JSON Schema for this object.
14
+ */
15
+ dollarSchema?: string | undefined;
16
+ ok: boolean;
17
+ };
18
+
19
+ /** @internal */
20
+ export const AnalyticsTrackEventResponseBody$inboundSchema: z.ZodType<
21
+ AnalyticsTrackEventResponseBody,
22
+ z.ZodTypeDef,
23
+ unknown
24
+ > = z.object({
25
+ $schema: z.string().optional(),
26
+ ok: z.boolean(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ "$schema": "dollarSchema",
30
+ });
31
+ });
32
+
33
+ export function analyticsTrackEventResponseBodyFromJSON(
34
+ jsonString: string,
35
+ ): SafeParseResult<AnalyticsTrackEventResponseBody, SDKValidationError> {
36
+ return safeParse(
37
+ jsonString,
38
+ (x) => AnalyticsTrackEventResponseBody$inboundSchema.parse(JSON.parse(x)),
39
+ `Failed to parse 'AnalyticsTrackEventResponseBody' from JSON`,
40
+ );
41
+ }
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ LeaderboardAccount,
11
+ LeaderboardAccount$inboundSchema,
12
+ } from "./leaderboardaccount.js";
13
+
14
+ export type BucketLeader = {
15
+ account?: LeaderboardAccount | null | undefined;
16
+ accountId?: number | undefined;
17
+ /**
18
+ * No account in this bucket within the scope
19
+ */
20
+ empty: boolean;
21
+ /**
22
+ * Inclusive bucket lower bound in the leaderboard's native unit (level for xp, game count for apps)
23
+ */
24
+ from: number;
25
+ rank?: number | undefined;
26
+ score?: number | undefined;
27
+ /**
28
+ * Inclusive bucket upper bound in the leaderboard's native unit
29
+ */
30
+ to: number;
31
+ };
32
+
33
+ /** @internal */
34
+ export const BucketLeader$inboundSchema: z.ZodType<
35
+ BucketLeader,
36
+ z.ZodTypeDef,
37
+ unknown
38
+ > = z.object({
39
+ account: z.nullable(LeaderboardAccount$inboundSchema).optional(),
40
+ accountId: z.number().int().optional(),
41
+ empty: z.boolean(),
42
+ from: z.number().int(),
43
+ rank: z.number().int().optional(),
44
+ score: z.number().int().optional(),
45
+ to: z.number().int(),
46
+ });
47
+
48
+ export function bucketLeaderFromJSON(
49
+ jsonString: string,
50
+ ): SafeParseResult<BucketLeader, SDKValidationError> {
51
+ return safeParse(
52
+ jsonString,
53
+ (x) => BucketLeader$inboundSchema.parse(JSON.parse(x)),
54
+ `Failed to parse 'BucketLeader' from JSON`,
55
+ );
56
+ }
@@ -3,14 +3,20 @@
3
3
  */
4
4
 
5
5
  export * from "./accountbadgeinfo.js";
6
+ export * from "./accountgettrendingrequestbody.js";
7
+ export * from "./accountgettrendingresponsebody.js";
6
8
  export * from "./accountleaderboardhistory.js";
7
9
  export * from "./accountsearch.js";
10
+ export * from "./accountviewstats.js";
8
11
  export * from "./admincmsitem.js";
12
+ export * from "./analyticstrackeventrequestbody.js";
13
+ export * from "./analyticstrackeventresponsebody.js";
9
14
  export * from "./assetitem.js";
10
15
  export * from "./badge.js";
11
16
  export * from "./badgesuggesttags.js";
12
17
  export * from "./badgevaluefilter.js";
13
18
  export * from "./bestleaderboardrank.js";
19
+ export * from "./bucketleader.js";
14
20
  export * from "./card.js";
15
21
  export * from "./chosenrole.js";
16
22
  export * from "./city.js";
@@ -52,11 +58,15 @@ export * from "./requestbody.js";
52
58
  export * from "./resource.js";
53
59
  export * from "./responsebody.js";
54
60
  export * from "./role.js";
61
+ export * from "./searchgettrendingrequestbody.js";
62
+ export * from "./searchgettrendingresponsebody.js";
55
63
  export * from "./security.js";
56
64
  export * from "./session.js";
57
65
  export * from "./setremovecolortag.js";
58
66
  export * from "./setremovedesigntag.js";
59
67
  export * from "./state.js";
68
+ export * from "./trendingaccount.js";
69
+ export * from "./trendingsearch.js";
60
70
  export * from "./v1accountapp.js";
61
71
  export * from "./v1accountbadgebookmark.js";
62
72
  export * from "./v1accountbadgebookmarksresponsebody.js";
@@ -176,6 +186,7 @@ export * from "./v1leaderboardgetaccountleaderboardrequestbody.js";
176
186
  export * from "./v1leaderboardgetaccountleaderboardresponsebody.js";
177
187
  export * from "./v1leaderboardgetaccountsmetarequestbody.js";
178
188
  export * from "./v1leaderboardgetaccountsmetaresponsebody.js";
189
+ export * from "./v1leaderboardgetbucketleadersrequestbody.js";
179
190
  export * from "./v1leaderboardgetgroupleaderboardrequestbody.js";
180
191
  export * from "./v1leaderboardgetgroupleaderboardresponsebody.js";
181
192
  export * from "./v1leaderboardgetgroupsmetarequestbody.js";
@@ -61,7 +61,7 @@ export type Metric = ClosedEnum<typeof Metric>;
61
61
  /**
62
62
  * Lookback window for the delta.
63
63
  */
64
- export const Window = {
64
+ export const LeaderboardGetChangesRequestBodyWindow = {
65
65
  TwentyFourh: "24h",
66
66
  Sevend: "7d",
67
67
  Thirtyd: "30d",
@@ -71,7 +71,9 @@ export const Window = {
71
71
  /**
72
72
  * Lookback window for the delta.
73
73
  */
74
- export type Window = ClosedEnum<typeof Window>;
74
+ export type LeaderboardGetChangesRequestBodyWindow = ClosedEnum<
75
+ typeof LeaderboardGetChangesRequestBodyWindow
76
+ >;
75
77
 
76
78
  export type LeaderboardGetChangesRequestBody = {
77
79
  /**
@@ -93,7 +95,7 @@ export type LeaderboardGetChangesRequestBody = {
93
95
  /**
94
96
  * Lookback window for the delta.
95
97
  */
96
- window: Window;
98
+ window: LeaderboardGetChangesRequestBodyWindow;
97
99
  };
98
100
 
99
101
  /** @internal */
@@ -111,8 +113,10 @@ export const Metric$outboundSchema: z.ZodNativeEnum<typeof Metric> = z
111
113
  .nativeEnum(Metric);
112
114
 
113
115
  /** @internal */
114
- export const Window$outboundSchema: z.ZodNativeEnum<typeof Window> = z
115
- .nativeEnum(Window);
116
+ export const LeaderboardGetChangesRequestBodyWindow$outboundSchema:
117
+ z.ZodNativeEnum<typeof LeaderboardGetChangesRequestBodyWindow> = z.nativeEnum(
118
+ LeaderboardGetChangesRequestBodyWindow,
119
+ );
116
120
 
117
121
  /** @internal */
118
122
  export type LeaderboardGetChangesRequestBody$Outbound = {
@@ -133,7 +137,7 @@ export const LeaderboardGetChangesRequestBody$outboundSchema: z.ZodType<
133
137
  leaderboard: LeaderboardGetChangesRequestBodyLeaderboard$outboundSchema,
134
138
  limit: z.number().int().optional(),
135
139
  metric: Metric$outboundSchema,
136
- window: Window$outboundSchema,
140
+ window: LeaderboardGetChangesRequestBodyWindow$outboundSchema,
137
141
  });
138
142
 
139
143
  export function leaderboardGetChangesRequestBodyToJSON(
@@ -0,0 +1,86 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ /**
9
+ * Which search surface to query.
10
+ */
11
+ export const Source = {
12
+ Badge: "badge",
13
+ App: "app",
14
+ Account: "account",
15
+ } as const;
16
+ /**
17
+ * Which search surface to query.
18
+ */
19
+ export type Source = ClosedEnum<typeof Source>;
20
+
21
+ /**
22
+ * Lookback window for trending compute.
23
+ */
24
+ export const SearchGetTrendingRequestBodyWindow = {
25
+ TwentyFourh: "24h",
26
+ Sevend: "7d",
27
+ Thirtyd: "30d",
28
+ } as const;
29
+ /**
30
+ * Lookback window for trending compute.
31
+ */
32
+ export type SearchGetTrendingRequestBodyWindow = ClosedEnum<
33
+ typeof SearchGetTrendingRequestBodyWindow
34
+ >;
35
+
36
+ export type SearchGetTrendingRequestBody = {
37
+ /**
38
+ * Max queries returned. Default 100.
39
+ */
40
+ limit?: number | undefined;
41
+ /**
42
+ * Which search surface to query.
43
+ */
44
+ source: Source;
45
+ /**
46
+ * Lookback window for trending compute.
47
+ */
48
+ window: SearchGetTrendingRequestBodyWindow;
49
+ };
50
+
51
+ /** @internal */
52
+ export const Source$outboundSchema: z.ZodNativeEnum<typeof Source> = z
53
+ .nativeEnum(Source);
54
+
55
+ /** @internal */
56
+ export const SearchGetTrendingRequestBodyWindow$outboundSchema: z.ZodNativeEnum<
57
+ typeof SearchGetTrendingRequestBodyWindow
58
+ > = z.nativeEnum(SearchGetTrendingRequestBodyWindow);
59
+
60
+ /** @internal */
61
+ export type SearchGetTrendingRequestBody$Outbound = {
62
+ limit?: number | undefined;
63
+ source: string;
64
+ window: string;
65
+ };
66
+
67
+ /** @internal */
68
+ export const SearchGetTrendingRequestBody$outboundSchema: z.ZodType<
69
+ SearchGetTrendingRequestBody$Outbound,
70
+ z.ZodTypeDef,
71
+ SearchGetTrendingRequestBody
72
+ > = z.object({
73
+ limit: z.number().int().optional(),
74
+ source: Source$outboundSchema,
75
+ window: SearchGetTrendingRequestBodyWindow$outboundSchema,
76
+ });
77
+
78
+ export function searchGetTrendingRequestBodyToJSON(
79
+ searchGetTrendingRequestBody: SearchGetTrendingRequestBody,
80
+ ): string {
81
+ return JSON.stringify(
82
+ SearchGetTrendingRequestBody$outboundSchema.parse(
83
+ searchGetTrendingRequestBody,
84
+ ),
85
+ );
86
+ }
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ TrendingSearch,
12
+ TrendingSearch$inboundSchema,
13
+ } from "./trendingsearch.js";
14
+
15
+ export type SearchGetTrendingResponseBody = {
16
+ /**
17
+ * A URL to the JSON Schema for this object.
18
+ */
19
+ dollarSchema?: string | undefined;
20
+ searches: Array<TrendingSearch> | null;
21
+ };
22
+
23
+ /** @internal */
24
+ export const SearchGetTrendingResponseBody$inboundSchema: z.ZodType<
25
+ SearchGetTrendingResponseBody,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ $schema: z.string().optional(),
30
+ searches: z.nullable(z.array(TrendingSearch$inboundSchema)),
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "$schema": "dollarSchema",
34
+ });
35
+ });
36
+
37
+ export function searchGetTrendingResponseBodyFromJSON(
38
+ jsonString: string,
39
+ ): SafeParseResult<SearchGetTrendingResponseBody, SDKValidationError> {
40
+ return safeParse(
41
+ jsonString,
42
+ (x) => SearchGetTrendingResponseBody$inboundSchema.parse(JSON.parse(x)),
43
+ `Failed to parse 'SearchGetTrendingResponseBody' from JSON`,
44
+ );
45
+ }
@@ -0,0 +1,47 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ LeaderboardAccount,
11
+ LeaderboardAccount$inboundSchema,
12
+ } from "./leaderboardaccount.js";
13
+
14
+ export type TrendingAccount = {
15
+ account?: LeaderboardAccount | null | undefined;
16
+ accountId: number;
17
+ /**
18
+ * Total profile loads in the window
19
+ */
20
+ totalViews: number;
21
+ /**
22
+ * Distinct viewers in the window
23
+ */
24
+ uniqueViews: number;
25
+ };
26
+
27
+ /** @internal */
28
+ export const TrendingAccount$inboundSchema: z.ZodType<
29
+ TrendingAccount,
30
+ z.ZodTypeDef,
31
+ unknown
32
+ > = z.object({
33
+ account: z.nullable(LeaderboardAccount$inboundSchema).optional(),
34
+ accountId: z.number().int(),
35
+ totalViews: z.number().int(),
36
+ uniqueViews: z.number().int(),
37
+ });
38
+
39
+ export function trendingAccountFromJSON(
40
+ jsonString: string,
41
+ ): SafeParseResult<TrendingAccount, SDKValidationError> {
42
+ return safeParse(
43
+ jsonString,
44
+ (x) => TrendingAccount$inboundSchema.parse(JSON.parse(x)),
45
+ `Failed to parse 'TrendingAccount' from JSON`,
46
+ );
47
+ }
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type TrendingSearch = {
11
+ /**
12
+ * The search query as first typed
13
+ */
14
+ query: string;
15
+ /**
16
+ * Total times this query was searched
17
+ */
18
+ totalSearches: number;
19
+ /**
20
+ * Distinct searchers in the window
21
+ */
22
+ uniqueSearchers: number;
23
+ };
24
+
25
+ /** @internal */
26
+ export const TrendingSearch$inboundSchema: z.ZodType<
27
+ TrendingSearch,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ query: z.string(),
32
+ totalSearches: z.number().int(),
33
+ uniqueSearchers: z.number().int(),
34
+ });
35
+
36
+ export function trendingSearchFromJSON(
37
+ jsonString: string,
38
+ ): SafeParseResult<TrendingSearch, SDKValidationError> {
39
+ return safeParse(
40
+ jsonString,
41
+ (x) => TrendingSearch$inboundSchema.parse(JSON.parse(x)),
42
+ `Failed to parse 'TrendingSearch' from JSON`,
43
+ );
44
+ }