Skip to content

Commit ce816f3

Browse files
Automatically update staging NodeJS SDK
1 parent f55f44a commit ce816f3

72 files changed

Lines changed: 1613 additions & 7 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/points/client/Client.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*/
44
import * as environments from "../../../../../../environments";
55
import * as core from "../../../../../../core";
6+
import { Systems } from "../resources/systems/client/Client";
67
import { Boosts } from "../resources/boosts/client/Client";
78
import { Levels } from "../resources/levels/client/Client";
89
import { Triggers } from "../resources/triggers/client/Client";
@@ -19,6 +20,8 @@ export declare namespace Points {
1920
export declare class Points {
2021
protected readonly _options: Points.Options;
2122
constructor(_options: Points.Options);
23+
protected _systems: Systems | undefined;
24+
get systems(): Systems;
2225
protected _boosts: Boosts | undefined;
2326
get boosts(): Boosts;
2427
protected _levels: Levels | undefined;

api/resources/admin/resources/points/client/Client.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,29 @@
44
*/
55
Object.defineProperty(exports, "__esModule", { value: true });
66
exports.Points = void 0;
7-
const Client_1 = require("../resources/boosts/client/Client");
8-
const Client_2 = require("../resources/levels/client/Client");
9-
const Client_3 = require("../resources/triggers/client/Client");
7+
const Client_1 = require("../resources/systems/client/Client");
8+
const Client_2 = require("../resources/boosts/client/Client");
9+
const Client_3 = require("../resources/levels/client/Client");
10+
const Client_4 = require("../resources/triggers/client/Client");
1011
class Points {
1112
constructor(_options) {
1213
this._options = _options;
1314
}
15+
get systems() {
16+
var _a;
17+
return ((_a = this._systems) !== null && _a !== void 0 ? _a : (this._systems = new Client_1.Systems(this._options)));
18+
}
1419
get boosts() {
1520
var _a;
16-
return ((_a = this._boosts) !== null && _a !== void 0 ? _a : (this._boosts = new Client_1.Boosts(this._options)));
21+
return ((_a = this._boosts) !== null && _a !== void 0 ? _a : (this._boosts = new Client_2.Boosts(this._options)));
1722
}
1823
get levels() {
1924
var _a;
20-
return ((_a = this._levels) !== null && _a !== void 0 ? _a : (this._levels = new Client_2.Levels(this._options)));
25+
return ((_a = this._levels) !== null && _a !== void 0 ? _a : (this._levels = new Client_3.Levels(this._options)));
2126
}
2227
get triggers() {
2328
var _a;
24-
return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Client_3.Triggers(this._options)));
29+
return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Client_4.Triggers(this._options)));
2530
}
2631
}
2732
exports.Points = Points;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
export * as systems from "./systems";
12
export * as boosts from "./boosts";
23
export * as levels from "./levels";
34
export * as triggers from "./triggers";
5+
export * from "./systems/client/requests";
46
export * from "./boosts/client/requests";
57
export * from "./levels/client/requests";
68
export * from "./triggers/client/requests";

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ 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.triggers = exports.levels = exports.boosts = void 0;
29+
exports.triggers = exports.levels = exports.boosts = exports.systems = void 0;
30+
exports.systems = __importStar(require("./systems"));
3031
exports.boosts = __importStar(require("./boosts"));
3132
exports.levels = __importStar(require("./levels"));
3233
exports.triggers = __importStar(require("./triggers"));
34+
__exportStar(require("./systems/client/requests"), exports);
3335
__exportStar(require("./boosts/client/requests"), exports);
3436
__exportStar(require("./levels/client/requests"), exports);
3537
__exportStar(require("./triggers/client/requests"), exports);
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
import * as environments from "../../../../../../../../environments";
5+
import * as core from "../../../../../../../../core";
6+
import * as TrophyApi from "../../../../../../..";
7+
export declare namespace Systems {
8+
interface Options {
9+
environment?: core.Supplier<environments.TrophyApiEnvironment | environments.TrophyApiEnvironmentUrls>;
10+
apiKey: core.Supplier<string>;
11+
}
12+
interface RequestOptions {
13+
timeoutInSeconds?: number;
14+
maxRetries?: number;
15+
}
16+
}
17+
export declare class Systems {
18+
protected readonly _options: Systems.Options;
19+
constructor(_options: Systems.Options);
20+
/**
21+
* List points systems.
22+
* @throws {@link TrophyApi.UnauthorizedError}
23+
* @throws {@link TrophyApi.UnprocessableEntityError}
24+
*
25+
* @example
26+
* await trophyApi.admin.points.systems.list({
27+
* limit: 1,
28+
* skip: 1
29+
* })
30+
*/
31+
list(request?: TrophyApi.admin.points.SystemsListRequest, requestOptions?: Systems.RequestOptions): Promise<TrophyApi.ListPointsSystemsResponse>;
32+
/**
33+
* Create points systems. Optionally include sub-entities (levels, boosts, triggers) in each system payload to create them alongside the system.
34+
* @throws {@link TrophyApi.UnauthorizedError}
35+
* @throws {@link TrophyApi.UnprocessableEntityError}
36+
*
37+
* @example
38+
* await trophyApi.admin.points.systems.create([{
39+
* name: "XP",
40+
* key: "xp",
41+
* description: "Experience points"
42+
* }])
43+
*/
44+
create(request: TrophyApi.CreatePointsSystemsRequest, requestOptions?: Systems.RequestOptions): Promise<TrophyApi.CreatePointsSystemsResponse>;
45+
/**
46+
* Delete (archive) points systems by ID.
47+
* @throws {@link TrophyApi.UnauthorizedError}
48+
* @throws {@link TrophyApi.UnprocessableEntityError}
49+
*/
50+
delete(request?: TrophyApi.admin.points.SystemsDeleteRequest, requestOptions?: Systems.RequestOptions): Promise<TrophyApi.DeletePointsSystemsResponse>;
51+
/**
52+
* Update points systems by ID.
53+
* @throws {@link TrophyApi.UnauthorizedError}
54+
* @throws {@link TrophyApi.UnprocessableEntityError}
55+
*
56+
* @example
57+
* await trophyApi.admin.points.systems.update([{
58+
* id: "550e8400-e29b-41d4-a716-446655440000",
59+
* name: "New Name"
60+
* }])
61+
*/
62+
update(request: TrophyApi.UpdatePointsSystemsRequest, requestOptions?: Systems.RequestOptions): Promise<TrophyApi.UpdatePointsSystemsResponse>;
63+
/**
64+
* Get a points system by ID.
65+
* @throws {@link TrophyApi.UnauthorizedError}
66+
* @throws {@link TrophyApi.NotFoundError}
67+
* @throws {@link TrophyApi.UnprocessableEntityError}
68+
*
69+
* @example
70+
* await trophyApi.admin.points.systems.get("550e8400-e29b-41d4-a716-446655440000")
71+
*/
72+
get(id: string, requestOptions?: Systems.RequestOptions): Promise<TrophyApi.AdminPointsSystem>;
73+
}

0 commit comments

Comments
 (0)