Skip to content

Commit 0d26175

Browse files
Automatically update staging NodeJS SDK
1 parent 2eba27c commit 0d26175

99 files changed

Lines changed: 1118 additions & 364 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/resources/admin/resources/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export * as streaks from "./streaks";
22
export * from "./streaks/types";
3-
export * as points from "./points";
43
export * as attributes from "./attributes";
54
export * as metrics from "./metrics";
65
export * as leaderboards from "./leaderboards";
6+
export * as points from "./points";
77
export * from "./attributes/client/requests";
88
export * from "./metrics/client/requests";
99
export * from "./leaderboards/client/requests";

api/resources/admin/resources/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
2626
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2727
};
2828
Object.defineProperty(exports, "__esModule", { value: true });
29-
exports.leaderboards = exports.metrics = exports.attributes = exports.points = exports.streaks = void 0;
29+
exports.points = exports.leaderboards = exports.metrics = exports.attributes = exports.streaks = void 0;
3030
exports.streaks = __importStar(require("./streaks"));
3131
__exportStar(require("./streaks/types"), exports);
32-
exports.points = __importStar(require("./points"));
3332
exports.attributes = __importStar(require("./attributes"));
3433
exports.metrics = __importStar(require("./metrics"));
3534
exports.leaderboards = __importStar(require("./leaderboards"));
35+
exports.points = __importStar(require("./points"));
3636
__exportStar(require("./attributes/client/requests"), exports);
3737
__exportStar(require("./metrics/client/requests"), exports);
3838
__exportStar(require("./leaderboards/client/requests"), exports);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from "./resources";
21
export * from "./client";
2+
export * from "./resources";

api/resources/admin/resources/points/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
1414
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1515
};
1616
Object.defineProperty(exports, "__esModule", { value: true });
17-
__exportStar(require("./resources"), exports);
1817
__exportStar(require("./client"), exports);
18+
__exportStar(require("./resources"), exports);

api/resources/admin/resources/points/resources/boosts/client/Client.d.ts

