Soft delete an entity by its ID. This operation marks the entity as deleted without permanently destroying the record.
The ID of the entity to delete. @returns- A promise that resolves to the deleted entity or null if not found.
Find an entity by its ID.
The ID of the entity to find.
Optionalfields: SelectQuery<Webhook>[]Fields to select in the returned entity.
OptionalListQueryOptions: ListQueryOptions<Webhook>Options for listing queries.
Find one entity matching the query.
Optionalquery: FilterQuery<Webhook>Optionalfields: SelectQuery<Webhook>[]OptionalListQueryOptions: ListQueryOptions<Webhook>List entities matching the query.
Optionalquery: FilterQuery<Webhook>The query to filter documents.
Optionalfields: SelectQuery<Webhook>[]Fields to select in the returned entities.
OptionalListQueryOptions: ListQueryOptions<Webhook>Options for listing queries.
Retrieve paginated results. Only intended for use with the admin portal for performance reasons.
Optionaloptions: PaginateQueryOptions<Webhook>The pagination options
Update an entity by its ID.
The ID of the entity to update.
The partial entity to update.
Optionaloptions: UpdateOptionsUpdate a single entity matching the filter.
| null>} - A promise that resolves to the updated entity or null if not found.
Upsert a single record based on certain criteria.
The return types of this method align with the MongoDB UpdateResult interface
models.baseModel.Saved<T>['_id'] if the document did not exist (an upsert took place).null if the document did exist before the upsert operation.
The name of the model.