Skip to content

Commit dee7966

Browse files
Automatically update NodeJS SDK
1 parent 206bcb1 commit dee7966

95 files changed

Lines changed: 1592 additions & 5 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.

Client.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export declare namespace TrophyApiClient {
1414
interface Options {
1515
environment?: core.Supplier<environments.TrophyApiEnvironment | environments.TrophyApiEnvironmentUrls>;
1616
apiKey: core.Supplier<string>;
17+
tenantId?: core.Supplier<string | undefined>;
1718
}
1819
interface RequestOptions {
1920
timeoutInSeconds?: number;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export declare namespace Achievements {
88
interface Options {
99
environment?: core.Supplier<environments.TrophyApiEnvironment | environments.TrophyApiEnvironmentUrls>;
1010
apiKey: core.Supplier<string>;
11+
tenantId?: core.Supplier<string | undefined>;
1112
}
1213
interface RequestOptions {
1314
timeoutInSeconds?: number;

api/resources/achievements/client/Client.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ class Achievements {
7272
.api, "achievements"),
7373
method: "GET",
7474
headers: {
75+
"Tenant-ID": (yield core.Supplier.get(this._options.tenantId)) != null
76+
? yield core.Supplier.get(this._options.tenantId)
77+
: undefined,
7578
"X-API-KEY": yield core.Supplier.get(this._options.apiKey),
7679
"X-Fern-Language": "JavaScript",
7780
},
@@ -149,6 +152,9 @@ class Achievements {
149152
.api, `achievements/${key}/complete`),
150153
method: "POST",
151154
headers: {
155+
"Tenant-ID": (yield core.Supplier.get(this._options.tenantId)) != null
156+
? yield core.Supplier.get(this._options.tenantId)
157+
: undefined,
152158
"X-API-KEY": yield core.Supplier.get(this._options.apiKey),
153159
"X-Fern-Language": "JavaScript",
154160
},

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ import { Attributes } from "../resources/attributes/client/Client";
77
import { Metrics } from "../resources/metrics/client/Client";
88
import { Leaderboards } from "../resources/leaderboards/client/Client";
99
import { Streaks } from "../resources/streaks/client/Client";
10+
import { Tenants } from "../resources/tenants/client/Client";
1011
import { Points } from "../resources/points/client/Client";
1112
export declare namespace Admin {
1213
interface Options {
1314
environment?: core.Supplier<environments.TrophyApiEnvironment | environments.TrophyApiEnvironmentUrls>;
1415
apiKey: core.Supplier<string>;
16+
tenantId?: core.Supplier<string | undefined>;
1517
}
1618
interface RequestOptions {
1719
timeoutInSeconds?: number;
@@ -29,6 +31,8 @@ export declare class Admin {
2931
get leaderboards(): Leaderboards;
3032
protected _streaks: Streaks | undefined;
3133
get streaks(): Streaks;
34+
protected _tenants: Tenants | undefined;
35+
get tenants(): Tenants;
3236
protected _points: Points | undefined;
3337
get points(): Points;
3438
}

api/resources/admin/client/Client.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ const Client_1 = require("../resources/attributes/client/Client");
88
const Client_2 = require("../resources/metrics/client/Client");
99
const Client_3 = require("../resources/leaderboards/client/Client");
1010
const Client_4 = require("../resources/streaks/client/Client");
11-
const Client_5 = require("../resources/points/client/Client");
11+
const Client_5 = require("../resources/tenants/client/Client");
12+
const Client_6 = require("../resources/points/client/Client");
1213
class Admin {
1314
constructor(_options) {
1415
this._options = _options;
@@ -29,9 +30,13 @@ class Admin {
2930
var _a;
3031
return ((_a = this._streaks) !== null && _a !== void 0 ? _a : (this._streaks = new Client_4.Streaks(this._options)));
3132
}
33+
get tenants() {
34+
var _a;
35+
return ((_a = this._tenants) !== null && _a !== void 0 ? _a : (this._tenants = new Client_5.Tenants(this._options)));
36+
}
3237
get points() {
3338
var _a;
34-
return ((_a = this._points) !== null && _a !== void 0 ? _a : (this._points = new Client_5.Points(this._options)));
39+
return ((_a = this._points) !== null && _a !== void 0 ? _a : (this._points = new Client_6.Points(this._options)));
3540
}
3641
}
3742
exports.Admin = Admin;

api/resources/admin/resources/attributes/client/Client.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export declare namespace Attributes {
88
interface Options {
99
environment?: core.Supplier<environments.TrophyApiEnvironment | environments.TrophyApiEnvironmentUrls>;
1010
apiKey: core.Supplier<string>;
11+
tenantId?: core.Supplier<string | undefined>;
1112
}
1213
interface RequestOptions {
1314
timeoutInSeconds?: number;

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ class Attributes {
7676
.admin, "attributes"),
7777
method: "GET",
7878
headers: {
79+
"Tenant-ID": (yield core.Supplier.get(this._options.tenantId)) != null
80+
? yield core.Supplier.get(this._options.tenantId)
81+
: undefined,
7982
"X-API-KEY": yield core.Supplier.get(this._options.apiKey),
8083
"X-Fern-Language": "JavaScript",
8184
},
@@ -154,6 +157,9 @@ class Attributes {
154157
.admin, "attributes"),
155158
method: "POST",
156159
headers: {
160+
"Tenant-ID": (yield core.Supplier.get(this._options.tenantId)) != null
161+
? yield core.Supplier.get(this._options.tenantId)
162+
: undefined,
157163
"X-API-KEY": yield core.Supplier.get(this._options.apiKey),
158164
"X-Fern-Language": "JavaScript",
159165
},
@@ -234,6 +240,9 @@ class Attributes {
234240
.admin, "attributes"),
235241
method: "DELETE",
236242
headers: {
243+
"Tenant-ID": (yield core.Supplier.get(this._options.tenantId)) != null
244+
? yield core.Supplier.get(this._options.tenantId)
245+
: undefined,
237246
"X-API-KEY": yield core.Supplier.get(this._options.apiKey),
238247
"X-Fern-Language": "JavaScript",
239248
},
@@ -313,6 +322,9 @@ class Attributes {
313322
.admin, "attributes"),
314323
method: "PATCH",
315324
headers: {
325+
"Tenant-ID": (yield core.Supplier.get(this._options.tenantId)) != null
326+
? yield core.Supplier.get(this._options.tenantId)
327+
: undefined,
316328
"X-API-KEY": yield core.Supplier.get(this._options.apiKey),
317329
"X-Fern-Language": "JavaScript",
318330
},
@@ -387,6 +399,9 @@ class Attributes {
387399
.admin, `attributes/${id}`),
388400
method: "GET",
389401
headers: {
402+
"Tenant-ID": (yield core.Supplier.get(this._options.tenantId)) != null
403+
? yield core.Supplier.get(this._options.tenantId)
404+
: undefined,
390405
"X-API-KEY": yield core.Supplier.get(this._options.apiKey),
391406
"X-Fern-Language": "JavaScript",
392407
},

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ export * from "./streaks/types";
33
export * as attributes from "./attributes";
44
export * as metrics from "./metrics";
55
export * as leaderboards from "./leaderboards";
6+
export * as tenants from "./tenants";
67
export * as points from "./points";
78
export * from "./attributes/client/requests";
89
export * from "./metrics/client/requests";
910
export * from "./leaderboards/client/requests";
1011
export * from "./streaks/client/requests";
12+
export * from "./tenants/client/requests";

api/resources/admin/resources/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ 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.points = exports.leaderboards = exports.metrics = exports.attributes = exports.streaks = void 0;
29+
exports.points = exports.tenants = exports.leaderboards = exports.metrics = exports.attributes = exports.streaks = void 0;
3030
exports.streaks = __importStar(require("./streaks"));
3131
__exportStar(require("./streaks/types"), exports);
3232
exports.attributes = __importStar(require("./attributes"));
3333
exports.metrics = __importStar(require("./metrics"));
3434
exports.leaderboards = __importStar(require("./leaderboards"));
35+
exports.tenants = __importStar(require("./tenants"));
3536
exports.points = __importStar(require("./points"));
3637
__exportStar(require("./attributes/client/requests"), exports);
3738
__exportStar(require("./metrics/client/requests"), exports);
3839
__exportStar(require("./leaderboards/client/requests"), exports);
3940
__exportStar(require("./streaks/client/requests"), exports);
41+
__exportStar(require("./tenants/client/requests"), exports);

api/resources/admin/resources/leaderboards/client/Client.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export declare namespace Leaderboards {
88
interface Options {
99
environment?: core.Supplier<environments.TrophyApiEnvironment | environments.TrophyApiEnvironmentUrls>;
1010
apiKey: core.Supplier<string>;
11+
tenantId?: core.Supplier<string | undefined>;
1112
}
1213
interface RequestOptions {
1314
timeoutInSeconds?: number;
@@ -59,6 +60,9 @@ export declare class Leaderboards {
5960
* Delete leaderboards by ID.
6061
* @throws {@link TrophyApi.UnauthorizedError}
6162
* @throws {@link TrophyApi.UnprocessableEntityError}
63+
*
64+
* @example
65+
* await trophyApi.admin.leaderboards.delete({})
6266
*/
6367
delete(request?: TrophyApi.admin.LeaderboardsDeleteRequest, requestOptions?: Leaderboards.RequestOptions): Promise<TrophyApi.DeleteLeaderboardsResponse>;
6468
/**

0 commit comments

Comments
 (0)