Skip to content

Commit 51c6c4a

Browse files
Automatically update NodeJS SDK
1 parent 44bfb3e commit 51c6c4a

8 files changed

Lines changed: 14 additions & 10 deletions

File tree

api/resources/users/client/Client.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export declare class Users {
208208
*/
209209
pointsEventSummary(id: string, key: string, request: TrophyApi.UsersPointsEventSummaryRequest, requestOptions?: Users.RequestOptions): Promise<TrophyApi.UsersPointsEventSummaryResponseItem[]>;
210210
/**
211-
* Get a user's rank, value, and history for a specific leaderboard.
211+
* Get a user's rank, value, and daily ranking history for a specific leaderboard.
212212
* @throws {@link TrophyApi.UnauthorizedError}
213213
* @throws {@link TrophyApi.NotFoundError}
214214
* @throws {@link TrophyApi.UnprocessableEntityError}

api/resources/users/client/Client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ class Users {
12621262
});
12631263
}
12641264
/**
1265-
* Get a user's rank, value, and history for a specific leaderboard.
1265+
* Get a user's rank, value, and daily ranking history for a specific leaderboard.
12661266
* @throws {@link TrophyApi.UnauthorizedError}
12671267
* @throws {@link TrophyApi.NotFoundError}
12681268
* @throws {@link TrophyApi.UnprocessableEntityError}

api/resources/users/client/requests/UsersLeaderboardRequest.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export interface UsersLeaderboardRequest {
1414
*/
1515
run?: string;
1616
/**
17-
* The number of events to return in the history array.
17+
* The number of days to return in the leaderboard history for the user.
1818
*/
1919
numEvents?: number;
2020
}

api/types/LeaderboardEvent.d.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
* This file was auto-generated by Fern from our API Definition.
33
*/
44
/**
5-
* A leaderboard event representing a change in a user's rank or value.
5+
* A daily leaderboard snapshot entry representing the user's rank/value state and the previous persisted state.
66
*/
77
export interface LeaderboardEvent {
8-
/** The timestamp when the event occurred. */
9-
timestamp?: Date;
8+
/** The leaderboard snapshot date in YYYY-MM-DD format. */
9+
date: string;
10+
/** Deprecated ISO timestamp for the snapshot day boundary. Use `date` instead. */
11+
timestamp: Date;
1012
/** The user's rank before this event, or null if they were not on the leaderboard. */
1113
previousRank?: number;
1214
/** The user's rank after this event, or null if they are no longer on the leaderboard. */

api/types/UserLeaderboardResponseWithHistory.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ import * as TrophyApi from "..";
66
* A user's data for a specific leaderboard including rank, value, and history.
77
*/
88
export interface UserLeaderboardResponseWithHistory extends TrophyApi.UserLeaderboardResponse {
9-
/** An array of events showing the user's rank and value changes over time. */
9+
/** An array of daily change events showing the user's rank and value over time. */
1010
history: TrophyApi.LeaderboardEvent[];
1111
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@trophyso/node",
3-
"version": "1.10.0",
3+
"version": "1.11.0",
44
"description": "NodeJS SDK for the Trophy API",
55
"main": "index.js",
66
"scripts": {

serialization/types/LeaderboardEvent.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import * as core from "../../core";
77
export declare const LeaderboardEvent: core.serialization.ObjectSchema<serializers.LeaderboardEvent.Raw, TrophyApi.LeaderboardEvent>;
88
export declare namespace LeaderboardEvent {
99
interface Raw {
10-
timestamp?: string | null;
10+
date: string;
11+
timestamp: string;
1112
previousRank?: number | null;
1213
rank?: number | null;
1314
previousValue?: number | null;

serialization/types/LeaderboardEvent.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
2929
exports.LeaderboardEvent = void 0;
3030
const core = __importStar(require("../../core"));
3131
exports.LeaderboardEvent = core.serialization.object({
32-
timestamp: core.serialization.date().optional(),
32+
date: core.serialization.string(),
33+
timestamp: core.serialization.date(),
3334
previousRank: core.serialization.number().optional(),
3435
rank: core.serialization.number().optional(),
3536
previousValue: core.serialization.number().optional(),

0 commit comments

Comments
 (0)