Skip to content

Commit fed680f

Browse files
author
Andrew Farries
committed
Rename method in protocol, server and dashboard
1 parent 2eecb7d commit fed680f

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

Diff for: components/dashboard/src/teams/TeamUsage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function TeamUsage() {
3131
}
3232
(async () => {
3333
const attributionId = AttributionId.render({ kind: "team", teamId: team.id });
34-
const billedUsageResult = await getGitpodService().server.getBilledUsage(attributionId);
34+
const billedUsageResult = await getGitpodService().server.listBilledUsage(attributionId);
3535
setBilledUsage(billedUsageResult);
3636
})();
3737
}, [team]);

Diff for: components/gitpod-protocol/src/gitpod-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
291291
subscribeTeamToStripe(teamId: string, setupIntentId: string, currency: Currency): Promise<void>;
292292
getStripePortalUrlForTeam(teamId: string): Promise<string>;
293293

294-
getBilledUsage(attributionId: string): Promise<BillableSession[]>;
294+
listBilledUsage(attributionId: string): Promise<BillableSession[]>;
295295

296296
/**
297297
* Analytics

Diff for: components/server/ee/src/workspace/gitpod-server-impl.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2066,14 +2066,14 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
20662066
}
20672067
}
20682068

2069-
async getBilledUsage(ctx: TraceContext, attributionId: string): Promise<BillableSession[]> {
2069+
async listBilledUsage(ctx: TraceContext, attributionId: string): Promise<BillableSession[]> {
20702070
traceAPIParams(ctx, { attributionId });
2071-
const user = this.checkAndBlockUser("getBilledUsage");
2071+
const user = this.checkAndBlockUser("listBilledUsage");
20722072

20732073
await this.guardCostCenterAccess(ctx, user.id, attributionId, "get");
20742074

20752075
const usageClient = this.usageServiceClientProvider.getDefault();
2076-
const response = await usageClient.getBilledUsage(ctx, attributionId);
2076+
const response = await usageClient.listBilledUsage(ctx, attributionId);
20772077
const sessions = response.getSessionsList().map((s) => this.mapBilledSession(s));
20782078

20792079
return sessions.concat(billableSessionDummyData); // to at least return some data for testing

Diff for: components/server/src/auth/rate-limiter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ function getConfig(config: RateLimiterConfig): RateLimiterConfig {
210210
findStripeSubscriptionIdForTeam: { group: "default", points: 1 },
211211
subscribeTeamToStripe: { group: "default", points: 1 },
212212
getStripePortalUrlForTeam: { group: "default", points: 1 },
213-
getBilledUsage: { group: "default", points: 1 },
213+
listBilledUsage: { group: "default", points: 1 },
214214
trackEvent: { group: "default", points: 1 },
215215
trackLocation: { group: "default", points: 1 },
216216
identifyUser: { group: "default", points: 1 },

Diff for: components/server/src/workspace/gitpod-server-impl.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3191,7 +3191,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
31913191
throw new ResponseError(ErrorCodes.SAAS_FEATURE, `Not implemented in this version`);
31923192
}
31933193

3194-
async getBilledUsage(ctx: TraceContext, attributionId: string): Promise<BillableSession[]> {
3194+
async listBilledUsage(ctx: TraceContext, attributionId: string): Promise<BillableSession[]> {
31953195
throw new ResponseError(ErrorCodes.SAAS_FEATURE, `Not implemented in this version`);
31963196
}
31973197

0 commit comments

Comments
 (0)