Lines changed: 68 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,85 @@ export declare class Boosts {
1818
protected readonly _options: Boosts.Options;
1919
constructor(_options: Boosts.Options);
2020
/**
21-
* Create points boosts for multiple users.
22-
* @throws {@link TrophyApi.BadRequestError}
21+
* List points boosts for a system.
2322
* @throws {@link TrophyApi.UnauthorizedError}
2423
* @throws {@link TrophyApi.NotFoundError}
2524
* @throws {@link TrophyApi.UnprocessableEntityError}
2625
*
2726
* @example
28-
* await trophyApi.admin.points.boosts.create({
29-
* systemKey: "xp",
30-
* boosts: [{
31-
* userId: "user-123",
32-
* name: "Double XP Weekend",
33-
* start: "2024-01-01",
34-
* end: "2024-01-03",
35-
* multiplier: 2
36-
* }, {
37-
* userId: "user-456",
38-
* name: "Holiday Bonus",
39-
* start: "2024-12-25",
40-
* multiplier: 1.5,
41-
* rounding: TrophyApi.admin.points.CreatePointsBoostsRequestBoostsItemRounding.Up
42-
* }]
27+
* await trophyApi.admin.points.boosts.list("550e8400-e29b-41d4-a716-446655440000", {
28+
* limit: 1,
29+
* skip: 1
4330
* })
4431
*/
45-
create(request: TrophyApi.admin.points.CreatePointsBoostsRequest, requestOptions?: Boosts.RequestOptions): Promise<TrophyApi.CreatePointsBoostsResponse>;
32+
list(systemId: string, request?: TrophyApi.admin.points.BoostsListRequest, requestOptions?: Boosts.RequestOptions): Promise<TrophyApi.ListPointsBoostsResponse>;
33+
/**
34+
* Create points boosts.
35+
* @throws {@link TrophyApi.UnauthorizedError}
36+
* @throws {@link TrophyApi.NotFoundError}
37+
* @throws {@link TrophyApi.UnprocessableEntityError}
38+
*
39+
* @example
40+
* await trophyApi.admin.points.boosts.create("550e8400-e29b-41d4-a716-446655440000", [{
41+
* userId: "user-123",
42+
* name: "Double XP Weekend",
43+
* start: "2024-01-01",
44+
* end: "2024-01-03",
45+
* multiplier: 2
46+
* }])
47+
*
48+
* @example
49+
* await trophyApi.admin.points.boosts.create("550e8400-e29b-41d4-a716-446655440000", [{
50+
* name: "Global Holiday Bonus",
51+
* start: "2024-12-25",
52+
* multiplier: 1.5,
53+
* rounding: TrophyApi.CreatePointsBoostsRequestItemRounding.Up
54+
* }])
55+
*
56+
* @example
57+
* await trophyApi.admin.points.boosts.create("550e8400-e29b-41d4-a716-446655440000", [{
58+
* name: "Premium User Boost",
59+
* start: "2024-01-01",
60+
* multiplier: 2,
61+
* userAttributes: [{
62+
* attributeId: "550e8400-e29b-41d4-a716-446655440000",
63+
* attributeValue: "premium"
64+
* }]
65+
* }])
66+
*/
67+
create(systemId: string, request: TrophyApi.CreatePointsBoostsRequest, requestOptions?: Boosts.RequestOptions): Promise<TrophyApi.CreatePointsBoostsResponse>;
4668
/**
4769
* Delete multiple points boosts by ID.
48-
* @throws {@link TrophyApi.BadRequestError}
4970
* @throws {@link TrophyApi.UnauthorizedError}
71+
* @throws {@link TrophyApi.NotFoundError}
72+
* @throws {@link TrophyApi.UnprocessableEntityError}
73+
*
74+
* @example
75+
* await trophyApi.admin.points.boosts.delete(undefined, {})
76+
*/
77+
delete(systemId: string, request?: TrophyApi.admin.points.BoostsDeleteRequest, requestOptions?: Boosts.RequestOptions): Promise<TrophyApi.DeletePointsBoostsResponse>;
78+
/**
79+
* Update multiple points boosts.
80+
* @throws {@link TrophyApi.UnauthorizedError}
81+
* @throws {@link TrophyApi.NotFoundError}
82+
* @throws {@link TrophyApi.UnprocessableEntityError}
83+
*
84+
* @example
85+
* await trophyApi.admin.points.boosts.update("550e8400-e29b-41d4-a716-446655440000", [{
86+
* id: "550e8400-e29b-41d4-a716-446655440000",
87+
* name: "Updated Boost Name",
88+
* multiplier: 3
89+
* }])
90+
*/
91+
update(systemId: string, request: TrophyApi.PatchPointsBoostsRequest, requestOptions?: Boosts.RequestOptions): Promise<TrophyApi.PatchPointsBoostsResponse>;
92+
/**
93+
* Get a single points boost by ID.
94+
* @throws {@link TrophyApi.UnauthorizedError}
95+
* @throws {@link TrophyApi.NotFoundError}
96+
* @throws {@link TrophyApi.UnprocessableEntityError}
5097
*
5198
* @example
52-
* await trophyApi.admin.points.boosts.delete({})
99+
* await trophyApi.admin.points.boosts.get("550e8400-e29b-41d4-a716-446655440000", "660f9500-f30c-42e5-b827-557766550001")
53100
*/
54-
delete(request?: TrophyApi.admin.points.BoostsDeleteRequest, requestOptions?: Boosts.RequestOptions): Promise<TrophyApi.DeletePointsBoostsResponse>;
101+
get(systemId: string, id: string, requestOptions?: Boosts.RequestOptions): Promise<TrophyApi.AdminPointsBoost>;
55102
}

0 commit comments

Comments
 (0)