Skip to content
API/DriverDefinition

DriverDefinition

src/types/driver-definition.type.ts3 public methodstype

Per-driver factory bundle

Names the four pieces a driver contributes — request strategy, response strategy, response-options subclass — so adding a driver is one entry in DRIVERS instead of three parallel switch cases in the provider builder.

Property Type Description
id Driver The driver’s identifier. Duplicates its key in DRIVERS, which test/drivers.spec.ts asserts stays true. Carrying it on the definition lets a driver be passed around on its own — createQubee({ driver: STRAPI_DRIVER }) — while still naming the driver in capability errors.
createRequestStrategy(paginationMode: PaginationModeEnum): IRequestStrategy

Build the request strategy for this driver

Receives the configured PaginationModeEnum; only PostgREST actually consults it today (RANGE-header mode), other drivers ignore the argument.

Parameter Type Description
paginationMode PaginationModeEnum Wire-level pagination mechanism

Returns — A fresh request strategy instance

createResponseOptions(config: PaginationConfig): ResponseOptions

Build the driver-specific ResponseOptions instance

Honours user-supplied key-path overrides via PaginationConfig.

Parameter Type Description
config PaginationConfig User-supplied response key overrides

Returns — A ResponseOptions (or subclass) carrying the resolved defaults

createResponseStrategy(): IResponseStrategy

Build the response strategy for this driver

Returns — A fresh response strategy instance