diff --git a/packages/backend-app-api/api-report.md b/packages/backend-app-api/api-report.md index 0f8806870d..ea149a44f2 100644 --- a/packages/backend-app-api/api-report.md +++ b/packages/backend-app-api/api-report.md @@ -28,10 +28,12 @@ export interface Backend { } // @public (undocumented) -export const cacheFactory: ServiceFactory; +export const cacheFactory: ( + options?: undefined, +) => ServiceFactory; // @public (undocumented) -export const configFactory: ServiceFactory; +export const configFactory: (options?: undefined) => ServiceFactory; // @public (undocumented) export function createSpecializedBackend( @@ -41,28 +43,36 @@ export function createSpecializedBackend( // @public (undocumented) export interface CreateSpecializedBackendOptions { // (undocumented) - services: ServiceFactory[]; + services: (ServiceFactory | (() => ServiceFactory))[]; } // @public (undocumented) -export const databaseFactory: ServiceFactory; +export const databaseFactory: ( + options?: undefined, +) => ServiceFactory; // @public (undocumented) -export const discoveryFactory: ServiceFactory; +export const discoveryFactory: ( + options?: undefined, +) => ServiceFactory; // @public (undocumented) -export const httpRouterFactory: ServiceFactory; +export const httpRouterFactory: ( + options?: undefined, +) => ServiceFactory; // @public (undocumented) -export const loggerFactory: ServiceFactory; +export const loggerFactory: (options?: undefined) => ServiceFactory; // @public (undocumented) -export const permissionsFactory: ServiceFactory< - PermissionAuthorizer | PermissionEvaluator ->; +export const permissionsFactory: ( + options?: undefined, +) => ServiceFactory; // @public (undocumented) -export const schedulerFactory: ServiceFactory; +export const schedulerFactory: ( + options?: undefined, +) => ServiceFactory; // @public (undocumented) export type ServiceOrExtensionPoint = @@ -70,8 +80,12 @@ export type ServiceOrExtensionPoint = | ServiceRef; // @public (undocumented) -export const tokenManagerFactory: ServiceFactory; +export const tokenManagerFactory: ( + options?: undefined, +) => ServiceFactory; // @public (undocumented) -export const urlReaderFactory: ServiceFactory; +export const urlReaderFactory: ( + options?: undefined, +) => ServiceFactory; ``` diff --git a/packages/backend-defaults/api-report.md b/packages/backend-defaults/api-report.md index b5f1e154bb..050ebde759 100644 --- a/packages/backend-defaults/api-report.md +++ b/packages/backend-defaults/api-report.md @@ -12,6 +12,6 @@ export function createBackend(options?: CreateBackendOptions): Backend; // @public (undocumented) export interface CreateBackendOptions { // (undocumented) - services?: ServiceFactory[]; + services?: (ServiceFactory | (() => ServiceFactory))[]; } ``` diff --git a/packages/backend-plugin-api/api-report.md b/packages/backend-plugin-api/api-report.md index 5ea7f52c4b..30e58237af 100644 --- a/packages/backend-plugin-api/api-report.md +++ b/packages/backend-plugin-api/api-report.md @@ -109,16 +109,28 @@ export function createServiceFactory< TDeps extends { [name in string]: unknown; }, + TOpts extends + | { + [name in string]: unknown; + } + | undefined = undefined, >(factory: { service: ServiceRef; deps: TypesToServiceRef; - factory(deps: DepsToDepFactories): Promise>; -}): ServiceFactory; + factory( + deps: DepsToDepFactories, + options: TOpts, + ): Promise>; +}): undefined extends TOpts + ? (options?: TOpts) => ServiceFactory + : (options: TOpts) => ServiceFactory; // @public (undocumented) export function createServiceRef(options: { id: string; - defaultFactory?: (service: ServiceRef) => Promise>; + defaultFactory?: ( + service: ServiceRef, + ) => Promise | (() => ServiceFactory)>; }): ServiceRef; // @public (undocumented) diff --git a/packages/backend-test-utils/api-report.md b/packages/backend-test-utils/api-report.md index c0f6a43321..2fe4ed31d3 100644 --- a/packages/backend-test-utils/api-report.md +++ b/packages/backend-test-utils/api-report.md @@ -46,6 +46,7 @@ export interface TestBackendOptions< ...{ [index in keyof TServices]: | ServiceFactory + | (() => ServiceFactory) | [ServiceRef, Partial]; }, ];