Skip to main content

BackendAdapter

Upgather SDK


Upgather SDK / BackendAdapter

Interface: BackendAdapter

Defined in: lib/adapters/BackendAdapter.ts:12

Interface for backend adapters.

Remarks

This interface abstracts the specifics of different backends by providing methods to retrieve a schema and create a configured ApiClient.

Methods

createClient()

createClient(schema, logger?): ApiClient

Defined in: lib/adapters/BackendAdapter.ts:27

Creates a configured ApiClient based on the provided schema.

Parameters

schema

Schema

The schema obtained from the backend.

logger?

LoggerInterface

Optional logger instance to inject into the client.

Returns

ApiClient

The configured ApiClient.


getSchema()

getSchema(): Schema

Defined in: lib/adapters/BackendAdapter.ts:18

Retrieves the schema from the backend.

Returns

Schema

The schema representing dynamic content types.