Skip to content

Commit d1e9ecf

Browse files
committed
feat: make integration name easier to replace
1 parent 8dd0854 commit d1e9ecf

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/api/exampleMethod/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable @typescript-eslint/no-unused-vars */
22
import consola from "consola";
3-
import { ExampleIntegrationContext, TODO } from "../../types";
3+
import { DummyIntegrationContext, TODO } from "../../types";
44

55
/**
66
* Greets the integrator with a friendly message.
@@ -11,12 +11,12 @@ import { ExampleIntegrationContext, TODO } from "../../types";
1111
* @example
1212
* SDK usage:
1313
* ```ts
14-
* const result = await sdk.bolierplate.exampleMethod("test");
14+
* const result = await sdk.dummy.exampleMethod("test");
1515
* console.log(result); // { data: "Hello, Alokai Integrator!" }
1616
* ```
1717
*/
1818
export const exampleMethod = async (
19-
context: ExampleIntegrationContext,
19+
context: DummyIntegrationContext,
2020
params: TODO
2121
) => {
2222
consola.log("exampleEndpoint has been called");

src/index.server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ const buildClient = () => {
1515
const onCreate = (settings: MiddlewareConfig) => {
1616
const client = buildClient();
1717

18-
console.log('Example Middleware apiEndpoints:', apiEndpoints)
19-
2018
return {
2119
config: settings,
2220
client,

src/types/context/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { MiddlewareConfig, Endpoints } from "../index";
55
/**
66
* Runtime integration context, which includes API client instance, settings, and endpoints that will be passed via middleware server.
77
* */
8-
export type ExampleIntegrationContext = IntegrationContext<
8+
export type DummyIntegrationContext = IntegrationContext<
99
AxiosInstance,
1010
MiddlewareConfig,
1111
Endpoints
@@ -15,5 +15,5 @@ export type ExampleIntegrationContext = IntegrationContext<
1515
* Global context of the application which includes runtime integration context.
1616
* */
1717
export interface Context {
18-
$example: ExampleIntegrationContext;
18+
$example: DummyIntegrationContext;
1919
}

0 commit comments

Comments
 (0)