Skip to content

Commit 153605f

Browse files
Automatically update staging NodeJS SDK
1 parent e316353 commit 153605f

25 files changed

Lines changed: 82 additions & 82 deletions

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,33 +56,33 @@ export declare class Metrics {
5656
*/
5757
delete(request?: TrophyApi.admin.MetricsDeleteRequest, requestOptions?: Metrics.RequestOptions): Promise<TrophyApi.DeleteMetricsResponse>;
5858
/**
59-
* Patch metrics in bulk by ID.
59+
* Update metrics in bulk by ID.
6060
* @throws {@link TrophyApi.UnauthorizedError}
6161
* @throws {@link TrophyApi.UnprocessableEntityError}
6262
*
6363
* @example
64-
* await trophyApi.admin.metrics.patch([{
64+
* await trophyApi.admin.metrics.update([{
6565
* id: "550e8400-e29b-41d4-a716-446655440000",
6666
* name: "Invites Completed",
6767
* units: "invites"
6868
* }, {
6969
* id: "550e8400-e29b-41d4-a716-446655440001",
70-
* unitType: TrophyApi.PatchMetricRequestItemUnitType.Number,
70+
* unitType: TrophyApi.UpdateMetricRequestItemUnitType.Number,
7171
* units: "dollars"
7272
* }])
7373
*
7474
* @example
75-
* await trophyApi.admin.metrics.patch([{
75+
* await trophyApi.admin.metrics.update([{
7676
* id: "550e8400-e29b-41d4-a716-446655440000",
7777
* name: "Invites Completed",
7878
* units: "invites"
7979
* }, {
8080
* id: "550e8400-e29b-41d4-a716-446655440001",
81-
* unitType: TrophyApi.PatchMetricRequestItemUnitType.Number,
81+
* unitType: TrophyApi.UpdateMetricRequestItemUnitType.Number,
8282
* units: "dollars"
8383
* }])
8484
*/
85-
patch(request: TrophyApi.PatchMetricsRequest, requestOptions?: Metrics.RequestOptions): Promise<TrophyApi.PatchMetricsResponse>;
85+
update(request: TrophyApi.UpdateMetricsRequest, requestOptions?: Metrics.RequestOptions): Promise<TrophyApi.UpdateMetricsResponse>;
8686
/**
8787
* Get a metric by ID.
8888
* @throws {@link TrophyApi.UnauthorizedError}

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,33 +289,33 @@ class Metrics {
289289
});
290290
}
291291
/**
292-
* Patch metrics in bulk by ID.
292+
* Update metrics in bulk by ID.
293293
* @throws {@link TrophyApi.UnauthorizedError}
294294
* @throws {@link TrophyApi.UnprocessableEntityError}
295295
*
296296
* @example
297-
* await trophyApi.admin.metrics.patch([{
297+
* await trophyApi.admin.metrics.update([{
298298
* id: "550e8400-e29b-41d4-a716-446655440000",
299299
* name: "Invites Completed",
300300
* units: "invites"
301301
* }, {
302302
* id: "550e8400-e29b-41d4-a716-446655440001",
303-
* unitType: TrophyApi.PatchMetricRequestItemUnitType.Number,
303+
* unitType: TrophyApi.UpdateMetricRequestItemUnitType.Number,
304304
* units: "dollars"
305305
* }])
306306
*
307307
* @example
308-
* await trophyApi.admin.metrics.patch([{
308+
* await trophyApi.admin.metrics.update([{
309309
* id: "550e8400-e29b-41d4-a716-446655440000",
310310
* name: "Invites Completed",
311311
* units: "invites"
312312
* }, {
313313
* id: "550e8400-e29b-41d4-a716-446655440001",
314-
* unitType: TrophyApi.PatchMetricRequestItemUnitType.Number,
314+
* unitType: TrophyApi.UpdateMetricRequestItemUnitType.Number,
315315
* units: "dollars"
316316
* }])
317317
*/
318-
patch(request, requestOptions) {
318+
update(request, requestOptions) {
319319
var _a;
320320
return __awaiter(this, void 0, void 0, function* () {
321321
const _response = yield core.fetcher({
@@ -327,12 +327,12 @@ class Metrics {
327327
"X-Fern-Language": "JavaScript",
328328
},
329329
contentType: "application/json",
330-
body: yield serializers.PatchMetricsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
330+
body: yield serializers.UpdateMetricsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
331331
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
332332
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
333333
});
334334
if (_response.ok) {
335-
return yield serializers.PatchMetricsResponse.parseOrThrow(_response.body, {
335+
return yield serializers.UpdateMetricsResponse.parseOrThrow(_response.body, {
336336
unrecognizedObjectKeys: "passthrough",
337337
allowUnrecognizedUnionMembers: true,
338338
allowUnrecognizedEnumValues: true,

api/types/PatchMetricsRequest.d.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
*/
44
import * as TrophyApi from "..";
55
/**
6-
* A metric patch object. `id` is required; `name`, `unitType`, and `units` are optional. `key` cannot be changed through this endpoint.
6+
* A metric update object. `id` is required; `name`, `unitType`, and `units` are optional. `key` cannot be changed through this endpoint.
77
*/
8-
export interface PatchMetricRequestItem {
9-
/** The UUID of the metric to patch. */
8+
export interface UpdateMetricRequestItem {
9+
/** The UUID of the metric to update. */
1010
id: string;
1111
/** The updated metric name. */
1212
name?: string;
1313
/** The updated metric unit type. */
14-
unitType?: TrophyApi.PatchMetricRequestItemUnitType;
14+
unitType?: TrophyApi.UpdateMetricRequestItemUnitType;
1515
/** The updated units value. For `unitType: currency`, this must be a supported `MetricCurrency` code such as `USD`. */
1616
units?: string;
1717
}

api/types/PatchMetricRequestItemUnitType.d.ts renamed to api/types/UpdateMetricRequestItemUnitType.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
/**
55
* The updated metric unit type.
66
*/
7-
export declare type PatchMetricRequestItemUnitType = "number" | "currency";
8-
export declare const PatchMetricRequestItemUnitType: {
7+
export declare type UpdateMetricRequestItemUnitType = "number" | "currency";
8+
export declare const UpdateMetricRequestItemUnitType: {
99
readonly Number: "number";
1010
readonly Currency: "currency";
1111
};

api/types/PatchMetricRequestItemUnitType.js renamed to api/types/UpdateMetricRequestItemUnitType.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* This file was auto-generated by Fern from our API Definition.
44
*/
55
Object.defineProperty(exports, "__esModule", { value: true });
6-
exports.PatchMetricRequestItemUnitType = void 0;
7-
exports.PatchMetricRequestItemUnitType = {
6+
exports.UpdateMetricRequestItemUnitType = void 0;
7+
exports.UpdateMetricRequestItemUnitType = {
88
Number: "number",
99
Currency: "currency",
1010
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
import * as TrophyApi from "..";
5+
/**
6+
* Request body for updating metrics.
7+
*/
8+
export declare type UpdateMetricsRequest = TrophyApi.UpdateMetricRequestItem[];
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import * as TrophyApi from "..";
55
/**
66
* Response containing updated metrics and any per-item issues identified by metric ID.
77
*/
8-
export interface PatchMetricsResponse {
8+
export interface UpdateMetricsResponse {
99
/** Array of successfully updated metrics. */
1010
updated: TrophyApi.CreatedMetric[];
11-
/** Array of issues encountered during metric patching. */
11+
/** Array of issues encountered during metric update. */
1212
issues: TrophyApi.AdminIssue[];
1313
}

0 commit comments

Comments
 (0)