Skip to content

Commit a324a55

Browse files
Automatically update staging NodeJS SDK
1 parent 0763e48 commit a324a55

22 files changed

Lines changed: 261 additions & 58 deletions

api/types/GetUserPointsResponse.d.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,7 @@
22
* This file was auto-generated by Fern from our API Definition.
33
*/
44
import * as TrophyApi from "..";
5-
export interface GetUserPointsResponse {
6-
/** The ID of the points system */
7-
id: string;
8-
/** The key of the points system */
9-
key: string;
10-
/** The name of the points system */
11-
name: string;
12-
/** The description of the points system */
13-
description?: string;
14-
/** The URL of the badge image for the points system */
15-
badgeUrl?: string;
16-
/** The maximum number of points a user can be awarded in this points system */
17-
maxPoints?: number;
5+
export interface GetUserPointsResponse extends TrophyApi.PointsResponse {
186
/** The user's total points */
197
total: number;
208
/** The user's current level in this points system, or null if no levels are configured or the user hasn't reached any level yet. */

api/types/MetricEventPointsResponse.d.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,12 @@
33
*/
44
import * as TrophyApi from "..";
55
/**
6-
* Points system response for metric events.
6+
* Points system response for metric events and achievement completions.
77
*/
8-
export interface MetricEventPointsResponse {
9-
/** The ID of the points system */
10-
id: string;
11-
/** The key of the points system */
12-
key: string;
13-
/** The name of the points system */
14-
name: string;
15-
/** The description of the points system */
16-
description?: string;
17-
/** The URL of the badge image for the points system */
18-
badgeUrl?: string;
19-
/** The maximum number of points a user can be awarded in this points system */
20-
maxPoints?: number;
8+
export interface MetricEventPointsResponse extends TrophyApi.PointsResponse {
219
/** The user's total points */
2210
total: number;
23-
/** The user's current level in this points system, or null if no levels are configured or the user hasn't reached any level yet. */
11+
/** The user's new level, included only when the level changed as a result of this event. */
2412
level?: TrophyApi.PointsLevel;
2513
/** The points added by this event. */
2614
added: number;

api/types/PointsResponse.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
/**
5+
* Base points system fields shared across responses.
6+
*/
7+
export interface PointsResponse {
8+
/** The ID of the points system */
9+
id: string;
10+
/** The key of the points system */
11+
key: string;
12+
/** The name of the points system */
13+
name: string;
14+
/** The description of the points system */
15+
description?: string;
16+
/** The URL of the badge image for the points system */
17+
badgeUrl?: string;
18+
/** The maximum number of points a user can be awarded in this points system */
19+
maxPoints?: number;
20+
}

api/types/PointsResponse.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use strict";
2+
/**
3+
* This file was auto-generated by Fern from our API Definition.
4+
*/
5+
Object.defineProperty(exports, "__esModule", { value: true });
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
import * as TrophyApi from "..";
5+
export interface WebhooksPointsLevelChangedPayload {
6+
/** The webhook event type. */
7+
type: "points.level_changed";
8+
/** The user whose level changed. */
9+
user: TrophyApi.User;
10+
/** The points system in which the level changed. */
11+
points: TrophyApi.WebhooksPointsLevelChangedPayloadPoints;
12+
/** The user's previous level, or null if the user had no level. */
13+
previousLevel?: TrophyApi.PointsLevel;
14+
/** The user's new level, or null if the user no longer has a level. */
15+
newLevel?: TrophyApi.PointsLevel;
16+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use strict";
2+
/**
3+
* This file was auto-generated by Fern from our API Definition.
4+
*/
5+
Object.defineProperty(exports, "__esModule", { value: true });
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
import * as TrophyApi from "..";
5+
/**
6+
* The points system in which the level changed.
7+
*/
8+
export interface WebhooksPointsLevelChangedPayloadPoints extends TrophyApi.PointsResponse {
9+
/** The user's total points in this system. */
10+
total: number;
11+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use strict";
2+
/**
3+
* This file was auto-generated by Fern from our API Definition.
4+
*/
5+
Object.defineProperty(exports, "__esModule", { value: true });

api/types/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ export * from "./WebhooksStreakLostPayload";
55
export * from "./WebhooksStreakFreezeConsumedPayload";
66
export * from "./WebhooksStreakFreezeEarnedPayload";
77
export * from "./WebhooksPointsChangedPayload";
8+
export * from "./WebhooksPointsLevelChangedPayloadPoints";
9+
export * from "./WebhooksPointsLevelChangedPayload";
810
export * from "./WebhooksPointsBoostStartedPayload";
911
export * from "./WebhooksPointsBoostFinishedPayload";
1012
export * from "./WebhooksLeaderboardStartedPayload";
@@ -29,6 +31,7 @@ export * from "./PointsBoost";
2931
export * from "./PointsBoostWebhookPayloadStatus";
3032
export * from "./PointsBoostWebhookPayloadRounding";
3133
export * from "./PointsBoostWebhookPayload";
34+
export * from "./PointsResponse";
3235
export * from "./GetUserPointsResponse";
3336
export * from "./PointsLevelSummaryResponseItem";
3437
export * from "./PointsLevelSummaryResponse";

api/types/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ __exportStar(require("./WebhooksStreakLostPayload"), exports);
2121
__exportStar(require("./WebhooksStreakFreezeConsumedPayload"), exports);
2222
__exportStar(require("./WebhooksStreakFreezeEarnedPayload"), exports);
2323
__exportStar(require("./WebhooksPointsChangedPayload"), exports);
24+
__exportStar(require("./WebhooksPointsLevelChangedPayloadPoints"), exports);
25+
__exportStar(require("./WebhooksPointsLevelChangedPayload"), exports);
2426
__exportStar(require("./WebhooksPointsBoostStartedPayload"), exports);
2527
__exportStar(require("./WebhooksPointsBoostFinishedPayload"), exports);
2628
__exportStar(require("./WebhooksLeaderboardStartedPayload"), exports);
@@ -45,6 +47,7 @@ __exportStar(require("./PointsBoost"), exports);
4547
__exportStar(require("./PointsBoostWebhookPayloadStatus"), exports);
4648
__exportStar(require("./PointsBoostWebhookPayloadRounding"), exports);
4749
__exportStar(require("./PointsBoostWebhookPayload"), exports);
50+
__exportStar(require("./PointsResponse"), exports);
4851
__exportStar(require("./GetUserPointsResponse"), exports);
4952
__exportStar(require("./PointsLevelSummaryResponseItem"), exports);
5053
__exportStar(require("./PointsLevelSummaryResponse"), exports);

0 commit comments

Comments
 (0)