Skip to content

Commit bfbc249

Browse files
committed
createClient -> createBackendClient
1 parent e63a89f commit bfbc249

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/sdk/src/server/__tests__/server.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {
2-
BackendClient, createClient, HTTPAuthType,
2+
BackendClient, createBackendClient, HTTPAuthType,
33
} from "../index";
44
import fetchMock from "jest-fetch-mock";
55
import { ClientCredentials } from "simple-oauth2";
@@ -52,8 +52,8 @@ describe("BackendClient", () => {
5252
fetchMock.resetMocks();
5353
});
5454

55-
describe("createClient", () => {
56-
it("should mock the createClient method and return a BackendClient instance", () => {
55+
describe("createBackendClient", () => {
56+
it("should mock the createBackendClient method and return a BackendClient instance", () => {
5757
const params = {
5858
oauth: {
5959
clientId: "test-client-id",
@@ -62,7 +62,7 @@ describe("BackendClient", () => {
6262
projectId,
6363
};
6464

65-
client = createClient(params);
65+
client = createBackendClient(params);
6666
expect(client).toBeInstanceOf(BackendClient);
6767
});
6868
});

packages/sdk/src/server/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ interface RequestOptions extends Omit<RequestInit, "headers" | "body"> {
318318
* @example
319319
*
320320
* ```typescript
321-
* const client = createClient({
321+
* const client = createBackendClient({
322322
* oauth: {
323323
* clientId: "your-client-id",
324324
* clientSecret: "your-client-secret",
@@ -329,7 +329,7 @@ interface RequestOptions extends Omit<RequestInit, "headers" | "body"> {
329329
* @param opts - The options for creating the server client.
330330
* @returns A new instance of BackendClient.
331331
*/
332-
export function createClient(opts: CreateBackendClientOpts) {
332+
export function createBackendClient(opts: CreateBackendClientOpts) {
333333
return new BackendClient(opts);
334334
}
335335

0 commit comments

Comments
 (0)