MCPcopy
hub / github.com/hcengineering/platform / PresentationMiddleware

Interface PresentationMiddleware

packages/presentation/src/pipeline.ts:29–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27 * @public
28 */
29export interface PresentationMiddleware {
30 next?: PresentationMiddleware
31
32 tx: (tx: Tx) => Promise<TxResult>
33
34 notifyTx: (...tx: Tx[]) => Promise<void>
35
36 findAll: <T extends Doc>(
37 _class: Ref<Class<T>>,
38 query: DocumentQuery<T>,
39 options?: FindOptions<T>
40 ) => Promise<FindResult<T>>
41
42 domainRequest: <T>(
43 domain: OperationDomain,
44 params: DomainParams,
45 options?: DomainRequestOptions
46 ) => Promise<DomainResult<T>>
47
48 findOne: <T extends Doc>(
49 _class: Ref<Class<T>>,
50 query: DocumentQuery<T>,
51 options?: FindOptions<T>
52 ) => Promise<WithLookup<T> | undefined>
53
54 subscribe: <T extends Doc>(
55 _class: Ref<Class<T>>,
56 query: DocumentQuery<T>,
57 options: FindOptions<T> | undefined,
58 refresh: () => void
59 ) => Promise<{
60 unsubscribe: () => void
61 query?: DocumentQuery<T>
62 options?: FindOptions<T>
63 }>
64
65 close: () => Promise<void>
66}
67
68/**
69 * @public

Callers

nothing calls this directly

Implementers 5

OptimizeQueryMiddlewarepackages/presentation/src/pipeline.ts
AggregationMiddlewareplugins/view-resources/src/middleware.
AnalyticsMiddlewareplugins/view-resources/src/middleware.
ReadOnlyAccessMiddlewareplugins/view-resources/src/middleware.
ProcessMiddlewareplugins/process-resources/src/middlewa

Calls

no outgoing calls

Tested by

no test coverage detected