Skip to content

Commit 5e96c9f

Browse files
Automatically update staging NodeJS SDK
1 parent 19a4795 commit 5e96c9f

9 files changed

Lines changed: 27 additions & 6 deletions

‎api/types/AchievementCompletionResponse.d.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ export interface AchievementCompletionResponse {
55
achievement: TrophyApi.UserAchievementResponse;
66
/** A map of points systems by key that were affected by this achievement completion. */
77
points: Record<string, TrophyApi.MetricEventPointsResponse>;
8+
/** A map of leaderboards by key. Only contains leaderboards that were affected by this achievement completion. */
9+
leaderboards: Record<string, TrophyApi.MetricEventLeaderboardResponse>;
810
/** Rewards awarded as a result of this achievement completion. */
911
rewards: TrophyApi.UserRewardResponse[];
1012
}

‎api/types/RedeemRewardResponse.d.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ export interface RedeemRewardResponse {
55
redemptions: TrophyApi.RedeemedReward[];
66
/** Points granted by a points reward, keyed by points system key. Includes one award per redemption. */
77
points?: Record<string, TrophyApi.MetricEventPointsResponse>;
8+
/** A map of leaderboards by key. Only contains leaderboards that were affected by the points this request granted. */
9+
leaderboards: Record<string, TrophyApi.MetricEventLeaderboardResponse>;
810
}

‎api/types/UserRewardTrigger.d.ts‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
import type * as TrophyApi from "../index";
2+
/**
3+
* The trigger that awarded the reward, as it is configured now. Only the fields for the trigger's current type are included.
4+
*/
25
export interface UserRewardTrigger {
36
id: string;
47
type: TrophyApi.UserRewardTriggerType;
8+
/** For metric triggers, the ID of the metric. */
59
metricId?: string;
6-
threshold?: number;
10+
/** For metric triggers, the reward is awarded each time the user's total for the metric increases by this amount. */
11+
metricThreshold?: number;
12+
/** For achievement triggers, the ID of the achievement. */
713
achievementId?: string;
8-
streakLength?: number;
14+
/** For streak triggers, the reward is awarded every this many periods of the user's streak. */
15+
streakLengthThreshold?: number;
16+
/** For leaderboard triggers, the ID of the leaderboard. */
917
leaderboardId?: string;
18+
/** For leaderboard triggers, the rank a user must finish a leaderboard run at. */
1019
rank?: number;
1120
}

‎serialization/types/AchievementCompletionResponse.d.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type * as TrophyApi from "../../api/index";
22
import * as core from "../../core";
33
import type * as serializers from "../index";
4+
import { MetricEventLeaderboardResponse } from "./MetricEventLeaderboardResponse";
45
import { MetricEventPointsResponse } from "./MetricEventPointsResponse";
56
import { UserAchievementResponse } from "./UserAchievementResponse";
67
import { UserRewardResponse } from "./UserRewardResponse";
@@ -10,6 +11,7 @@ export declare namespace AchievementCompletionResponse {
1011
completionId: string;
1112
achievement: UserAchievementResponse.Raw;
1213
points: Record<string, MetricEventPointsResponse.Raw>;
14+
leaderboards: Record<string, MetricEventLeaderboardResponse.Raw>;
1315
rewards: UserRewardResponse.Raw[];
1416
}
1517
}

‎serialization/types/AchievementCompletionResponse.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ var __importStar = (this && this.__importStar) || (function () {
3636
Object.defineProperty(exports, "__esModule", { value: true });
3737
exports.AchievementCompletionResponse = void 0;
3838
const core = __importStar(require("../../core"));
39+
const MetricEventLeaderboardResponse_1 = require("./MetricEventLeaderboardResponse");
3940
const MetricEventPointsResponse_1 = require("./MetricEventPointsResponse");
4041
const UserAchievementResponse_1 = require("./UserAchievementResponse");
4142
const UserRewardResponse_1 = require("./UserRewardResponse");
4243
exports.AchievementCompletionResponse = core.serialization.object({
4344
completionId: core.serialization.string(),
4445
achievement: UserAchievementResponse_1.UserAchievementResponse,
4546
points: core.serialization.record(core.serialization.string(), MetricEventPointsResponse_1.MetricEventPointsResponse),
47+
leaderboards: core.serialization.record(core.serialization.string(), MetricEventLeaderboardResponse_1.MetricEventLeaderboardResponse),
4648
rewards: core.serialization.list(UserRewardResponse_1.UserRewardResponse),
4749
});

‎serialization/types/RedeemRewardResponse.d.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type * as TrophyApi from "../../api/index";
22
import * as core from "../../core";
33
import type * as serializers from "../index";
4+
import { MetricEventLeaderboardResponse } from "./MetricEventLeaderboardResponse";
45
import { MetricEventPointsResponse } from "./MetricEventPointsResponse";
56
import { RedeemedReward } from "./RedeemedReward";
67
import { RewardSummary } from "./RewardSummary";
@@ -10,5 +11,6 @@ export declare namespace RedeemRewardResponse {
1011
reward: RewardSummary.Raw;
1112
redemptions: RedeemedReward.Raw[];
1213
points?: Record<string, MetricEventPointsResponse.Raw> | null;
14+
leaderboards: Record<string, MetricEventLeaderboardResponse.Raw>;
1315
}
1416
}

‎serialization/types/RedeemRewardResponse.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ var __importStar = (this && this.__importStar) || (function () {
3636
Object.defineProperty(exports, "__esModule", { value: true });
3737
exports.RedeemRewardResponse = void 0;
3838
const core = __importStar(require("../../core"));
39+
const MetricEventLeaderboardResponse_1 = require("./MetricEventLeaderboardResponse");
3940
const MetricEventPointsResponse_1 = require("./MetricEventPointsResponse");
4041
const RedeemedReward_1 = require("./RedeemedReward");
4142
const RewardSummary_1 = require("./RewardSummary");
4243
exports.RedeemRewardResponse = core.serialization.object({
4344
reward: RewardSummary_1.RewardSummary,
4445
redemptions: core.serialization.list(RedeemedReward_1.RedeemedReward),
4546
points: core.serialization.record(core.serialization.string(), MetricEventPointsResponse_1.MetricEventPointsResponse).optional(),
47+
leaderboards: core.serialization.record(core.serialization.string(), MetricEventLeaderboardResponse_1.MetricEventLeaderboardResponse),
4648
});

‎serialization/types/UserRewardTrigger.d.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ export declare namespace UserRewardTrigger {
88
id: string;
99
type: UserRewardTriggerType.Raw;
1010
metricId?: string | null;
11-
threshold?: number | null;
11+
metricThreshold?: number | null;
1212
achievementId?: string | null;
13-
streakLength?: number | null;
13+
streakLengthThreshold?: number | null;
1414
leaderboardId?: string | null;
1515
rank?: number | null;
1616
}

‎serialization/types/UserRewardTrigger.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ exports.UserRewardTrigger = core.serialization.object({
4141
id: core.serialization.string(),
4242
type: UserRewardTriggerType_1.UserRewardTriggerType,
4343
metricId: core.serialization.string().optional(),
44-
threshold: core.serialization.number().optional(),
44+
metricThreshold: core.serialization.number().optional(),
4545
achievementId: core.serialization.string().optional(),
46-
streakLength: core.serialization.number().optional(),
46+
streakLengthThreshold: core.serialization.number().optional(),
4747
leaderboardId: core.serialization.string().optional(),
4848
rank: core.serialization.number().optional(),
4949
});

0 commit comments

Comments
 (0)