Optionaloptions: ComponentOptionsProtectedenvProtectedhostProtectedtokenExecute aggregate pipeline with optional streaming support
Returns a chainable object that allows both buffered and streaming modes. Call .onData() to enable streaming mode, or await directly for buffered mode.
MongoDB aggregation pipeline
Chainable object with streaming methods and Promise interface
// Buffered response (default, up to 5K documents)
const result = await component.aggregate([{ $match: { status: 'active' } }]);
console.log(result.data); // All results at once
// Streaming response (up to 25K documents)
await component.aggregate([{ $match: { status: 'active' } }])
.onData((doc) => console.log('Received:', doc))
.onError((err) => console.error('Error:', err))
.onEnd(() => console.log('Stream complete'));
Concurrent update model by uuid
string - The uuid of the model
number - The version of the model
Optionaloptions: UpdateOptionsCreate many models
Optionaloptions: CreateManyOptionsFind method to search for models
The filters to apply to the search
Optionalopts: FindOptionsThe options to apply to the search
FindOne method to search for a single model
The filters to apply to the search
Optionalopts: FindOptionsThe options to apply to the search
Get model by uuid
string - The uuid of the model
(Promise
Modify models by filters
Optionaloptions: ModifyOptionsUpdate model by uuid
string - The uuid of the model
Optionaloptions: UpdateOptionsUpdate many models
Optionaloptions: UpdateManyOptions
Base client for the platform API Classes that extend PlatformBaseClient have intentins of only working in platform context
PlatformBaseClient
Param: client
The axios instance to use for the client
Example