Alokai

IntegrationContext

interface IntegrationContext<CLIENT = any, CONFIG = any, API extends ApiMethods = any, EXTENDED_API = any> extends MiddlewareContext<API, CONFIG, CLIENT> {
	api: API;
	client: CLIENT;
	config: CONFIG;
	createHttpError: (options: CreateHttpErrorOptions) => HttpError;
	extendedApi: EXTENDED_API;
}

Properties

NameRequiredTypeDescription
apiRequiredAPIThis property is deprecated and will be removed in the next major version.
clientRequiredCLIENT
configRequiredCONFIG
createHttpErrorRequired(options: CreateHttpErrorOptions) => HttpErrorFactory function for creating HTTP errors with proper status codes. Use this instead of throwing regular Error instances to ensure proper HTTP responses.
extendedApiRequiredEXTENDED_API

Referenced Types

On this page