Skip to content

Commit bcb876e

Browse files
Automatically update NodeJS SDK
1 parent fe294cc commit bcb876e

File tree

131 files changed

+2958
-40
lines changed

Some content is hidden

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

131 files changed

+2958
-40
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import * as environments from "../../../../environments";
55
import * as core from "../../../../core";
66
import { Streaks } from "../resources/streaks/client/Client";
7+
import { Attributes } from "../resources/attributes/client/Client";
8+
import { Metrics } from "../resources/metrics/client/Client";
79
import { Points } from "../resources/points/client/Client";
810
export declare namespace Admin {
911
interface Options {
@@ -20,6 +22,10 @@ export declare class Admin {
2022
constructor(_options: Admin.Options);
2123
protected _streaks: Streaks | undefined;
2224
get streaks(): Streaks;
25+
protected _attributes: Attributes | undefined;
26+
get attributes(): Attributes;
27+
protected _metrics: Metrics | undefined;
28+
get metrics(): Metrics;
2329
protected _points: Points | undefined;
2430
get points(): Points;
2531
}

api/resources/admin/client/Client.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
Object.defineProperty(exports, "__esModule", { value: true });
66
exports.Admin = void 0;
77
const Client_1 = require("../resources/streaks/client/Client");
8-
const Client_2 = require("../resources/points/client/Client");
8+
const Client_2 = require("../resources/attributes/client/Client");
9+
const Client_3 = require("../resources/metrics/client/Client");
10+
const Client_4 = require("../resources/points/client/Client");
911
class Admin {
1012
constructor(_options) {
1113
this._options = _options;
@@ -14,9 +16,17 @@ class Admin {
1416
var _a;
1517
return ((_a = this._streaks) !== null && _a !== void 0 ? _a : (this._streaks = new Client_1.Streaks(this._options)));
1618
}
19+
get attributes() {
20+
var _a;
21+
return ((_a = this._attributes) !== null && _a !== void 0 ? _a : (this._attributes = new Client_2.Attributes(this._options)));
22+
}
23+
get metrics() {
24+
var _a;
25+
return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new Client_3.Metrics(this._options)));
26+
}
1727
get points() {
1828
var _a;
19-
return ((_a = this._points) !== null && _a !== void 0 ? _a : (this._points = new Client_2.Points(this._options)));
29+
return ((_a = this._points) !== null && _a !== void 0 ? _a : (this._points = new Client_4.Points(this._options)));
2030
}
2131
}
2232
exports.Admin = Admin;
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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 Attributes {
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 Attributes {
18+
protected readonly _options: Attributes.Options;
19+
constructor(_options: Attributes.Options);
20+
/**
21+
* List attributes.
22+
* @throws {@link TrophyApi.UnauthorizedError}
23+
* @throws {@link TrophyApi.UnprocessableEntityError}
24+
*
25+
* @example
26+
* await trophyApi.admin.attributes.list({
27+
* limit: 1,
28+
* skip: 1
29+
* })
30+
*/
31+
list(request?: TrophyApi.admin.AttributesListRequest, requestOptions?: Attributes.RequestOptions): Promise<TrophyApi.ListAttributesResponse>;
32+
/**
33+
* Create attributes in bulk.
34+
* @throws {@link TrophyApi.UnauthorizedError}
35+
* @throws {@link TrophyApi.UnprocessableEntityError}
36+
*
37+
* @example
38+
* await trophyApi.admin.attributes.create([{
39+
* name: "Plan",
40+
* key: "plan",
41+
* type: TrophyApi.CreateAttributeRequestItemType.User
42+
* }, {
43+
* name: "Device",
44+
* key: "device",
45+
* type: TrophyApi.CreateAttributeRequestItemType.Event
46+
* }])
47+
*/
48+
create(request: TrophyApi.CreateAttributesRequest, requestOptions?: Attributes.RequestOptions): Promise<TrophyApi.CreateAttributesResponse>;
49+
/**
50+
* Delete attributes in bulk by ID.
51+
* @throws {@link TrophyApi.UnauthorizedError}
52+
* @throws {@link TrophyApi.UnprocessableEntityError}
53+
*
54+
* @example
55+
* await trophyApi.admin.attributes.delete({})
56+
*/
57+
delete(request?: TrophyApi.admin.AttributesDeleteRequest, requestOptions?: Attributes.RequestOptions): Promise<TrophyApi.DeleteAttributesResponse>;
58+
/**
59+
* Update attributes in bulk by ID.
60+
* @throws {@link TrophyApi.UnauthorizedError}
61+
* @throws {@link TrophyApi.UnprocessableEntityError}
62+
*
63+
* @example
64+
* await trophyApi.admin.attributes.update([{
65+
* id: "550e8400-e29b-41d4-a716-446655440000",
66+
* name: "Subscription Plan"
67+
* }])
68+
*
69+
* @example
70+
* await trophyApi.admin.attributes.update([{
71+
* id: "550e8400-e29b-41d4-a716-446655440000",
72+
* name: "Subscription Plan"
73+
* }])
74+
*/
75+
update(request: TrophyApi.UpdateAttributesRequest, requestOptions?: Attributes.RequestOptions): Promise<TrophyApi.UpdateAttributesResponse>;
76+
/**
77+
* Get an attribute by ID.
78+
* @throws {@link TrophyApi.UnauthorizedError}
79+
* @throws {@link TrophyApi.NotFoundError}
80+
* @throws {@link TrophyApi.UnprocessableEntityError}
81+
*
82+
* @example
83+
* await trophyApi.admin.attributes.get("550e8400-e29b-41d4-a716-446655440000")
84+
*
85+
* @example
86+
* await trophyApi.admin.attributes.get("550e8400-e29b-41d4-a716-446655440000")
87+
*/
88+
get(id: string, requestOptions?: Attributes.RequestOptions): Promise<TrophyApi.AdminAttribute>;
89+
}

0 commit comments

Comments
 (0)