ProtectedenvProtectedhostProtectedtokenExecute 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 with optimistic locking
Uses version-based concurrency control — the update will fail with a conflict error if the document has been modified since the provided version. Supports inline update operators in the data payload.
The uuid of the model
The expected version of the model
Fields to update, optionally including update operators
Update options
The updated model
Create many models
Find 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
The options to apply to the search
Get model by uuid
string - The uuid of the model
(Promise
Install a new extension on the component
The extension definition to install
The component version to install the extension on
Updated component settings
Install a new policy on the component
The policy definition to install
The component version to install the policy on
Updated component settings
Modify models by filters
Updates all models matching the given filters. Supports inline update operators in the data payload for granular operations.
Query filters to match models
Fields to update, optionally including update operators
Modify options (e.g. upsert)
The modified models
Update model by uuid
Regular fields in data are applied via $set. You can include MongoDB
update operators (prefixed with $) directly in the data object for
granular updates like incrementing, pushing to arrays, etc.
The uuid of the model to update
Fields to update, optionally including update operators
Update options
The updated model
Update an existing extension on the component
The name of the extension to update
The component version
Partial extension data to update
Updated component settings
Update many models
Update an existing policy on the component
The name of the policy to update
The component version
Partial policy data to update
Updated component settings
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