From 55935bb55c5aed938fa8d8db271cf915089026dc Mon Sep 17 00:00:00 2001 From: ExWeiv GitHub BOT Date: Tue, 3 Dec 2024 18:08:51 +0000 Subject: [PATCH] Build and Generate Docs - BOT --- docs/functions/Hooks.afterCount.html | 2 +- docs/functions/Hooks.afterFindOne.html | 2 +- docs/functions/Hooks.afterGet.html | 2 +- docs/functions/Hooks.afterGetAndRemove.html | 2 +- docs/functions/Hooks.afterGetAndReplace.html | 2 +- docs/functions/Hooks.afterGetAndUpdate.html | 2 +- docs/functions/Hooks.afterIncrement.html | 2 +- docs/functions/Hooks.afterInsert.html | 2 +- docs/functions/Hooks.afterMultiply.html | 2 +- docs/functions/Hooks.afterPull.html | 2 +- docs/functions/Hooks.afterPush.html | 2 +- docs/functions/Hooks.afterQuery.html | 2 +- docs/functions/Hooks.afterRemove.html | 2 +- docs/functions/Hooks.afterReplace.html | 2 +- docs/functions/Hooks.afterUpdate.html | 2 +- docs/functions/Hooks.beforeCount.html | 2 +- docs/functions/Hooks.beforeFindOne.html | 2 +- docs/functions/Hooks.beforeGet.html | 2 +- docs/functions/Hooks.beforeGetAndRemove.html | 2 +- docs/functions/Hooks.beforeGetAndReplace.html | 2 +- docs/functions/Hooks.beforeGetAndUpdate.html | 2 +- docs/functions/Hooks.beforeIncrement.html | 2 +- docs/functions/Hooks.beforeInsert.html | 2 +- docs/functions/Hooks.beforeMultiply.html | 2 +- docs/functions/Hooks.beforePull.html | 2 +- docs/functions/Hooks.beforePush.html | 2 +- docs/functions/Hooks.beforeQuery.html | 2 +- docs/functions/Hooks.beforeRemove.html | 2 +- docs/functions/Hooks.beforeReplace.html | 2 +- docs/functions/Hooks.beforeUpdate.html | 2 +- docs/functions/Hooks.onFailure.html | 2 +- docs/functions/_version.html | 2 +- docs/functions/aggregate.html | 2 +- docs/functions/bulkInsert.html | 2 +- docs/functions/bulkRemove.html | 2 +- docs/functions/bulkSave.html | 2 +- docs/functions/bulkUpdate.html | 2 +- docs/functions/convertIdToObjectId.html | 2 +- docs/functions/convertIdToString.html | 2 +- docs/functions/createCollection.html | 2 +- docs/functions/deleteCollection.html | 2 +- docs/functions/filter.html | 2 +- docs/functions/findOne.html | 2 +- docs/functions/flushCache.html | 2 +- docs/functions/get.html | 2 +- docs/functions/getAndRemove.html | 2 +- docs/functions/getAndReplace.html | 2 +- docs/functions/getAndUpdate.html | 2 +- docs/functions/increment.html | 2 +- docs/functions/insert.html | 2 +- docs/functions/insertReference.html | 2 +- docs/functions/isReferenced.html | 2 +- docs/functions/listCollections.html | 2 +- docs/functions/multiply.html | 2 +- docs/functions/native.html | 2 +- docs/functions/pull.html | 2 +- docs/functions/push.html | 2 +- docs/functions/query.html | 2 +- docs/functions/queryReferenced.html | 2 +- docs/functions/remove.html | 2 +- docs/functions/removeReference.html | 2 +- docs/functions/renameCollection.html | 2 +- docs/functions/replace.html | 2 +- docs/functions/replaceReferences.html | 2 +- docs/functions/save.html | 2 +- docs/functions/truncate.html | 2 +- docs/functions/update.html | 2 +- .../CustomOptions.ConfigOptions.html | 4 +- .../CustomOptions.ConnectionOptions.html | 10 ++-- docs/interfaces/IncludeObject.html | 16 +++--- docs/interfaces/SyncWixApps.wixBlog.html | 4 +- docs/interfaces/SyncWixApps.wixEcom.html | 4 +- docs/interfaces/SyncWixApps.wixMarketing.html | 4 +- docs/interfaces/SyncWixApps.wixMembers.html | 4 +- .../SyncWixApps.wixPricingPlans.html | 4 +- docs/interfaces/SyncWixApps.wixStores.html | 4 +- docs/interfaces/WeivDataAggregate.html | 28 +++++----- docs/interfaces/WeivDataAggregateResult.html | 12 ++--- docs/interfaces/WeivDataFilter.html | 36 ++++++------- docs/interfaces/WeivDataOptions.html | 10 ++-- docs/interfaces/WeivDataOptionsCache.html | 14 ++--- docs/interfaces/WeivDataOptionsOwner.html | 12 ++--- docs/interfaces/WeivDataOptionsQuery.html | 12 ++--- docs/interfaces/WeivDataOptionsWrite.html | 12 ++--- .../interfaces/WeivDataOptionsWriteOwner.html | 14 ++--- docs/interfaces/WeivDataQuery.html | 54 +++++++++---------- .../WeivDataQueryReferencedResult.html | 14 ++--- docs/interfaces/WeivDataQueryResult.html | 26 ++++----- docs/types/BulkInsertResult.html | 2 +- docs/types/BulkRemoveResult.html | 2 +- docs/types/BulkSaveResult.html | 2 +- docs/types/BulkUpdateResult.html | 2 +- docs/types/CacheSelections.html | 2 +- docs/types/CollectionID.html | 2 +- docs/types/CustomOptions.WeivDataConfig.html | 2 +- docs/types/Errors.ErrorsList.html | 2 +- docs/types/Hooks.HookContext.html | 2 +- docs/types/Hooks.HookName.html | 2 +- docs/types/Item.html | 2 +- docs/types/ItemID.html | 2 +- docs/types/PipelineStage.html | 2 +- docs/types/PipelineStageKey.html | 2 +- docs/types/ReadConcern.html | 2 +- docs/types/ReferencedItem.html | 2 +- docs/types/ReferringItem.html | 2 +- docs/types/SaveResult.html | 2 +- docs/types/WeivDataAggregateRunOptions.html | 2 +- .../types/WeivDataQueryReferencedOptions.html | 2 +- 108 files changed, 236 insertions(+), 236 deletions(-) diff --git a/docs/functions/Hooks.afterCount.html b/docs/functions/Hooks.afterCount.html index 4571b267..728aa585 100644 --- a/docs/functions/Hooks.afterCount.html +++ b/docs/functions/Hooks.afterCount.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<number> | number

    The count to return to count() instead of the original count. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

    A hook that is triggered after a count() operation.

    -
    +
    diff --git a/docs/functions/Hooks.afterFindOne.html b/docs/functions/Hooks.afterFindOne.html index 842b27ed..e4d6286a 100644 --- a/docs/functions/Hooks.afterFindOne.html +++ b/docs/functions/Hooks.afterFindOne.html @@ -1,4 +1,4 @@ afterFindOne | WeivData API Reference | ExWeiv Apps
    • Type Parameters

      Parameters

      Returns Promise<Record<string, any>> | Record<string, any>

      The item to return to findOne() instead of the found item. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered after a findOne() operation.

      -
    +
    diff --git a/docs/functions/Hooks.afterGet.html b/docs/functions/Hooks.afterGet.html index 5c708115..d45e0fee 100644 --- a/docs/functions/Hooks.afterGet.html +++ b/docs/functions/Hooks.afterGet.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<Record<string, any>> | Record<string, any>

    The item to return to get() instead of the retrieved item. Returning a rejected promise will not block the operation, but will return a rejected promise to the operation caller as well as trigger the onFailure() hook.

    A hook that is triggered after a get() operation.

    -
    +
    diff --git a/docs/functions/Hooks.afterGetAndRemove.html b/docs/functions/Hooks.afterGetAndRemove.html index 288c4727..ee440696 100644 --- a/docs/functions/Hooks.afterGetAndRemove.html +++ b/docs/functions/Hooks.afterGetAndRemove.html @@ -1,4 +1,4 @@ afterGetAndRemove | WeivData API Reference | ExWeiv Apps
    • Type Parameters

      Parameters

      Returns Promise<Record<string, any>> | Record<string, any>

      The item to return to getAndRemove() instead of the removed item. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered after a getAndRemove() operation.

      -
    +
    diff --git a/docs/functions/Hooks.afterGetAndReplace.html b/docs/functions/Hooks.afterGetAndReplace.html index b78df6b3..df622180 100644 --- a/docs/functions/Hooks.afterGetAndReplace.html +++ b/docs/functions/Hooks.afterGetAndReplace.html @@ -1,4 +1,4 @@ afterGetAndReplace | WeivData API Reference | ExWeiv Apps
    • Type Parameters

      Parameters

      Returns Promise<Record<string, any>> | Record<string, any>

      The item to return to getAndReplace() instead of the replaced item. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered after a getAndReplace() operation.

      -
    +
    diff --git a/docs/functions/Hooks.afterGetAndUpdate.html b/docs/functions/Hooks.afterGetAndUpdate.html index 770c27c0..54b854cb 100644 --- a/docs/functions/Hooks.afterGetAndUpdate.html +++ b/docs/functions/Hooks.afterGetAndUpdate.html @@ -1,4 +1,4 @@ afterGetAndUpdate | WeivData API Reference | ExWeiv Apps
    • Type Parameters

      Parameters

      Returns Promise<Record<string, any>> | Record<string, any>

      The item to return to getAndUpdate() instead of the updated item. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered after a getAndUpdate() operation.

      -
    +
    diff --git a/docs/functions/Hooks.afterIncrement.html b/docs/functions/Hooks.afterIncrement.html index 110fc7e7..38b797d7 100644 --- a/docs/functions/Hooks.afterIncrement.html +++ b/docs/functions/Hooks.afterIncrement.html @@ -1,4 +1,4 @@ afterIncrement | WeivData API Reference | ExWeiv Apps
    • Type Parameters

      Parameters

      Returns Promise<Record<string, any>> | Record<string, any>

      The item to return to increment() instead of the incremented item. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered after a increment() operation.

      -
    +
    diff --git a/docs/functions/Hooks.afterInsert.html b/docs/functions/Hooks.afterInsert.html index b86e7647..6fd76639 100644 --- a/docs/functions/Hooks.afterInsert.html +++ b/docs/functions/Hooks.afterInsert.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<Record<string, any>> | Record<string, any>

    The item to return to insert() instead of the inserted item. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

    A hook that is triggered after an insert() operation.

    -
    +
    diff --git a/docs/functions/Hooks.afterMultiply.html b/docs/functions/Hooks.afterMultiply.html index 101a4d06..7db8cb3d 100644 --- a/docs/functions/Hooks.afterMultiply.html +++ b/docs/functions/Hooks.afterMultiply.html @@ -1,4 +1,4 @@ afterMultiply | WeivData API Reference | ExWeiv Apps
    • Type Parameters

      Parameters

      Returns Promise<Record<string, any>> | Record<string, any>

      The item to return to multiply() instead of the multiplied item. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered after a multiply() operation.

      -
    +
    diff --git a/docs/functions/Hooks.afterPull.html b/docs/functions/Hooks.afterPull.html index 408c3bda..610f16ff 100644 --- a/docs/functions/Hooks.afterPull.html +++ b/docs/functions/Hooks.afterPull.html @@ -1,4 +1,4 @@ afterPull | WeivData API Reference | ExWeiv Apps
    • Type Parameters

      Parameters

      • item: CItem

        The updated item with pull.

      • context: HookContext

        The item to return to pull() instead of the updated item. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

      Returns Promise<Record<string, any>> | Record<string, any>

      A hook that is triggered after a pull() operation.

      -
    +
    diff --git a/docs/functions/Hooks.afterPush.html b/docs/functions/Hooks.afterPush.html index cebbb4c6..8dce5711 100644 --- a/docs/functions/Hooks.afterPush.html +++ b/docs/functions/Hooks.afterPush.html @@ -1,4 +1,4 @@ afterPush | WeivData API Reference | ExWeiv Apps
    • Type Parameters

      Parameters

      Returns Promise<Record<string, any>> | Record<string, any>

      The item to return to push() instead of the updated item. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered after a push() operation.

      -
    +
    diff --git a/docs/functions/Hooks.afterQuery.html b/docs/functions/Hooks.afterQuery.html index 99561303..b0018373 100644 --- a/docs/functions/Hooks.afterQuery.html +++ b/docs/functions/Hooks.afterQuery.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<Record<string, any>> | Record<string, any>

    The item to return to find instead of the item retrieved from the database. Returning a rejected promise will not block the operation, but will return a rejected promise to the operation caller as well as trigger the onFailure() hook.

    A hook that is triggered after a find operation, for each of the items in the query results.

    -
    +
    diff --git a/docs/functions/Hooks.afterRemove.html b/docs/functions/Hooks.afterRemove.html index af51a217..0c4ce981 100644 --- a/docs/functions/Hooks.afterRemove.html +++ b/docs/functions/Hooks.afterRemove.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<Record<string, any>> | Record<string, any>

    The item to return to remove() instead of the deleted item. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

    A hook that is triggered after a remove() operation.

    -
    +
    diff --git a/docs/functions/Hooks.afterReplace.html b/docs/functions/Hooks.afterReplace.html index 1cc67610..11a4d5c9 100644 --- a/docs/functions/Hooks.afterReplace.html +++ b/docs/functions/Hooks.afterReplace.html @@ -1,4 +1,4 @@ afterReplace | WeivData API Reference | ExWeiv Apps
    • Type Parameters

      Parameters

      Returns Promise<Record<string, any>> | Record<string, any>

      The item to return to replace() instead of the replaced item. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered after an replace() operation.

      -
    +
    diff --git a/docs/functions/Hooks.afterUpdate.html b/docs/functions/Hooks.afterUpdate.html index 5903f33d..4f01fa63 100644 --- a/docs/functions/Hooks.afterUpdate.html +++ b/docs/functions/Hooks.afterUpdate.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<Record<string, any>> | Record<string, any>

    The item to return to update() instead of the updated item. Returning a rejected promise will not block the operation, but will return a rejected promise to the caller as well as trigger the onFailure() hook.

    A hook that is triggered after an update() operation.

    -
    +
    diff --git a/docs/functions/Hooks.beforeCount.html b/docs/functions/Hooks.beforeCount.html index fe7bfdc2..bb599ca6 100644 --- a/docs/functions/Hooks.beforeCount.html +++ b/docs/functions/Hooks.beforeCount.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<WeivDataQuery<CItem>> | WeivDataQuery<CItem>

    The query to be used for the count() operation instead of the original query. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

    A hook that is triggered before a count() operation.

    -
    +
    diff --git a/docs/functions/Hooks.beforeFindOne.html b/docs/functions/Hooks.beforeFindOne.html index 7808a033..dcd67a5c 100644 --- a/docs/functions/Hooks.beforeFindOne.html +++ b/docs/functions/Hooks.beforeFindOne.html @@ -1,3 +1,3 @@ beforeFindOne | WeivData API Reference | ExWeiv Apps
    • Parameters

      • findObject: { propertyName: string; value: any }
      • context: HookContext

      Returns
          | Promise<{ propertyName: string; value: any }>
          | { propertyName: string; value: any }

      The find object to be used instead of the original find object specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered before findOne() operation.

      -
    +
    diff --git a/docs/functions/Hooks.beforeGet.html b/docs/functions/Hooks.beforeGet.html index 8f2f95cc..85a35be8 100644 --- a/docs/functions/Hooks.beforeGet.html +++ b/docs/functions/Hooks.beforeGet.html @@ -2,4 +2,4 @@
  • context: HookContext

    The ID of the original item to be retrieved.

  • Returns Promise<ItemID> | ItemID

    The ID to be used for the get() operation instead of the original itemId specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

    A hook that is triggered before a get() operation.

    -
    +
    diff --git a/docs/functions/Hooks.beforeGetAndRemove.html b/docs/functions/Hooks.beforeGetAndRemove.html index 19376cd0..f0358fb6 100644 --- a/docs/functions/Hooks.beforeGetAndRemove.html +++ b/docs/functions/Hooks.beforeGetAndRemove.html @@ -1,4 +1,4 @@ beforeGetAndRemove | WeivData API Reference | ExWeiv Apps
    • Parameters

      Returns Promise<ItemID> | ItemID

      The itemId of the item to be removed instead of the original itemId specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered before getAndRemove() operation.

      -
    +
    diff --git a/docs/functions/Hooks.beforeGetAndReplace.html b/docs/functions/Hooks.beforeGetAndReplace.html index 7d574290..dd20c29a 100644 --- a/docs/functions/Hooks.beforeGetAndReplace.html +++ b/docs/functions/Hooks.beforeGetAndReplace.html @@ -1,4 +1,4 @@ beforeGetAndReplace | WeivData API Reference | ExWeiv Apps
    • Type Parameters

      Parameters

      Returns Promise<Record<string, any>> | Record<string, any>

      The item to be replaced instead of the original item specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered before getAndReplace() operation.

      -
    +
    diff --git a/docs/functions/Hooks.beforeGetAndUpdate.html b/docs/functions/Hooks.beforeGetAndUpdate.html index cf4c879f..abc3a448 100644 --- a/docs/functions/Hooks.beforeGetAndUpdate.html +++ b/docs/functions/Hooks.beforeGetAndUpdate.html @@ -1,4 +1,4 @@ beforeGetAndUpdate | WeivData API Reference | ExWeiv Apps
    • Type Parameters

      Parameters

      Returns Promise<Record<string, any>> | Record<string, any>

      The item to be updated instead of the original item specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered before getAndUpdate() operation.

      -
    +
    diff --git a/docs/functions/Hooks.beforeIncrement.html b/docs/functions/Hooks.beforeIncrement.html index 4836df16..5db405aa 100644 --- a/docs/functions/Hooks.beforeIncrement.html +++ b/docs/functions/Hooks.beforeIncrement.html @@ -1,4 +1,4 @@ beforeIncrement | WeivData API Reference | ExWeiv Apps
    • Parameters

      • incObject: { propertyName: string; value: number }

        The original incObject to be used.

      • context: HookContext

      Returns
          | Promise<{ propertyName: string; value: number }>
          | { propertyName: string; value: number }

      The incObject to be used instead of the original incObject specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered before increment() operation.

      -
    +
    diff --git a/docs/functions/Hooks.beforeInsert.html b/docs/functions/Hooks.beforeInsert.html index 64ced149..dffd3f4a 100644 --- a/docs/functions/Hooks.beforeInsert.html +++ b/docs/functions/Hooks.beforeInsert.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<Record<string, any>> | Record<string, any>

    The item to be inserted instead of the original item specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

    A hook that is triggered before an insert() operation.

    -
    +
    diff --git a/docs/functions/Hooks.beforeMultiply.html b/docs/functions/Hooks.beforeMultiply.html index a6cce536..a1092b30 100644 --- a/docs/functions/Hooks.beforeMultiply.html +++ b/docs/functions/Hooks.beforeMultiply.html @@ -1,4 +1,4 @@ beforeMultiply | WeivData API Reference | ExWeiv Apps
    • Parameters

      • multObject: { propertyName: string; value: number }

        The original multObject to be used.

      • context: HookContext

      Returns
          | Promise<{ propertyName: string; value: number }>
          | { propertyName: string; value: number }

      The multObject to be used instead of the original multObject specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered before multiply() operation.

      -
    +
    diff --git a/docs/functions/Hooks.beforePull.html b/docs/functions/Hooks.beforePull.html index 7f7f152c..0575e1a3 100644 --- a/docs/functions/Hooks.beforePull.html +++ b/docs/functions/Hooks.beforePull.html @@ -1,4 +1,4 @@ beforePull | WeivData API Reference | ExWeiv Apps
    • Parameters

      • pullObject: { propertyName: string; value: any }

        The original pushObject to be used.

      • context: HookContext

      Returns
          | Promise<{ propertyName: string; value: any }>
          | { propertyName: string; value: any }

      The pullObject to be used instead of the original pullObject specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered before pull() operation.

      -
    +
    diff --git a/docs/functions/Hooks.beforePush.html b/docs/functions/Hooks.beforePush.html index c493b1cb..b22b7ad9 100644 --- a/docs/functions/Hooks.beforePush.html +++ b/docs/functions/Hooks.beforePush.html @@ -1,4 +1,4 @@ beforePush | WeivData API Reference | ExWeiv Apps
    • Parameters

      • pushObject: { propertyName: string; value: any }

        The original pushObject to be used.

      • context: HookContext

      Returns
          | Promise<{ propertyName: string; value: any }>
          | { propertyName: string; value: any }

      The pushObject to be used instead of the original pushObject specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

      A hook that is triggered before push() operation.

      -
    +
    diff --git a/docs/functions/Hooks.beforeQuery.html b/docs/functions/Hooks.beforeQuery.html index a35c0a60..e9ffcc41 100644 --- a/docs/functions/Hooks.beforeQuery.html +++ b/docs/functions/Hooks.beforeQuery.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<WeivDataQuery<CItem>> | WeivDataQuery<CItem>

    The query to use instead of the original query specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the operation caller as well as trigger the onFailure() hook.

    A hook that is triggered before a find() operation.

    -
    +
    diff --git a/docs/functions/Hooks.beforeRemove.html b/docs/functions/Hooks.beforeRemove.html index 12562beb..e67a2d38 100644 --- a/docs/functions/Hooks.beforeRemove.html +++ b/docs/functions/Hooks.beforeRemove.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<ItemID> | ItemID

    The ID to be used for the remove() instead of the original itemId specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

    A hook that is called before a remove() operation.

    -
    +
    diff --git a/docs/functions/Hooks.beforeReplace.html b/docs/functions/Hooks.beforeReplace.html index 64d24c5f..23a5ece9 100644 --- a/docs/functions/Hooks.beforeReplace.html +++ b/docs/functions/Hooks.beforeReplace.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<Record<string, any>> | Record<string, any>

    The item to be replaced instead of the original item specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

    A hook that is triggered before an replace() operation.

    -
    +
    diff --git a/docs/functions/Hooks.beforeUpdate.html b/docs/functions/Hooks.beforeUpdate.html index b6047a66..228f5426 100644 --- a/docs/functions/Hooks.beforeUpdate.html +++ b/docs/functions/Hooks.beforeUpdate.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<Record<string, any>> | Record<string, any>

    The item to be updated instead of the original item specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

    A hook that is triggered before an update() operation.

    -
    +
    diff --git a/docs/functions/Hooks.onFailure.html b/docs/functions/Hooks.onFailure.html index 8047ffc1..16d03091 100644 --- a/docs/functions/Hooks.onFailure.html +++ b/docs/functions/Hooks.onFailure.html @@ -2,4 +2,4 @@
  • context: HookContext

    Contextual information about the hook.

  • Returns Promise<Record<string, any>>

    Fulfilled - Returning a fulfilled promise will result in a fulfilled data operation with the provided result. Rejected - Returning a rejected promise will result in returning a rejected promise to the caller of the data operation.

    A hook that is triggered on any error or rejected Promise from any of the weiv-data hook operations. (Operations except hooks doesn't trigger that currently.)

    -
    +
    diff --git a/docs/functions/_version.html b/docs/functions/_version.html index aadaa52a..08251e3c 100644 --- a/docs/functions/_version.html +++ b/docs/functions/_version.html @@ -1,2 +1,2 @@ _version | WeivData API Reference | ExWeiv Apps
    • Returns string

      Returns the current version of WeivData, for developers.

      -
    +
    diff --git a/docs/functions/aggregate.html b/docs/functions/aggregate.html index 895b1963..9d6b24cc 100644 --- a/docs/functions/aggregate.html +++ b/docs/functions/aggregate.html @@ -1,4 +1,4 @@ aggregate | WeivData API Reference | ExWeiv Apps
    +
    diff --git a/docs/functions/bulkInsert.html b/docs/functions/bulkInsert.html index f61fa53e..1b162732 100644 --- a/docs/functions/bulkInsert.html +++ b/docs/functions/bulkInsert.html @@ -3,4 +3,4 @@
  • Optionaloptions: WeivDataOptionsWrite

    An object containing options to use when processing this operation.

  • Returns Promise<BulkInsertResult<CItem>>

    Fulfilled - The results of the bulk insert. Rejected - The error that caused the rejection.

    Adds a number of items to a collection.

    -
    +
    diff --git a/docs/functions/bulkRemove.html b/docs/functions/bulkRemove.html index 2ce924a0..38a019a3 100644 --- a/docs/functions/bulkRemove.html +++ b/docs/functions/bulkRemove.html @@ -3,4 +3,4 @@
  • Optionaloptions: WeivDataOptionsOwner

    An object containing options to use when processing this operation.

  • Returns Promise<BulkRemoveResult<CItemID>>

    Fulfilled - The results of the bulk remove. Rejected - The error that caused the rejection.

    Removes a number of items from a collection.

    -
    +
    diff --git a/docs/functions/bulkSave.html b/docs/functions/bulkSave.html index d7bcece8..8f54ec4b 100644 --- a/docs/functions/bulkSave.html +++ b/docs/functions/bulkSave.html @@ -2,4 +2,4 @@
  • items: CItem[]

    The items to insert or update.

  • Optionaloptions: WeivDataOptionsWriteOwner

    An object containing options to use when processing this operation.

  • Returns Promise<BulkSaveResult<CItem>>

    Inserts or updates a number of items in a collection.

    -
    +
    diff --git a/docs/functions/bulkUpdate.html b/docs/functions/bulkUpdate.html index 6c6904cf..cd9aba21 100644 --- a/docs/functions/bulkUpdate.html +++ b/docs/functions/bulkUpdate.html @@ -3,4 +3,4 @@
  • Optionaloptions: WeivDataOptionsWriteOwner

    An object containing options to use when processing this operation.

  • Returns Promise<BulkUpdateResult<CItem>>

    Fulfilled - The results of the bulk save. Rejected - The error that caused the rejection.

    Updates a number of items in a collection.

    -
    +
    diff --git a/docs/functions/convertIdToObjectId.html b/docs/functions/convertIdToObjectId.html index f7f72c93..c991ae2e 100644 --- a/docs/functions/convertIdToObjectId.html +++ b/docs/functions/convertIdToObjectId.html @@ -1,4 +1,4 @@ convertIdToObjectId | WeivData API Reference | ExWeiv Apps
    • Parameters

      • id: ItemID

        ID you want to convert can be string or a valid ObjectId

      Returns ObjectId

      Fulfilled - ObjectId version of the id.

      This function converts an id to ObjectId if it's a string, if not it'll return the given input.

      -
    +
    diff --git a/docs/functions/convertIdToString.html b/docs/functions/convertIdToString.html index 3c9b6650..826e0c44 100644 --- a/docs/functions/convertIdToString.html +++ b/docs/functions/convertIdToString.html @@ -2,4 +2,4 @@
  • Optionalencoding: "base64" | "hex"

    Optional converting method can be "base64" or "hex" defaults to "hex"

  • Returns string

    Fulfilled - String version of the id.

    This function converts an id to string if it's an ObjectId, if not it'll return the given input.

    -
    +
    diff --git a/docs/functions/createCollection.html b/docs/functions/createCollection.html index 15ce007a..65488c48 100644 --- a/docs/functions/createCollection.html +++ b/docs/functions/createCollection.html @@ -2,4 +2,4 @@
  • OptionalsuppressAuth: boolean

    A boolean value to bypass permissions.

  • Optionaloptions: CreateCollectionOptions

    Native options of MongoDB driver when creating a collection. Read Here

  • Returns Promise<void>

    Creates a new collection inside of a selected database. (User must have createCollection permission inside MongoDB dashboard).

    -
    +
    diff --git a/docs/functions/deleteCollection.html b/docs/functions/deleteCollection.html index f38708db..2309299b 100644 --- a/docs/functions/deleteCollection.html +++ b/docs/functions/deleteCollection.html @@ -2,4 +2,4 @@
  • OptionalsuppressAuth: boolean

    A boolean value to bypass permissions.

  • Optionaloptions: CreateCollectionOptions

    Native options of MongoDB driver when deleting a collection. Read Here

  • Returns Promise<boolean>

    Deletes a collection inside of a selected database. (User must have dropCollection permission inside MongoDB dashboard).

    -
    +
    diff --git a/docs/functions/filter.html b/docs/functions/filter.html index fc9b70fa..4ac4cd78 100644 --- a/docs/functions/filter.html +++ b/docs/functions/filter.html @@ -1,3 +1,3 @@ filter | WeivData API Reference | ExWeiv Apps
    +
    diff --git a/docs/functions/findOne.html b/docs/functions/findOne.html index 4674581e..b21fc853 100644 --- a/docs/functions/findOne.html +++ b/docs/functions/findOne.html @@ -4,4 +4,4 @@
  • Optionaloptions: WeivDataOptionsCache

    An object containing options to use when processing this operation.

  • Returns Promise<Item | undefined>

    Fulfilled - Found item. Rejected - The error caused the rejection.

    You can use findOne to find a single item from your collections based on .eq filter for any field.

    -
    +
    diff --git a/docs/functions/flushCache.html b/docs/functions/flushCache.html index b3f312e7..c05df7f2 100644 --- a/docs/functions/flushCache.html +++ b/docs/functions/flushCache.html @@ -1,3 +1,3 @@ flushCache | WeivData API Reference | ExWeiv Apps
    • Parameters

      • Optionalfilters: CacheSelections[]

        Filter which cache to flush. Pass empty array to flush all of them.

      Returns void

      Use when you want to flush the caches internally. You can choose caches to flush or pass empty array to flush all of them.

      -
    +
    diff --git a/docs/functions/get.html b/docs/functions/get.html index bba3f8d2..b7058805 100644 --- a/docs/functions/get.html +++ b/docs/functions/get.html @@ -3,4 +3,4 @@
  • Optionaloptions: WeivDataOptionsCache

    An object containing options to use when processing this operation.

  • Returns Promise<Item | null>

    Fulfilled - The retrieved item or null if not found. Rejected - The error that caused the rejection.

    Retrieves an item from a collection.

    -
    +
    diff --git a/docs/functions/getAndRemove.html b/docs/functions/getAndRemove.html index 5d27ed08..3550c70a 100644 --- a/docs/functions/getAndRemove.html +++ b/docs/functions/getAndRemove.html @@ -3,4 +3,4 @@
  • Optionaloptions: WeivDataOptionsOwner

    An object containing options to use when processing this operation.

  • Returns Promise<Item | undefined>

    Fulfilled - Removed item. Rejected - The error caused the rejection.

    You can use getAndRemove to find an item by it's _id and remove it.

    -
    +
    diff --git a/docs/functions/getAndReplace.html b/docs/functions/getAndReplace.html index 9325141e..b3f17da7 100644 --- a/docs/functions/getAndReplace.html +++ b/docs/functions/getAndReplace.html @@ -4,4 +4,4 @@
  • Optionaloptions: WeivDataOptionsOwner

    An object containing options to use when processing this operation.

  • Returns Promise<CItem | undefined>

    Fulfilled - Updated item. Rejected - The error caused the rejection.

    You can use getAndReplace to find an item by it's _id and replace it with new data.

    -
    +
    diff --git a/docs/functions/getAndUpdate.html b/docs/functions/getAndUpdate.html index 0a2251e7..30a90591 100644 --- a/docs/functions/getAndUpdate.html +++ b/docs/functions/getAndUpdate.html @@ -4,4 +4,4 @@
  • Optionaloptions: WeivDataOptionsOwner

    An object containing options to use when processing this operation.

  • Returns Promise<CItem | undefined>

    Fulfilled - Updated item. Rejected - The error caused the rejection.

    You can use getAndUpdate to find an item by it's _id and update it's content.

    -
    +
    diff --git a/docs/functions/increment.html b/docs/functions/increment.html index 623e5e08..5ff1c37a 100644 --- a/docs/functions/increment.html +++ b/docs/functions/increment.html @@ -5,4 +5,4 @@
  • Optionaloptions: WeivDataOptions

    An object containing options to use when processing this operation.

  • Returns Promise<CItem | null>

    Fulfilled - Updated item. Rejected - The error caused the rejection.

    You can use increment function to increment the value of a filed in an item. (Negative values are possible too)

    -
    +
    diff --git a/docs/functions/insert.html b/docs/functions/insert.html index 9dc04992..ed35744c 100644 --- a/docs/functions/insert.html +++ b/docs/functions/insert.html @@ -3,4 +3,4 @@
  • Optionaloptions: WeivDataOptionsWrite

    An object containing options to use when processing this operation.

  • Returns Promise<CItem>

    Fulfilled - The item that was added. Rejected - The error that caused the rejection.

    Adds an item to a collection.

    -
    +
    diff --git a/docs/functions/insertReference.html b/docs/functions/insertReference.html index 21d36100..d027e634 100644 --- a/docs/functions/insertReference.html +++ b/docs/functions/insertReference.html @@ -4,4 +4,4 @@
  • referencedItem: Item | ItemID | Item[] | ItemID[]

    The referenced item, referenced item's ID, an array of referenced items, or an array of referenced item IDs.

  • Optionaloptions: WeivDataOptions

    An object containing options to use when processing this operation.

  • Returns Promise<void>

    Inserts a reference in the specified property.

    -
    +
    diff --git a/docs/functions/isReferenced.html b/docs/functions/isReferenced.html index 5d65fdb7..2b3f08d1 100644 --- a/docs/functions/isReferenced.html +++ b/docs/functions/isReferenced.html @@ -5,4 +5,4 @@
  • Optionaloptions: WeivDataOptionsCache

    An object containing options to use when processing this operation.

  • Returns Promise<boolean>

    Fulfilled - Whether the referring item contains a reference to the referenced item or not. Rejected - The error that caused the rejection.

    Checks if a reference to the referenced item exists in the specified property of the referring item.

    -
    +
    diff --git a/docs/functions/listCollections.html b/docs/functions/listCollections.html index 73f0c72b..e5d25c7a 100644 --- a/docs/functions/listCollections.html +++ b/docs/functions/listCollections.html @@ -4,4 +4,4 @@
  • OptionallistOptions: ListCollectionsOptions

    MongoDB native listCollections options. Read More.

  • Returns Promise<CollectionInfo[]>

    Fulfilled - Array of CollectionInfo.

    Lists collections inside of a selected database. (User must have listCollections permission inside MongoDB dashboard).

    -
    +
    diff --git a/docs/functions/multiply.html b/docs/functions/multiply.html index e6916107..336a9407 100644 --- a/docs/functions/multiply.html +++ b/docs/functions/multiply.html @@ -5,4 +5,4 @@
  • Optionaloptions: WeivDataOptions

    An object containing options to use when processing this operation.

  • Returns Promise<CItem | null>

    Fulfilled - Updated item. Rejected - The error caused the rejection.

    You can use multiply function to multiply the value of a filed in an item.

    -
    +
    diff --git a/docs/functions/native.html b/docs/functions/native.html index 6cc05614..249067d9 100644 --- a/docs/functions/native.html +++ b/docs/functions/native.html @@ -4,4 +4,4 @@

    Use native MongoDB syntax and perform any action you want inside a collection. This API can be very useful when you need something that doesn't exist in weiv-data library. You don't need to manage clients, permissions etc. instead you will only write the actions you want to take.

    Anything done with native collection cursor won't trigger any hooks. Handle hooks manually by handling them inside your code.

    -
    +
    diff --git a/docs/functions/pull.html b/docs/functions/pull.html index fc79345f..eb44866b 100644 --- a/docs/functions/pull.html +++ b/docs/functions/pull.html @@ -5,4 +5,4 @@
  • Optionaloptions: WeivDataOptions

    An object containing options to use when processing this operation.

  • Returns Promise<CItem | null>

    Fulfilled - Updated item. Rejected - The error caused the rejection.

    You can use pull function to pull values from an array field in an item. This function uses $pull operator to remove data from an array.

    -
    +
    diff --git a/docs/functions/push.html b/docs/functions/push.html index 913425e5..76c855d8 100644 --- a/docs/functions/push.html +++ b/docs/functions/push.html @@ -5,4 +5,4 @@
  • Optionaloptions: WeivDataOptions

    An object containing options to use when processing this operation.

  • Returns Promise<CItem | null>

    Fulfilled - Updated item. Rejected - The error caused the rejection.

    You can use push function to push new values into an array field in an item. This function uses $push operator to remove data from an array.

    -
    +
    diff --git a/docs/functions/query.html b/docs/functions/query.html index 064c9a69..ff8b6010 100644 --- a/docs/functions/query.html +++ b/docs/functions/query.html @@ -1,4 +1,4 @@ query | WeivData API Reference | ExWeiv Apps
    +
    diff --git a/docs/functions/queryReferenced.html b/docs/functions/queryReferenced.html index a5342a14..19591a1d 100644 --- a/docs/functions/queryReferenced.html +++ b/docs/functions/queryReferenced.html @@ -6,4 +6,4 @@
  • Optionaloptions: WeivDataOptions

    An object containing options to use when processing this operation.

  • Returns Promise<WeivDataQueryReferencedResult<CItem>>

    Fulfilled - The referenced items. Rejected - The error that caused the rejection.

    Gets the full items referenced in the specified property.

    -
    +
    diff --git a/docs/functions/remove.html b/docs/functions/remove.html index 9548a2c4..bb129f71 100644 --- a/docs/functions/remove.html +++ b/docs/functions/remove.html @@ -3,4 +3,4 @@
  • Optionaloptions: WeivDataOptionsOwner

    An object containing options to use when processing this operation.

  • Returns Promise<CItem | null>

    Fulfilled - The removed item, or null if the item was not found. Rejected - The error that caused the rejection.

    Removes an item from a collection.

    -
    +
    diff --git a/docs/functions/removeReference.html b/docs/functions/removeReference.html index 7f8986e3..7bdd5ac1 100644 --- a/docs/functions/removeReference.html +++ b/docs/functions/removeReference.html @@ -5,4 +5,4 @@
  • Optionaloptions: WeivDataOptions

    An object containing options to use when processing this operation.

  • Returns Promise<void>

    Fulfilled - When the references have been removed. Rejected - The error that caused the rejection.

    Removes a reference from the specified property.

    -
    +
    diff --git a/docs/functions/renameCollection.html b/docs/functions/renameCollection.html index 438c884a..cdb04eb1 100644 --- a/docs/functions/renameCollection.html +++ b/docs/functions/renameCollection.html @@ -3,4 +3,4 @@
  • Optionaloptions: WeivDataOptions

    An object containing options to use when processing this operation.

  • OptionalrenameOptions: RenameOptions

    Native options of MongoDB driver when renaming a collection. Read More.

  • Returns Promise<void>

    Renames a collection inside of a selected database. (User must have renameCollection permission inside MongoDB dashboard).

    -
    +
    diff --git a/docs/functions/replace.html b/docs/functions/replace.html index 1b652a1d..2cb8980c 100644 --- a/docs/functions/replace.html +++ b/docs/functions/replace.html @@ -4,4 +4,4 @@

    Returns Promise<CItem>

    Fulfilled - The item that was replaced. Rejected - The error that caused the rejection.

    Replaces and item in a collection. The item you passed with item param will take the place of existing data/document in your collection.

    This function has it's own hooks beforeUpdate and afterUpdate is not used here instead beforeReplace and afterReplace is used.

    -
    +
    diff --git a/docs/functions/replaceReferences.html b/docs/functions/replaceReferences.html index fd80c0c7..c1a578a2 100644 --- a/docs/functions/replaceReferences.html +++ b/docs/functions/replaceReferences.html @@ -5,4 +5,4 @@
  • Optionaloptions: WeivDataOptions

    An object containing options to use when processing this operation.

  • Returns Promise<void>

    Fulfilled - When the references have been inserted into relation array field. Rejected - The error that caused the rejection.

    Replaces current references with references in the specified property. *This function uses update function internally.

    -
    +
    diff --git a/docs/functions/save.html b/docs/functions/save.html index acc3e3ec..50a6c77d 100644 --- a/docs/functions/save.html +++ b/docs/functions/save.html @@ -3,4 +3,4 @@
  • Optionaloptions: WeivDataOptionsWriteOwner

    An object containing options to use when processing this operation.

  • Returns Promise<
        SaveResult<
            CItem["_id"] extends string
            | ObjectId
                ? CItem
                : CItem & { _id: ItemID },
        >,
    >

    Fulfilled - The item that was either inserted or updated, depending on whether it previously existed in the collection. Rejected - The error that caused the rejection.

    Inserts or updates an item in a collection.

    -
    +
    diff --git a/docs/functions/truncate.html b/docs/functions/truncate.html index a7ecd048..34a71796 100644 --- a/docs/functions/truncate.html +++ b/docs/functions/truncate.html @@ -2,4 +2,4 @@
  • Optionaloptions: WeivDataOptions

    An object containing options you can use when calling this function.

  • Returns Promise<boolean>

    Fulfilled - When the items have been removed. Rejected - The error that caused the rejection.

    Removes all items from a collection.

    -
    +
    diff --git a/docs/functions/update.html b/docs/functions/update.html index a22ceb8a..052cfbf9 100644 --- a/docs/functions/update.html +++ b/docs/functions/update.html @@ -5,4 +5,4 @@

    Updates an item in a collection. !! IMPORTANT: In weiv-data you don't need to pass the al data. It's enough to just pass the updated values in your document. Anything that's not in the update object will be untouched and will stay how it was before. In wix-data if you don't pass a field in your document it will be overwritten as undefined. This doesn't apply to weiv-data. If you want this logic use replace function instead.

    -
    +
    diff --git a/docs/interfaces/CustomOptions.ConfigOptions.html b/docs/interfaces/CustomOptions.ConfigOptions.html index f3418265..20e90b4b 100644 --- a/docs/interfaces/CustomOptions.ConfigOptions.html +++ b/docs/interfaces/CustomOptions.ConfigOptions.html @@ -1,5 +1,5 @@ ConfigOptions | WeivData API Reference | ExWeiv Apps

    Config options file (backend/WeivData/config.js) used for getting configs of WeivData, it's optional and not required so you don't have to define the function but you must create the config.js file.

    -
    interface ConfigOptions {
        config: () => WeivDataConfig;
    }

    Properties

    interface ConfigOptions {
        config: () => WeivDataConfig;
    }

    Properties

    Properties

    config: () => WeivDataConfig

    config function which should be exported inside backend/WeivData/config.js file, is exporting the config object of WeivData to play with settings of the library.

    // Enable console logging (example)
    export const config = () => {
    return {
    logs: true
    }
    }
    @@ -7,4 +7,4 @@

    async is not allowed for config.

    -
    +
    diff --git a/docs/interfaces/CustomOptions.ConnectionOptions.html b/docs/interfaces/CustomOptions.ConnectionOptions.html index 99d51b75..f8a78380 100644 --- a/docs/interfaces/CustomOptions.ConnectionOptions.html +++ b/docs/interfaces/CustomOptions.ConnectionOptions.html @@ -10,16 +10,16 @@

    You can create async functions too (in case you need to fetch something before setting up things).

    -
    interface ConnectionOptions {
        adminClientOptions: () => | MongoClientOptions
        | Promise<MongoClientOptions>;
        clientCacheRules: () => Options | Promise<Options>;
        memberClientOptions: () => MongoClientOptions | Promise<MongoClientOptions>;
        visitorClientOptions: () => | MongoClientOptions
        | Promise<MongoClientOptions>;
    }

    Properties

    interface ConnectionOptions {
        adminClientOptions: () => | MongoClientOptions
        | Promise<MongoClientOptions>;
        clientCacheRules: () => Options | Promise<Options>;
        memberClientOptions: () => MongoClientOptions | Promise<MongoClientOptions>;
        visitorClientOptions: () => | MongoClientOptions
        | Promise<MongoClientOptions>;
    }

    Properties

    adminClientOptions: () => MongoClientOptions | Promise<MongoClientOptions>

    This is the same MongoClientOptions just like in MongoDB NodeJS driver, you can customize the admin MongoClient options.

    Read more about MongoClientOptions

    -
    clientCacheRules: () => Options | Promise<Options>

    This is general cache rules for all MongoClients you can define node-cache options here. These options will apply to all roles clients.

    +
    clientCacheRules: () => Options | Promise<Options>

    This is general cache rules for all MongoClients you can define node-cache options here. These options will apply to all roles clients.

    Read more about NodeCache.Options

    -
    memberClientOptions: () => MongoClientOptions | Promise<MongoClientOptions>

    This is the same MongoClientOptions just like in MongoDB NodeJS driver, you can customize the member MongoClient options.

    +
    memberClientOptions: () => MongoClientOptions | Promise<MongoClientOptions>

    This is the same MongoClientOptions just like in MongoDB NodeJS driver, you can customize the member MongoClient options.

    Read more about MongoClientOptions

    -
    visitorClientOptions: () => MongoClientOptions | Promise<MongoClientOptions>

    This is the same MongoClientOptions just like in MongoDB NodeJS driver, you can customize the visitor MongoClient options.

    +
    visitorClientOptions: () => MongoClientOptions | Promise<MongoClientOptions>

    This is the same MongoClientOptions just like in MongoDB NodeJS driver, you can customize the visitor MongoClient options.

    Read more about MongoClientOptions

    -
    +
    diff --git a/docs/interfaces/IncludeObject.html b/docs/interfaces/IncludeObject.html index 6cbbfe38..08fc7f83 100644 --- a/docs/interfaces/IncludeObject.html +++ b/docs/interfaces/IncludeObject.html @@ -1,5 +1,5 @@ IncludeObject | WeivData API Reference | ExWeiv Apps

    An object to define some options when including other relational fields.

    -
    interface IncludeObject {
        as?: string;
        collectionName: string;
        countItems?: boolean;
        fieldName: string;
        foreignField?: string;
        maxItems?: number;
        sort?: { [propertyName: string]: -1 | 1 };
    }

    Properties

    as? +
    interface IncludeObject {
        as?: string;
        collectionName: string;
        countItems?: boolean;
        fieldName: string;
        foreignField?: string;
        maxItems?: number;
        sort?: { [propertyName: string]: -1 | 1 };
    }

    Properties

    Properties

    as?: string

    Custom return name for included items. Defaults to fieldName.

    -
    collectionName: string

    Collection of referenced item/s (only collection name)

    -
    countItems?: boolean

    Enable counting total items or not. Defaults to false.

    -
    fieldName: string

    Property/field name of referenced items in the current item.

    -
    foreignField?: string

    Foreign field name. Defaults to _id.

    -
    maxItems?: number

    Maximum number of items to include. Defaults to 50.

    -
    sort?: { [propertyName: string]: -1 | 1 }

    By default all referenced items are sorted via _createdDate field in ascending order (1) but you can customize that stage too!

    -
    +
    collectionName: string

    Collection of referenced item/s (only collection name)

    +
    countItems?: boolean

    Enable counting total items or not. Defaults to false.

    +
    fieldName: string

    Property/field name of referenced items in the current item.

    +
    foreignField?: string

    Foreign field name. Defaults to _id.

    +
    maxItems?: number

    Maximum number of items to include. Defaults to 50.

    +
    sort?: { [propertyName: string]: -1 | 1 }

    By default all referenced items are sorted via _createdDate field in ascending order (1) but you can customize that stage too!

    +
    diff --git a/docs/interfaces/SyncWixApps.wixBlog.html b/docs/interfaces/SyncWixApps.wixBlog.html index 789002ef..074286e0 100644 --- a/docs/interfaces/SyncWixApps.wixBlog.html +++ b/docs/interfaces/SyncWixApps.wixBlog.html @@ -15,7 +15,7 @@
    import { SyncWixApps } from '@exweiv/weiv-data';
    const { wixBlog } = SyncWixApps;

    export const wixBlog_onCategoryCreated = (event) => wixBlog.onCategoryCreated(event);
    export const wixBlog_onCategoryDeleted = (event) => wixBlog.onCategoryDeleted(event);
    export const wixBlog_onCategoryUpdated = (event) => wixBlog.onCategoryUpdated(event);
    export const wixBlog_onTagCreated = (event) => wixBlog.onTagCreated(event);
    export const wixBlog_onTagDeleted = (event) => wixBlog.onTagDeleted(event);
    export const wixBlog_onTagUpdated = (event) => wixBlog.onTagUpdated(event);
    export const wixBlog_onPostCreated = (event) => wixBlog.onPostCreated(event);
    export const wixBlog_onPostDeleted = (event) => wixBlog.onPostDeleted(event);
    export const wixBlog_onPostUpdated = (event) => wixBlog.onPostUpdated(event);
    -
    interface wixBlog {
        onCategoryCreated(event: any): Promise<void>;
        onCategoryDeleted(event: any): Promise<void>;
        onCategoryUpdated(event: any): Promise<void>;
        onPostCreated(event: any): Promise<void>;
        onPostDeleted(event: any): Promise<void>;
        onPostUpdated(event: any): Promise<void>;
        onTagCreated(event: any): Promise<void>;
        onTagDeleted(event: any): Promise<void>;
        onTagUpdated(event: any): Promise<void>;
    }

    Methods

    interface wixBlog {
        onCategoryCreated(event: any): Promise<void>;
        onCategoryDeleted(event: any): Promise<void>;
        onCategoryUpdated(event: any): Promise<void>;
        onPostCreated(event: any): Promise<void>;
        onPostDeleted(event: any): Promise<void>;
        onPostUpdated(event: any): Promise<void>;
        onTagCreated(event: any): Promise<void>;
        onTagDeleted(event: any): Promise<void>;
        onTagUpdated(event: any): Promise<void>;
    }

    Methods

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    +

    Methods

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    diff --git a/docs/interfaces/SyncWixApps.wixEcom.html b/docs/interfaces/SyncWixApps.wixEcom.html index 33fc1f5a..bcbdcede 100644 --- a/docs/interfaces/SyncWixApps.wixEcom.html +++ b/docs/interfaces/SyncWixApps.wixEcom.html @@ -17,8 +17,8 @@
    import { SyncWixApps } from '@exweiv/weiv-data';
    const { wixEcom } = SyncWixApps;

    export const wixEcom_onOrderCreated = (event) => wixEcom.onOrderCreated(event);
    export const wixEcom_onOrderUpdated = (event) => wixEcom.onOrderUpdated(event);
    export const wixEcom_onAbandonedCheckoutCreated = (event) => wixEcom.onAbandonedCheckoutCreated(event);
    export const wixEcom_onAbandonedCheckoutRecovered = (event) => wixEcom.onAbandonedCheckoutRecovered(event);
    -
    interface wixEcom {
        onAbandonedCheckoutCreated(event: any): Promise<void>;
        onAbandonedCheckoutRecovered(event: any): Promise<void>;
        onOrderCreated(event: any): Promise<void>;
        onOrderUpdated(event: any): Promise<void>;
    }

    Methods

    interface wixEcom {
        onAbandonedCheckoutCreated(event: any): Promise<void>;
        onAbandonedCheckoutRecovered(event: any): Promise<void>;
        onOrderCreated(event: any): Promise<void>;
        onOrderUpdated(event: any): Promise<void>;
    }

    Methods

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    +

    Methods

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    diff --git a/docs/interfaces/SyncWixApps.wixMarketing.html b/docs/interfaces/SyncWixApps.wixMarketing.html index 5e12be18..076ffc1a 100644 --- a/docs/interfaces/SyncWixApps.wixMarketing.html +++ b/docs/interfaces/SyncWixApps.wixMarketing.html @@ -13,7 +13,7 @@
    import { SyncWixApps } from '@exweiv/weiv-data';
    const { wixMarketing } = SyncWixApps;

    export const wixMarketing_onCouponCreated = (event) => wixMarketing.onCouponCreated(event);
    export const wixMarketing_onCouponDeleted = (event) => wixMarketing.onCouponDeleted(event);
    export const wixMarketing_onCouponUpdated = (event) => wixMarketing.onCouponUpdated(event);
    -
    interface wixMarketing {
        onCouponCreated(event: any): Promise<void>;
        onCouponDeleted(event: any): Promise<void>;
        onCouponUpdated(event: any): Promise<void>;
    }

    Methods

    interface wixMarketing {
        onCouponCreated(event: any): Promise<void>;
        onCouponDeleted(event: any): Promise<void>;
        onCouponUpdated(event: any): Promise<void>;
    }

    Methods

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    +

    Methods

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    diff --git a/docs/interfaces/SyncWixApps.wixMembers.html b/docs/interfaces/SyncWixApps.wixMembers.html index b53c7c28..ef9f3050 100644 --- a/docs/interfaces/SyncWixApps.wixMembers.html +++ b/docs/interfaces/SyncWixApps.wixMembers.html @@ -17,10 +17,10 @@
    import { SyncWixApps } from '@exweiv/weiv-data';
    const { wixMembers } = SyncWixApps;

    export const wixMembers_onMemberCreated = (event) => wixMembers.onMemberCreated(event);
    export const wixMembers_onMemberUpdated = (event) => wixMembers.onMemberUpdated(event);
    export const wixMembers_onMemberDeleted = (event) => wixMembers.onMemberDeleted(event);
    export const wixBadges_onBadgeCreated = (event) => wixMembers.onBadgeCreated(event);
    export const wixBadges_onBadgeUpdated = (event) => wixMembers.onBadgeUpdated(event);
    export const wixBadges_onBadgeDeleted = (event) => wixMembers.onBadgeDeleted(event);
    -
    interface wixMembers {
        onBadgeCreated(event: any): Promise<void>;
        onBadgeDeleted(event: any): Promise<void>;
        onBadgeUpdated(event: any): Promise<void>;
        onMemberCreated(event: any): Promise<void>;
        onMemberDeleted(event: any): Promise<void>;
        onMemberUpdated(event: any): Promise<void>;
    }

    Methods

    interface wixMembers {
        onBadgeCreated(event: any): Promise<void>;
        onBadgeDeleted(event: any): Promise<void>;
        onBadgeUpdated(event: any): Promise<void>;
        onMemberCreated(event: any): Promise<void>;
        onMemberDeleted(event: any): Promise<void>;
        onMemberUpdated(event: any): Promise<void>;
    }

    Methods

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    +

    Methods

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    diff --git a/docs/interfaces/SyncWixApps.wixPricingPlans.html b/docs/interfaces/SyncWixApps.wixPricingPlans.html index 4c1671ba..2e6d3d64 100644 --- a/docs/interfaces/SyncWixApps.wixPricingPlans.html +++ b/docs/interfaces/SyncWixApps.wixPricingPlans.html @@ -13,7 +13,7 @@
    import { SyncWixApps } from '@exweiv/weiv-data';
    const { wixPricingPlans } = SyncWixApps;

    export const wixPricingPlansV2_onPlanCreated = (event) => wixPricingPlans.onPlanCreated(event);
    export const wixPricingPlansV2_onPlanUpdated = (event) => wixPricingPlans.onPlanUpdated(event);
    export const wixPricingPlansV2_onPlanArchived = (event) => wixPricingPlans.onPlanArchived(event);
    -
    interface wixPricingPlans {
        onPlanArchived(event: any, deletePlan?: boolean): Promise<void>;
        onPlanCreated(event: any): Promise<void>;
        onPlanUpdated(event: any): Promise<void>;
    }

    Methods

    interface wixPricingPlans {
        onPlanArchived(event: any, deletePlan?: boolean): Promise<void>;
        onPlanCreated(event: any): Promise<void>;
        onPlanUpdated(event: any): Promise<void>;
    }

    Methods

    • Parameters

      • event: any
      • OptionaldeletePlan: boolean

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    +

    Methods

    • Parameters

      • event: any
      • OptionaldeletePlan: boolean

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    diff --git a/docs/interfaces/SyncWixApps.wixStores.html b/docs/interfaces/SyncWixApps.wixStores.html index 4313c226..ed2e6c70 100644 --- a/docs/interfaces/SyncWixApps.wixStores.html +++ b/docs/interfaces/SyncWixApps.wixStores.html @@ -16,10 +16,10 @@
    import { SyncWixApps } from '@exweiv/weiv-data';
    const { wixStores } = SyncWixApps;

    export const wixStores_onCollectionCreated = (event) => wixStores.onCollectionCreated(event);
    export const wixStores_onCollectionUpdated = (event) => wixStores.onCollectionUpdated(event);
    export const wixStores_onCollectionDeleted = (event) => wixStores.onCollectionDeleted(event);
    export const wixStores_onProductCreated = (event) => wixStores.onProductCreated(event);
    export const wixStores_onProductUpdated = (event) => wixStores.onProductUpdated(event);
    export const wixStores_onProductDeleted = (event) => wixStores.onProductDeleted(event);
    -
    interface wixStores {
        onCollectionCreated(event: any): Promise<void>;
        onCollectionDeleted(event: any): Promise<void>;
        onCollectionUpdated(event: any): Promise<void>;
        onProductCreated(event: any): Promise<void>;
        onProductDeleted(event: any): Promise<void>;
        onProductUpdated(event: any): Promise<void>;
    }

    Methods

    interface wixStores {
        onCollectionCreated(event: any): Promise<void>;
        onCollectionDeleted(event: any): Promise<void>;
        onCollectionUpdated(event: any): Promise<void>;
        onProductCreated(event: any): Promise<void>;
        onProductDeleted(event: any): Promise<void>;
        onProductUpdated(event: any): Promise<void>;
    }

    Methods

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    +

    Methods

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    diff --git a/docs/interfaces/WeivDataAggregate.html b/docs/interfaces/WeivDataAggregate.html index 604ca380..1156f2f9 100644 --- a/docs/interfaces/WeivDataAggregate.html +++ b/docs/interfaces/WeivDataAggregate.html @@ -9,7 +9,7 @@
    // Here is a quick example from our internal systems where we can calculate average CPU scores for each cluster location:

    import weivData from '@exweiv/weiv-data';

    const result = await weivData.aggreagte('ExWeiv/Istanbul').avg('cpuScore').run();
    console.log(result);
    -
    interface WeivDataAggregate<CItem, ReservedCItem> {
        ascending(
            propertyName: Extract<keyof CItem, string>,
        ): WeivDataAggregate<CItem, ReservedCItem>;
        avg<K extends string, P extends undefined | string = undefined>(
            propertyName: K,
            projectedName?: P,
        ): WeivDataAggregate<
            Pick<
                UpdateCItem<
                    UpdateCItemIDToNull<CItem>,
                    ProjectedName<P, K, "Avg">,
                    number,
                >,
                "_id" extends keyof UpdateCItemIDToNull<CItem>
                    ? ProjectedName<P, K, "Avg"> | "_id"
                    : ProjectedName<P, K, "Avg">,
            >,
            ReservedCItem,
        >;
        count(): WeivDataAggregate<
            UpdateCItem<CItem, "count", number>,
            ReservedCItem,
        >;
        descending(
            propertyName: Extract<keyof CItem, string>,
        ): WeivDataAggregate<CItem, ReservedCItem>;
        filter(
            filter: WeivDataFilter<Extract<keyof CItem, string>>,
        ): WeivDataAggregate<CItem, ReservedCItem>;
        group<K extends string>(
            ...propertyName: K[],
        ): WeivDataAggregate<
            UpdatedCItemWithGroupedID<ReservedCItem, K, CItem>,
            ReservedCItem,
        >;
        limit(limit: number): WeivDataAggregate<CItem, ReservedCItem>;
        max<K extends string, P extends undefined | string = undefined>(
            propertyName: K,
            projectedName?: P,
        ): WeivDataAggregate<
            Pick<
                UpdateCItem<
                    UpdateCItemIDToNull<CItem>,
                    ProjectedName<P, K, "Max">,
                    number,
                >,
                "_id" extends keyof UpdateCItemIDToNull<CItem>
                    ? "_id" | ProjectedName<P, K, "Max">
                    : ProjectedName<P, K, "Max">,
            >,
            ReservedCItem,
        >;
        min<K extends string, P extends undefined | string = undefined>(
            propertyName: K,
            projectedName?: P,
        ): WeivDataAggregate<
            Pick<
                UpdateCItem<
                    UpdateCItemIDToNull<CItem>,
                    ProjectedName<P, K, "Min">,
                    number,
                >,
                "_id" extends keyof UpdateCItemIDToNull<CItem>
                    ? "_id" | ProjectedName<P, K, "Min">
                    : ProjectedName<P, K, "Min">,
            >,
            ReservedCItem,
        >;
        run(
            options?: WeivDataAggregateRunOptions,
        ): Promise<WeivDataAggregateResult<CItem>>;
        skip(skip: number): WeivDataAggregate<CItem, ReservedCItem>;
        stage<NewCItem = {}>(
            ...stage: PipelineStage[],
        ): WeivDataAggregate<NewCItem & CItem, ReservedCItem>;
        sum<K extends string, P extends undefined | string = undefined>(
            propertyName: K,
            projectedName?: P,
        ): WeivDataAggregate<
            Pick<
                UpdateCItem<
                    UpdateCItemIDToNull<CItem>,
                    ProjectedName<P, K, "Sum">,
                    number,
                >,
                "_id" extends keyof UpdateCItemIDToNull<CItem>
                    ? "_id" | ProjectedName<P, K, "Sum">
                    : ProjectedName<P, K, "Sum">,
            >,
            ReservedCItem,
        >;
    }

    Type Parameters

    Methods

    interface WeivDataAggregate<CItem, ReservedCItem> {
        ascending(
            propertyName: Extract<keyof CItem, string>,
        ): WeivDataAggregate<CItem, ReservedCItem>;
        avg<K extends string, P extends undefined | string = undefined>(
            propertyName: K,
            projectedName?: P,
        ): WeivDataAggregate<
            Pick<
                UpdateCItem<
                    UpdateCItemIDToNull<CItem>,
                    ProjectedName<P, K, "Avg">,
                    number,
                >,
                "_id" extends keyof UpdateCItemIDToNull<CItem>
                    ? ProjectedName<P, K, "Avg"> | "_id"
                    : ProjectedName<P, K, "Avg">,
            >,
            ReservedCItem,
        >;
        count(): WeivDataAggregate<
            UpdateCItem<CItem, "count", number>,
            ReservedCItem,
        >;
        descending(
            propertyName: Extract<keyof CItem, string>,
        ): WeivDataAggregate<CItem, ReservedCItem>;
        filter(
            filter: WeivDataFilter<Extract<keyof CItem, string>>,
        ): WeivDataAggregate<CItem, ReservedCItem>;
        group<K extends string>(
            ...propertyName: K[],
        ): WeivDataAggregate<
            UpdatedCItemWithGroupedID<ReservedCItem, K, CItem>,
            ReservedCItem,
        >;
        limit(limit: number): WeivDataAggregate<CItem, ReservedCItem>;
        max<K extends string, P extends undefined | string = undefined>(
            propertyName: K,
            projectedName?: P,
        ): WeivDataAggregate<
            Pick<
                UpdateCItem<
                    UpdateCItemIDToNull<CItem>,
                    ProjectedName<P, K, "Max">,
                    number,
                >,
                "_id" extends keyof UpdateCItemIDToNull<CItem>
                    ? "_id" | ProjectedName<P, K, "Max">
                    : ProjectedName<P, K, "Max">,
            >,
            ReservedCItem,
        >;
        min<K extends string, P extends undefined | string = undefined>(
            propertyName: K,
            projectedName?: P,
        ): WeivDataAggregate<
            Pick<
                UpdateCItem<
                    UpdateCItemIDToNull<CItem>,
                    ProjectedName<P, K, "Min">,
                    number,
                >,
                "_id" extends keyof UpdateCItemIDToNull<CItem>
                    ? "_id" | ProjectedName<P, K, "Min">
                    : ProjectedName<P, K, "Min">,
            >,
            ReservedCItem,
        >;
        run(
            options?: WeivDataAggregateRunOptions,
        ): Promise<WeivDataAggregateResult<CItem>>;
        skip(skip: number): WeivDataAggregate<CItem, ReservedCItem>;
        stage<NewCItem = {}>(
            ...stage: PipelineStage[],
        ): WeivDataAggregate<NewCItem & CItem, ReservedCItem>;
        sum<K extends string, P extends undefined | string = undefined>(
            propertyName: K,
            projectedName?: P,
        ): WeivDataAggregate<
            Pick<
                UpdateCItem<
                    UpdateCItemIDToNull<CItem>,
                    ProjectedName<P, K, "Sum">,
                    number,
                >,
                "_id" extends keyof UpdateCItemIDToNull<CItem>
                    ? "_id" | ProjectedName<P, K, "Sum">
                    : ProjectedName<P, K, "Sum">,
            >,
            ReservedCItem,
        >;
    }

    Type Parameters

    • CItem
    • ReservedCItem

    Methods

    ascending avg count descending @@ -25,42 +25,42 @@

    Methods

    • Type Parameters

      • K extends string
      • P extends undefined | string = undefined

      Parameters

      • propertyName: K

        The property in which to find the average value.

        +
    • Type Parameters

      • K extends string
      • P extends undefined | string = undefined

      Parameters

      • propertyName: K

        The property in which to find the average value.

      • OptionalprojectedName: P

        The name of the property in the aggregation results containing the average value.

      Returns WeivDataAggregate<
          Pick<
              UpdateCItem<
                  UpdateCItemIDToNull<CItem>,
                  ProjectedName<P, K, "Avg">,
                  number,
              >,
              "_id" extends keyof UpdateCItemIDToNull<CItem>
                  ? ProjectedName<P, K, "Avg"> | "_id"
                  : ProjectedName<P, K, "Avg">,
          >,
          ReservedCItem,
      >

      A WeivDataAggregate cursor representing the refined aggregation.

      Refines a WeivDataAggregate to only contain the average value from each aggregation group.

      -
    • Type Parameters

      • K extends string
      • P extends undefined | string = undefined

      Parameters

      • propertyName: K

        The property in which to find the maximum value.

        +
    • Type Parameters

      • K extends string
      • P extends undefined | string = undefined

      Parameters

      • propertyName: K

        The property in which to find the maximum value.

      • OptionalprojectedName: P

        The name of the property in the aggregation results containing the maximum value.

      Returns WeivDataAggregate<
          Pick<
              UpdateCItem<
                  UpdateCItemIDToNull<CItem>,
                  ProjectedName<P, K, "Max">,
                  number,
              >,
              "_id" extends keyof UpdateCItemIDToNull<CItem>
                  ? "_id" | ProjectedName<P, K, "Max">
                  : ProjectedName<P, K, "Max">,
          >,
          ReservedCItem,
      >

      A WeivDataAggregate cursor representing the refined aggregation.

      Refines a WeivDataAggregate to only contain the maximum value from each aggregation group.

      -
    • Type Parameters

      • K extends string
      • P extends undefined | string = undefined

      Parameters

      • propertyName: K

        The property in which to find the minimum value.

        +
    • Type Parameters

      • K extends string
      • P extends undefined | string = undefined

      Parameters

      • propertyName: K

        The property in which to find the minimum value.

      • OptionalprojectedName: P

        The name of the property in the aggregation results containing the minimum value.

      Returns WeivDataAggregate<
          Pick<
              UpdateCItem<
                  UpdateCItemIDToNull<CItem>,
                  ProjectedName<P, K, "Min">,
                  number,
              >,
              "_id" extends keyof UpdateCItemIDToNull<CItem>
                  ? "_id" | ProjectedName<P, K, "Min">
                  : ProjectedName<P, K, "Min">,
          >,
          ReservedCItem,
      >

      A WeivDataAggregate cursor representing the refined aggregation.

      Refines a WeivDataAggregate to only contain the minimum value from each aggregation group.

      -
    • Type Parameters

      • K extends string
      • P extends undefined | string = undefined

      Parameters

      • propertyName: K

        The property in which to find the sum.

        +
    • Type Parameters

      • K extends string
      • P extends undefined | string = undefined

      Parameters

      • propertyName: K

        The property in which to find the sum.

      • OptionalprojectedName: P

        The name of the property in the aggregation results containing the sum.

      Returns WeivDataAggregate<
          Pick<
              UpdateCItem<
                  UpdateCItemIDToNull<CItem>,
                  ProjectedName<P, K, "Sum">,
                  number,
              >,
              "_id" extends keyof UpdateCItemIDToNull<CItem>
                  ? "_id" | ProjectedName<P, K, "Sum">
                  : ProjectedName<P, K, "Sum">,
          >,
          ReservedCItem,
      >

      A WeivDataAggregate cursor representing the refined aggregation.

      Refines a WeivDataAggregate to contain the sum from each aggregation group.

      -
    +
    diff --git a/docs/interfaces/WeivDataAggregateResult.html b/docs/interfaces/WeivDataAggregateResult.html index 401b8f34..721a70c8 100644 --- a/docs/interfaces/WeivDataAggregateResult.html +++ b/docs/interfaces/WeivDataAggregateResult.html @@ -1,11 +1,11 @@ -WeivDataAggregateResult | WeivData API Reference | ExWeiv Apps

    Interface WeivDataAggregateResult<CItem>

    interface WeivDataAggregateResult<CItem> {
        items: CItem[];
        length: number;
        pipeline: Document;
        hasNext(): boolean;
        next(): Promise<WeivDataAggregateResult<CItem>>;
    }

    Type Parameters

    • CItem

    Properties

    items +WeivDataAggregateResult | WeivData API Reference | ExWeiv Apps

    Interface WeivDataAggregateResult<CItem>

    interface WeivDataAggregateResult<CItem> {
        items: CItem[];
        length: number;
        pipeline: Document;
        hasNext(): boolean;
        next(): Promise<WeivDataAggregateResult<CItem>>;
    }

    Type Parameters

    • CItem

    Properties

    Methods

    Properties

    items: CItem[]

    Gets the aggregated values.

    -
    length: number

    Returns the number of values in the aggregate results.

    -
    pipeline: Document

    Returns the pipeline created when performing the aggregation.

    -

    Methods

    • Returns boolean

      Indicates if the aggregation has more results.

      -
    +
    length: number

    Returns the number of values in the aggregate results.

    +
    pipeline: Document

    Returns the pipeline created when performing the aggregation.

    +

    Methods

    • Returns boolean

      Indicates if the aggregation has more results.

      +
    diff --git a/docs/interfaces/WeivDataFilter.html b/docs/interfaces/WeivDataFilter.html index ee30464c..b5e8ef7c 100644 --- a/docs/interfaces/WeivDataFilter.html +++ b/docs/interfaces/WeivDataFilter.html @@ -1,4 +1,4 @@ -WeivDataFilter | WeivData API Reference | ExWeiv Apps
    interface WeivDataFilter<CItem> {
        and(
            query: WeivDataFilter<Extract<keyof CItem, string>>,
        ): WeivDataFilter<CItem>;
        between<K extends string>(
            propertyName: K,
            rangeStart: CItem[K],
            rangeEnd: CItem[K],
            convertIds?: boolean,
        ): WeivDataFilter<CItem>;
        contains(
            propertyName: Extract<keyof CItem, string>,
            string: string,
        ): WeivDataFilter<CItem>;
        endsWith(
            propertyName: Extract<keyof CItem, string>,
            string: string,
        ): WeivDataFilter<CItem>;
        eq<K extends string>(
            propertyName: K,
            value: CItem[K],
            convertIds?: boolean,
        ): WeivDataFilter<CItem>;
        ge<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataFilter<CItem>;
        gt<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataFilter<CItem>;
        hasAll<K extends string>(
            propertyName: K,
            value: CItem[K][],
            convertIds?: boolean,
        ): WeivDataFilter<CItem>;
        hasSome<K extends string>(
            propertyName: K,
            value: CItem[K][],
            convertIds?: boolean,
        ): WeivDataFilter<CItem>;
        isEmpty(propertyName: Extract<keyof CItem, string>): WeivDataFilter<CItem>;
        isNotEmpty(
            propertyName: Extract<keyof CItem, string>,
        ): WeivDataFilter<CItem>;
        le<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataFilter<CItem>;
        lt<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataFilter<CItem>;
        ne<K extends string>(
            propertyName: K,
            value: CItem[K],
            convertIds?: boolean,
        ): WeivDataFilter<CItem>;
        not(query: WeivDataFilter<CItem>): WeivDataFilter<CItem>;
        or(query: WeivDataFilter<CItem>): WeivDataFilter<CItem>;
        startsWith(
            propertyName: Extract<keyof CItem, string>,
            string: string,
        ): WeivDataFilter<CItem>;
    }

    Type Parameters

    • CItem

    Methods

    and +WeivDataFilter | WeivData API Reference | ExWeiv Apps
    interface WeivDataFilter<CItem> {
        and(
            query: WeivDataFilter<Extract<keyof CItem, string>>,
        ): WeivDataFilter<CItem>;
        between<K extends string>(
            propertyName: K,
            rangeStart: CItem[K],
            rangeEnd: CItem[K],
            convertIds?: boolean,
        ): WeivDataFilter<CItem>;
        contains(
            propertyName: Extract<keyof CItem, string>,
            string: string,
        ): WeivDataFilter<CItem>;
        endsWith(
            propertyName: Extract<keyof CItem, string>,
            string: string,
        ): WeivDataFilter<CItem>;
        eq<K extends string>(
            propertyName: K,
            value: CItem[K],
            convertIds?: boolean,
        ): WeivDataFilter<CItem>;
        ge<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataFilter<CItem>;
        gt<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataFilter<CItem>;
        hasAll<K extends string>(
            propertyName: K,
            value: CItem[K][],
            convertIds?: boolean,
        ): WeivDataFilter<CItem>;
        hasSome<K extends string>(
            propertyName: K,
            value: CItem[K][],
            convertIds?: boolean,
        ): WeivDataFilter<CItem>;
        isEmpty(propertyName: Extract<keyof CItem, string>): WeivDataFilter<CItem>;
        isNotEmpty(
            propertyName: Extract<keyof CItem, string>,
        ): WeivDataFilter<CItem>;
        le<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataFilter<CItem>;
        lt<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataFilter<CItem>;
        ne<K extends string>(
            propertyName: K,
            value: CItem[K],
            convertIds?: boolean,
        ): WeivDataFilter<CItem>;
        not(query: WeivDataFilter<CItem>): WeivDataFilter<CItem>;
        or(query: WeivDataFilter<CItem>): WeivDataFilter<CItem>;
        startsWith(
            propertyName: Extract<keyof CItem, string>,
            string: string,
        ): WeivDataFilter<CItem>;
    }

    Type Parameters

    • CItem

    Methods

    and between contains endsWith @@ -18,70 +18,70 @@

    Methods

    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with rangeStart and rangeEnd.

        +
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with rangeStart and rangeEnd.

      • rangeStart: CItem[K]

        The beginning value of the range to match against.

      • rangeEnd: CItem[K]

        The ending value of the range to match against.

      • OptionalconvertIds: boolean

        When enabled passed value will be converted to ObjectId from string. Defaults to false.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value is within a specified range.

      -
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property whose value will be compared with the string.

        +
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property whose value will be compared with the string.

      • string: string

        The string to look for inside the specified property value.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value contains a specified string.

      -
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property whose value will be compared with the string.

        +
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the end of the specified property value.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value ends with a specified string.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

        +
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K]

        The value to match against.

      • OptionalconvertIds: boolean

        When enabled passed value will be converted to ObjectId from string. Defaults to false.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value equals the specified value.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K]

        The value to match against.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K]

        The value to match against.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value is greater than the specified value.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

        +
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K][]

        The values to match against.

      • OptionalconvertIds: boolean

        When enabled passed values will be converted to ObjectId from string. Defaults to false.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

        +
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K][]

        The values to match against.

      • OptionalconvertIds: boolean

        When enabled passed values will be converted to ObjectId from string. Defaults to false.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      -
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The the property in which to check for a value.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property does not exist or does not have any value.

      -
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property in which to check for a value.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property has any value.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K]

        The value to match against.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value is less than or equal to the specified value.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K]

        The value to match against.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value is less than the specified value.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

        +
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K]

        The value to match against.

      • OptionalconvertIds: boolean

        When enabled passed value will be converted to ObjectId from string. Defaults to false.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value does not equal the specified value.

      -
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property whose value will be compared with the string.

        +
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the beginning of the specified property value.

      Returns WeivDataFilter<CItem>

      A WeivDataFilter cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value starts with a specified string.

      -
    +
    diff --git a/docs/interfaces/WeivDataOptions.html b/docs/interfaces/WeivDataOptions.html index d573b057..37089d33 100644 --- a/docs/interfaces/WeivDataOptions.html +++ b/docs/interfaces/WeivDataOptions.html @@ -1,10 +1,10 @@ WeivDataOptions | WeivData API Reference | ExWeiv Apps

    An object that you pass as the options parameter that modifies how an operation is performed.

    -
    interface WeivDataOptions {
        convertIds?: boolean;
        readConcern?:
            | "local"
            | "majority"
            | "linearizable"
            | "available"
            | "snapshot";
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    interface WeivDataOptions {
        convertIds?: boolean;
        readConcern?:
            | "local"
            | "majority"
            | "linearizable"
            | "available"
            | "snapshot";
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    convertIds?: boolean

    When enabled we will convert all _id fields from ObjectId to String, if they are not in ObjectId type then we won't touch them. If not enabled we will return _id fields without modification.

    -
    readConcern?: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    -
    suppressAuth?: boolean

    An option to bypass permissions and perform operations in admin level.

    -
    suppressHooks?: boolean

    An option to bypass all hooks (before or after hooks) that runs for the function.

    -
    +
    readConcern?: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    +
    suppressAuth?: boolean

    An option to bypass permissions and perform operations in admin level.

    +
    suppressHooks?: boolean

    An option to bypass all hooks (before or after hooks) that runs for the function.

    +
    diff --git a/docs/interfaces/WeivDataOptionsCache.html b/docs/interfaces/WeivDataOptionsCache.html index b172db96..8c46077d 100644 --- a/docs/interfaces/WeivDataOptionsCache.html +++ b/docs/interfaces/WeivDataOptionsCache.html @@ -1,5 +1,5 @@ WeivDataOptionsCache | WeivData API Reference | ExWeiv Apps

    An object that you pass as the options parameter that modifies how an operation is performed. Unlike WeivDataOptions this type has cache control over the action.

    -
    interface WeivDataOptionsCache {
        cacheTimeout?: number;
        convertIds?: boolean;
        enableCache?: boolean;
        readConcern?:
            | "local"
            | "majority"
            | "linearizable"
            | "available"
            | "snapshot";
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    interface WeivDataOptionsCache {
        cacheTimeout?: number;
        convertIds?: boolean;
        enableCache?: boolean;
        readConcern?:
            | "local"
            | "majority"
            | "linearizable"
            | "available"
            | "snapshot";
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    cacheTimeout?: number

    Set a custom cache timeout to specify a time of expiration for cached data. (Anything above 6 min won't work since Wix website containers don't live longer than 6min)

    -
    convertIds?: boolean

    When enabled we will convert all _id fields from ObjectId to String, if they are not in ObjectId type then we won't touch them. If not enabled we will return _id fields without modification.

    -
    enableCache?: boolean

    Enable or disable the cache for the current function.

    -
    readConcern?: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    -
    suppressAuth?: boolean

    An option to bypass permissions and perform operations in admin level.

    -
    suppressHooks?: boolean

    An option to bypass all hooks (before or after hooks) that runs for the function.

    -
    +
    convertIds?: boolean

    When enabled we will convert all _id fields from ObjectId to String, if they are not in ObjectId type then we won't touch them. If not enabled we will return _id fields without modification.

    +
    enableCache?: boolean

    Enable or disable the cache for the current function.

    +
    readConcern?: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    +
    suppressAuth?: boolean

    An option to bypass permissions and perform operations in admin level.

    +
    suppressHooks?: boolean

    An option to bypass all hooks (before or after hooks) that runs for the function.

    +
    diff --git a/docs/interfaces/WeivDataOptionsOwner.html b/docs/interfaces/WeivDataOptionsOwner.html index e7a1967d..58e2bc39 100644 --- a/docs/interfaces/WeivDataOptionsOwner.html +++ b/docs/interfaces/WeivDataOptionsOwner.html @@ -1,13 +1,13 @@ WeivDataOptionsOwner | WeivData API Reference | ExWeiv Apps

    WeivData options where onlyOwner is possible.

    -
    interface WeivDataOptionsOwner {
        convertIds?: boolean;
        onlyOwner?: boolean;
        readConcern?:
            | "local"
            | "majority"
            | "linearizable"
            | "available"
            | "snapshot";
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    interface WeivDataOptionsOwner {
        convertIds?: boolean;
        onlyOwner?: boolean;
        readConcern?:
            | "local"
            | "majority"
            | "linearizable"
            | "available"
            | "snapshot";
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    convertIds?: boolean

    When enabled we will convert all _id fields from ObjectId to String, if they are not in ObjectId type then we won't touch them. If not enabled we will return _id fields without modification.

    -
    onlyOwner?: boolean

    When sert to true WeivData will add another filter and check if _owner field of the item matches with current member id. +

    onlyOwner?: boolean

    When sert to true WeivData will add another filter and check if _owner field of the item matches with current member id. This will make it possible to take action only if current member is the owner of the data.

    -
    readConcern?: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    -
    suppressAuth?: boolean

    An option to bypass permissions and perform operations in admin level.

    -
    suppressHooks?: boolean

    An option to bypass all hooks (before or after hooks) that runs for the function.

    -
    +
    readConcern?: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    +
    suppressAuth?: boolean

    An option to bypass permissions and perform operations in admin level.

    +
    suppressHooks?: boolean

    An option to bypass all hooks (before or after hooks) that runs for the function.

    +
    diff --git a/docs/interfaces/WeivDataOptionsQuery.html b/docs/interfaces/WeivDataOptionsQuery.html index 7cf963a3..b6f7fed2 100644 --- a/docs/interfaces/WeivDataOptionsQuery.html +++ b/docs/interfaces/WeivDataOptionsQuery.html @@ -1,12 +1,12 @@ WeivDataOptionsQuery | WeivData API Reference | ExWeiv Apps

    WeivData options only for query function.

    -
    interface WeivDataOptionsQuery {
        convertIds?: boolean;
        omitTotalCount?: boolean;
        readConcern?:
            | "local"
            | "majority"
            | "linearizable"
            | "available"
            | "snapshot";
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    interface WeivDataOptionsQuery {
        convertIds?: boolean;
        omitTotalCount?: boolean;
        readConcern?:
            | "local"
            | "majority"
            | "linearizable"
            | "available"
            | "snapshot";
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    convertIds?: boolean

    When enabled we will convert all _id fields from ObjectId to String, if they are not in ObjectId type then we won't touch them. If not enabled we will return _id fields without modification.

    -
    omitTotalCount?: boolean

    By default this is true and you can disable it if you want, when it's disabled (false) we won't fetch the total count of the items.

    -
    readConcern?: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    -
    suppressAuth?: boolean

    An option to bypass permissions and perform operations in admin level.

    -
    suppressHooks?: boolean

    An option to bypass all hooks (before or after hooks) that runs for the function.

    -
    +
    omitTotalCount?: boolean

    By default this is true and you can disable it if you want, when it's disabled (false) we won't fetch the total count of the items.

    +
    readConcern?: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    +
    suppressAuth?: boolean

    An option to bypass permissions and perform operations in admin level.

    +
    suppressHooks?: boolean

    An option to bypass all hooks (before or after hooks) that runs for the function.

    +
    diff --git a/docs/interfaces/WeivDataOptionsWrite.html b/docs/interfaces/WeivDataOptionsWrite.html index 7b8bd7f6..51af80d4 100644 --- a/docs/interfaces/WeivDataOptionsWrite.html +++ b/docs/interfaces/WeivDataOptionsWrite.html @@ -1,18 +1,18 @@ WeivDataOptionsWrite | WeivData API Reference | ExWeiv Apps

    WeivData options only for some write functions like insert. Where you can insert new data into collection.

    -
    interface WeivDataOptionsWrite {
        convertIds?: boolean;
        enableVisitorId?: boolean;
        readConcern?:
            | "local"
            | "majority"
            | "linearizable"
            | "available"
            | "snapshot";
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    interface WeivDataOptionsWrite {
        convertIds?: boolean;
        enableVisitorId?: boolean;
        readConcern?:
            | "local"
            | "majority"
            | "linearizable"
            | "available"
            | "snapshot";
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    convertIds?: boolean

    When enabled we will convert all _id fields from ObjectId to String, if they are not in ObjectId type then we won't touch them. If not enabled we will return _id fields without modification.

    -
    enableVisitorId?: boolean

    An option to use visitorId. This option will try to get the id of current user on the site. +

    enableVisitorId?: boolean

    An option to use visitorId. This option will try to get the id of current user on the site. Even if it's a visitor and if that same visitor signs up to your site your _owner field data will be the same with the member id in Wix Members. Created for new data inserts doesn't have any effect on read functions or update functions

    When enabled, function will make another extra call so it will be slower, defaults to false. For members you don't need this option to be true, weivData always knows the member ids.

    -
    readConcern?: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    -
    suppressAuth?: boolean

    An option to bypass permissions and perform operations in admin level.

    -
    suppressHooks?: boolean

    An option to bypass all hooks (before or after hooks) that runs for the function.

    -
    +
    readConcern?: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    +
    suppressAuth?: boolean

    An option to bypass permissions and perform operations in admin level.

    +
    suppressHooks?: boolean

    An option to bypass all hooks (before or after hooks) that runs for the function.

    +
    diff --git a/docs/interfaces/WeivDataOptionsWriteOwner.html b/docs/interfaces/WeivDataOptionsWriteOwner.html index 1662991a..31e56b2b 100644 --- a/docs/interfaces/WeivDataOptionsWriteOwner.html +++ b/docs/interfaces/WeivDataOptionsWriteOwner.html @@ -1,21 +1,21 @@ WeivDataOptionsWriteOwner | WeivData API Reference | ExWeiv Apps

    WeivData options where onlyOwner is possible with enableVisitorId.

    -
    interface WeivDataOptionsWriteOwner {
        convertIds?: boolean;
        enableVisitorId?: boolean;
        onlyOwner?: boolean;
        readConcern?:
            | "local"
            | "majority"
            | "linearizable"
            | "available"
            | "snapshot";
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    interface WeivDataOptionsWriteOwner {
        convertIds?: boolean;
        enableVisitorId?: boolean;
        onlyOwner?: boolean;
        readConcern?:
            | "local"
            | "majority"
            | "linearizable"
            | "available"
            | "snapshot";
        suppressAuth?: boolean;
        suppressHooks?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    convertIds?: boolean

    When enabled we will convert all _id fields from ObjectId to String, if they are not in ObjectId type then we won't touch them. If not enabled we will return _id fields without modification.

    -
    enableVisitorId?: boolean

    An option to use visitorId. This option will try to get the id of current user on the site. +

    enableVisitorId?: boolean

    An option to use visitorId. This option will try to get the id of current user on the site. Even if it's a visitor and if that same visitor signs up to your site your _owner field data will be the same with the member id in Wix Members. Created for new data inserts doesn't have any effect on read functions or update functions

    When enabled, function will make another extra call so it will be slower, defaults to false. For members you don't need this option to be true, weivData always knows the member ids.

    -
    onlyOwner?: boolean

    When sert to true WeivData will add another filter and check if _owner field of the item matches with current member id. +

    onlyOwner?: boolean

    When sert to true WeivData will add another filter and check if _owner field of the item matches with current member id. This will make it possible to take action only if current member is the owner of the data.

    -
    readConcern?: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    -
    suppressAuth?: boolean

    An option to bypass permissions and perform operations in admin level.

    -
    suppressHooks?: boolean

    An option to bypass all hooks (before or after hooks) that runs for the function.

    -
    +
    readConcern?: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    +
    suppressAuth?: boolean

    An option to bypass permissions and perform operations in admin level.

    +
    suppressHooks?: boolean

    An option to bypass all hooks (before or after hooks) that runs for the function.

    +
    diff --git a/docs/interfaces/WeivDataQuery.html b/docs/interfaces/WeivDataQuery.html index 57248b17..a388f87d 100644 --- a/docs/interfaces/WeivDataQuery.html +++ b/docs/interfaces/WeivDataQuery.html @@ -3,7 +3,7 @@
    // Here is a quick example from our internal systems where we can get all Clusters that has more than 18K cpu score in Istanbul:

    import weivData from '@exweiv/weiv-data';

    const result = await weivData.query('ExWeiv/Clusters').eq('location', 'Istanbul').gt('cpuScores', 18000).find();
    console.log(result);
    -
    interface WeivDataQuery<CItem> {
        and(query: WeivDataQuery<CItem>): WeivDataQuery<CItem>;
        ascending(
            ...propertyName: Extract<keyof CItem, string>[],
        ): WeivDataQuery<CItem>;
        between<K extends string>(
            propertyName: K,
            rangeStart: CItem[K],
            rangeEnd: CItem[K],
        ): WeivDataQuery<CItem>;
        contains(
            propertyName: Extract<keyof CItem, string>,
            string: string,
        ): WeivDataQuery<CItem>;
        count(options?: WeivDataOptions): Promise<number>;
        descending(
            ...propertyName: Extract<keyof CItem, string>[],
        ): WeivDataQuery<CItem>;
        distinct<K extends string>(
            propertyName: K,
            options?: WeivDataOptions,
        ): Promise<WeivDataQueryResult<CItem[K]>>;
        endsWith(
            propertyName: Extract<keyof CItem, string>,
            string: string,
        ): WeivDataQuery<CItem>;
        eq<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataQuery<CItem>;
        fields<K extends string>(
            ...propertyName: K[],
        ): WeivDataQuery<Pick<CItem, K>>;
        find(options?: WeivDataOptionsQuery): Promise<WeivDataQueryResult<CItem>>;
        ge<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataQuery<CItem>;
        gt<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataQuery<CItem>;
        hasAll<K extends string>(
            propertyName: K,
            value: CItem[K][],
        ): WeivDataQuery<CItem>;
        hasSome<K extends string>(
            propertyName: K,
            value: CItem[K][],
        ): WeivDataQuery<CItem>;
        include<NewCItem = {}>(
            ...includes: IncludeObject[],
        ): WeivDataQuery<CItem & NewCItem>;
        isEmpty(propertyName: Extract<keyof CItem, string>): WeivDataQuery<CItem>;
        isNotEmpty(
            propertyName: Extract<keyof CItem, string>,
        ): WeivDataQuery<CItem>;
        le<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataQuery<CItem>;
        limit(limit: number): WeivDataQuery<CItem>;
        lt<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataQuery<CItem>;
        ne<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataQuery<CItem>;
        not(query: WeivDataQuery<CItem>): WeivDataQuery<CItem>;
        or(query: WeivDataQuery<CItem>): WeivDataQuery<CItem>;
        skip(skip: number): WeivDataQuery<CItem>;
        startsWith(
            propertyName: Extract<keyof CItem, string>,
            string: string,
        ): WeivDataQuery<CItem>;
    }

    Type Parameters

    Methods

    and +
    interface WeivDataQuery<CItem> {
        and(query: WeivDataQuery<CItem>): WeivDataQuery<CItem>;
        ascending(
            ...propertyName: Extract<keyof CItem, string>[],
        ): WeivDataQuery<CItem>;
        between<K extends string>(
            propertyName: K,
            rangeStart: CItem[K],
            rangeEnd: CItem[K],
        ): WeivDataQuery<CItem>;
        contains(
            propertyName: Extract<keyof CItem, string>,
            string: string,
        ): WeivDataQuery<CItem>;
        count(options?: WeivDataOptions): Promise<number>;
        descending(
            ...propertyName: Extract<keyof CItem, string>[],
        ): WeivDataQuery<CItem>;
        distinct<K extends string>(
            propertyName: K,
            options?: WeivDataOptions,
        ): Promise<WeivDataQueryResult<CItem[K]>>;
        endsWith(
            propertyName: Extract<keyof CItem, string>,
            string: string,
        ): WeivDataQuery<CItem>;
        eq<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataQuery<CItem>;
        fields<K extends string>(
            ...propertyName: K[],
        ): WeivDataQuery<Pick<CItem, K>>;
        find(options?: WeivDataOptionsQuery): Promise<WeivDataQueryResult<CItem>>;
        ge<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataQuery<CItem>;
        gt<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataQuery<CItem>;
        hasAll<K extends string>(
            propertyName: K,
            value: CItem[K][],
        ): WeivDataQuery<CItem>;
        hasSome<K extends string>(
            propertyName: K,
            value: CItem[K][],
        ): WeivDataQuery<CItem>;
        include<NewCItem = {}>(
            ...includes: IncludeObject[],
        ): WeivDataQuery<CItem & NewCItem>;
        isEmpty(propertyName: Extract<keyof CItem, string>): WeivDataQuery<CItem>;
        isNotEmpty(
            propertyName: Extract<keyof CItem, string>,
        ): WeivDataQuery<CItem>;
        le<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataQuery<CItem>;
        limit(limit: number): WeivDataQuery<CItem>;
        lt<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataQuery<CItem>;
        ne<K extends string>(
            propertyName: K,
            value: CItem[K],
        ): WeivDataQuery<CItem>;
        not(query: WeivDataQuery<CItem>): WeivDataQuery<CItem>;
        or(query: WeivDataQuery<CItem>): WeivDataQuery<CItem>;
        skip(skip: number): WeivDataQuery<CItem>;
        startsWith(
            propertyName: Extract<keyof CItem, string>,
            string: string,
        ): WeivDataQuery<CItem>;
    }

    Type Parameters

    • CItem

    Methods

    and ascending between contains @@ -32,93 +32,93 @@

    Methods

    • Parameters

      • ...propertyName: Extract<keyof CItem, string>[]

        The properties used in the sort.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Adds a sort to a query or sort, sorting by the specified properties in ascending order.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with rangeStart and rangeEnd.

        +
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with rangeStart and rangeEnd.

      • rangeStart: CItem[K]

        The beginning value of the range to match against.

      • rangeEnd: CItem[K]

        The ending value of the range to match against.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value is within a specified range.

      -
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property whose value will be compared with the string.

        +
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property whose value will be compared with the string.

      • string: string

        The string to look for inside the specified property value.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value contains a specified string.

      -
    • Parameters

      • Optionaloptions: WeivDataOptions

        An object containing options to use when processing this operation.

      Returns Promise<number>

      Fulfilled - The number of items that match the query. Rejected - The errors that caused the rejection.

      Returns the number of items that match the query.

      -
    • Parameters

      • ...propertyName: Extract<keyof CItem, string>[]

        The properties used in the sort.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Adds a sort to a query or sort, sorting by the specified properties in descending order.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared for distinct values.

      • Optionaloptions: WeivDataOptions

        An object containing options to use when processing this operation.

      Returns Promise<WeivDataQueryResult<CItem[K]>>

      Fulfilled - A Promise that resolves to the results of the query. Rejected - Error that caused the query to fail.

      Returns the distinct values that match the query, without duplicates.

      -
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property whose value will be compared with the string.

        +
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the end of the specified property value.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value ends with a specified string.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K]

        The value to match against.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value equals the specified value.

      -
    • Type Parameters

      • K extends string

      Parameters

      • ...propertyName: K[]

        Properties to return. To return multiple properties, pass properties as additional arguments.

        +
    • Type Parameters

      • K extends string

      Parameters

      • ...propertyName: K[]

        Properties to return. To return multiple properties, pass properties as additional arguments.

      Returns WeivDataQuery<Pick<CItem, K>>

      A WeivDataQuery cursor representing the refined filters.

      Lists the fields to return in a query's results.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K]

        The value to match against.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value is greater than or equal to the specified value.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K]

        The value to match against.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value is greater than the specified value.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

        +
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K][]

        The values to match against.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property values equals all of the specified value parameters.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

        +
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K][]

        The values to match against.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

      -
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The the property in which to check for a value.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property does not exist or does not have any value.

      -
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property in which to check for a value.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property has any value.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K]

        The value to match against.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value is less than or equal to the specified value.

      -
    • Parameters

      • limit: number

        The number of items to return, which is also the pageSize of the results object.

        +
    • Parameters

      • limit: number

        The number of items to return, which is also the pageSize of the results object.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Limits the number of items the query returns.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K]

        The value to match against.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value is less than the specified value.

      -
    • Type Parameters

      • K extends string

      Parameters

      • propertyName: K

        The property whose value will be compared with value.

      • value: CItem[K]

        The value to match against.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value does not equal the specified value.

      -
    • Parameters

      • skip: number

        The number of items to skip in the query results before returning the results.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Sets the number of items to skip before returning query results.

      -
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property whose value will be compared with the string.

        +
    • Parameters

      • propertyName: Extract<keyof CItem, string>

        The property whose value will be compared with the string.

      • string: string

        The string to look for at the beginning of the specified property value.

      Returns WeivDataQuery<CItem>

      A WeivDataQuery cursor representing the refined filters.

      Refines a query or filter to match items whose specified property value starts with a specified string.

      -
    +
    diff --git a/docs/interfaces/WeivDataQueryReferencedResult.html b/docs/interfaces/WeivDataQueryReferencedResult.html index a9f9e004..323ea012 100644 --- a/docs/interfaces/WeivDataQueryReferencedResult.html +++ b/docs/interfaces/WeivDataQueryReferencedResult.html @@ -1,15 +1,15 @@ -WeivDataQueryReferencedResult | WeivData API Reference | ExWeiv Apps

    Interface WeivDataQueryReferencedResult<CItem>

    interface WeivDataQueryReferencedResult<CItem> {
        items: CItem[];
        totalCount: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryReferencedResult<CItem>>;
        prev(): Promise<WeivDataQueryReferencedResult<CItem>>;
    }

    Type Parameters

    • CItem

    Properties

    items +WeivDataQueryReferencedResult | WeivData API Reference | ExWeiv Apps

    Interface WeivDataQueryReferencedResult<CItem>

    interface WeivDataQueryReferencedResult<CItem> {
        items: CItem[];
        totalCount: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryReferencedResult<CItem>>;
        prev(): Promise<WeivDataQueryReferencedResult<CItem>>;
    }

    Type Parameters

    • CItem

    Properties

    items: CItem[]

    Returns the items that match the reference query.

    -
    totalCount: number

    Returns the total number of items that match the reference query.

    -

    Methods

    • Returns boolean

      Indicates if the reference query has more results.

      -
    • Returns boolean

      Indicates if the reference query has previous results.

      -
    totalCount: number

    Returns the total number of items that match the reference query.

    +

    Methods

    • Returns boolean

      Indicates if the reference query has more results.

      +
    • Returns boolean

      Indicates if the reference query has previous results.

      +
    +
    diff --git a/docs/interfaces/WeivDataQueryResult.html b/docs/interfaces/WeivDataQueryResult.html index 6e3d49da..45514c6c 100644 --- a/docs/interfaces/WeivDataQueryResult.html +++ b/docs/interfaces/WeivDataQueryResult.html @@ -1,4 +1,4 @@ -WeivDataQueryResult | WeivData API Reference | ExWeiv Apps
    interface WeivDataQueryResult<CItem> {
        _filters: any;
        _pipeline?: PipelineStage[];
        currentPage: number;
        items: CItem[];
        length: number;
        pageSize: number;
        totalCount: number;
        totalPages: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryResult<CItem>>;
        prev(): Promise<WeivDataQueryResult<CItem>>;
    }

    Type Parameters

    • CItem

    Properties

    _filters +WeivDataQueryResult | WeivData API Reference | ExWeiv Apps
    interface WeivDataQueryResult<CItem> {
        _filters: any;
        _pipeline?: PipelineStage[];
        currentPage: number;
        items: CItem[];
        length: number;
        pageSize: number;
        totalCount: number;
        totalPages: number;
        hasNext(): boolean;
        hasPrev(): boolean;
        next(): Promise<WeivDataQueryResult<CItem>>;
        prev(): Promise<WeivDataQueryResult<CItem>>;
    }

    Type Parameters

    • CItem

    Properties

    Properties

    _filters: any

    Filters applied to query.

    -
    _pipeline?: PipelineStage[]

    Pipeline of aggregation if used if not undefined.

    -
    currentPage: number

    Returns the index of the current results page number.

    -
    items: CItem[]

    Returns the items that match the query.

    -
    length: number

    Returns the number of items in the current results page.

    -
    pageSize: number

    Returns the query page size.

    -
    totalCount: number

    Returns the total number of items that match the query.

    -
    totalPages: number

    Returns the total number of pages the query produced. (will be deleted in v5 doesn't work correctly)

    -

    Methods

    • Returns boolean

      Indicates if the query has more results.

      -
    • Returns boolean

      Indicates the query has previous results.

      -
    _pipeline?: PipelineStage[]

    Pipeline of aggregation if used if not undefined.

    +
    currentPage: number

    Returns the index of the current results page number.

    +
    items: CItem[]

    Returns the items that match the query.

    +
    length: number

    Returns the number of items in the current results page.

    +
    pageSize: number

    Returns the query page size.

    +
    totalCount: number

    Returns the total number of items that match the query.

    +
    totalPages: number

    Returns the total number of pages the query produced. (will be deleted in v5 doesn't work correctly)

    +

    Methods

    • Returns boolean

      Indicates if the query has more results.

      +
    • Returns boolean

      Indicates the query has previous results.

      +
    +
    diff --git a/docs/types/BulkInsertResult.html b/docs/types/BulkInsertResult.html index f0cce994..c2fc5a4f 100644 --- a/docs/types/BulkInsertResult.html +++ b/docs/types/BulkInsertResult.html @@ -1,4 +1,4 @@ BulkInsertResult | WeivData API Reference | ExWeiv Apps
    BulkInsertResult: {
        inserted: number;
        insertedItemIds: ItemID[];
        insertedItems: CItem[];
    }

    Type Parameters

    • CItem

    Type declaration

    • inserted: number

      Total number of inserted items.

    • insertedItemIds: ItemID[]

      Item ids as string objectId

    • insertedItems: CItem[]

      Inserted items.

      -
    +
    diff --git a/docs/types/BulkRemoveResult.html b/docs/types/BulkRemoveResult.html index 05d0f150..967fe12e 100644 --- a/docs/types/BulkRemoveResult.html +++ b/docs/types/BulkRemoveResult.html @@ -1,3 +1,3 @@ BulkRemoveResult | WeivData API Reference | ExWeiv Apps

    Type Alias BulkRemoveResult<CItemID>

    BulkRemoveResult: { removed: number; removedItemIds: CItemID[] }

    Type Parameters

    • CItemID

    Type declaration

    • removed: number

      Total number of removed items.

    • removedItemIds: CItemID[]

      Removed item ids as string objectId

      -
    +
    diff --git a/docs/types/BulkSaveResult.html b/docs/types/BulkSaveResult.html index 3e723362..4257b088 100644 --- a/docs/types/BulkSaveResult.html +++ b/docs/types/BulkSaveResult.html @@ -2,4 +2,4 @@
  • insertedItemIds: ItemID[]

    Inserted item ids as string objectid

  • savedItems: CItem[]

    Updated items.

  • updated: number

    Total number of updated items.

    -
  • +
    diff --git a/docs/types/BulkUpdateResult.html b/docs/types/BulkUpdateResult.html index 0330473a..a1ef8caf 100644 --- a/docs/types/BulkUpdateResult.html +++ b/docs/types/BulkUpdateResult.html @@ -1,3 +1,3 @@ BulkUpdateResult | WeivData API Reference | ExWeiv Apps
    BulkUpdateResult: { updated: number; updatedItems: CItem[] }

    Type Parameters

    • CItem

    Type declaration

    • updated: number

      Total number of updated items.

    • updatedItems: CItem[]

      Updated items.

      -
    +
    diff --git a/docs/types/CacheSelections.html b/docs/types/CacheSelections.html index a0894d34..7fa081de 100644 --- a/docs/types/CacheSelections.html +++ b/docs/types/CacheSelections.html @@ -9,4 +9,4 @@
  • connectionclients (Cached Connected MongoClients)
  • Using these within an array will filter which caches to flush.

    -
    +
    diff --git a/docs/types/CollectionID.html b/docs/types/CollectionID.html index c415c07d..9556b3a0 100644 --- a/docs/types/CollectionID.html +++ b/docs/types/CollectionID.html @@ -6,4 +6,4 @@
    const dbName = "ExWeiv"
    const collectionName = "WeivData"
    const collectionId = `${dbName}/${collectionName}`;
    -
    +
    diff --git a/docs/types/CustomOptions.WeivDataConfig.html b/docs/types/CustomOptions.WeivDataConfig.html index 618e2d14..5e639453 100644 --- a/docs/types/CustomOptions.WeivDataConfig.html +++ b/docs/types/CustomOptions.WeivDataConfig.html @@ -8,4 +8,4 @@
  • OptionalsyncDatabase?: string

    This is the name of the database that you want to use to insert the data of Wix app collections. It can be any database you want.

  • WeivData config object with required and optional flags. For now there isn't any option to change.

    -
    +
    diff --git a/docs/types/Errors.ErrorsList.html b/docs/types/Errors.ErrorsList.html index 6f563f76..154c8740 100644 --- a/docs/types/Errors.ErrorsList.html +++ b/docs/types/Errors.ErrorsList.html @@ -41,4 +41,4 @@
  • 00025: "Wix Application Sync Error - Event data not found, don't forget to pass the event object from the Wix event function"

    Another common WixSync plug-in error, this means that event object is undefined and due to this sync function can't work. Make sure you pass the event object that's exported from the native Wix event hook.

  • 00026: "You didn't configure any database name to sync Wix apps data!"

    This is also another error from WixSync plug-in it means that you didn't configure the database name you want to use for your sync operations. The selected database name will be used when saving/deleting the Wix applications data.

    -
  • +
    diff --git a/docs/types/Hooks.HookContext.html b/docs/types/Hooks.HookContext.html index 36a905b8..68ff35e1 100644 --- a/docs/types/Hooks.HookContext.html +++ b/docs/types/Hooks.HookContext.html @@ -2,4 +2,4 @@
  • dbName: string

    Database name.

  • OptionaluserId?: string

    If there is one you'll have user id here (fetched from Wix Members data via wix-users-backend APIs)

  • userRoles: any[] | undefined

    Currecn user roles. (fetched from Wix Members data via wix-users-backend APIs)

    -
  • +
    diff --git a/docs/types/Hooks.HookName.html b/docs/types/Hooks.HookName.html index 3e786732..f1156b05 100644 --- a/docs/types/Hooks.HookName.html +++ b/docs/types/Hooks.HookName.html @@ -1,3 +1,3 @@ HookName | WeivData API Reference | ExWeiv Apps
    HookName:
        | "afterCount"
        | "afterGet"
        | "afterInsert"
        | "afterQuery"
        | "afterRemove"
        | "afterUpdate"
        | "beforeCount"
        | "beforeGet"
        | "beforeInsert"
        | "beforeQuery"
        | "beforeRemove"
        | "beforeUpdate"
        | "onFailure"
        | "beforeReplace"
        | "afterReplace"
        | "beforeFindOne"
        | "afterFindOne"
        | "beforeGetAndUpdate"
        | "afterGetAndUpdate"
        | "beforeGetAndReplace"
        | "afterGetAndReplace"
        | "beforeGetAndRemove"
        | "afterGetAndRemove"
        | "beforeIncrement"
        | "afterIncrement"
        | "beforeMultiply"
        | "afterMultiply"
        | "beforePush"
        | "afterPush"
        | "beforePull"
        | "afterPull"

    Currently all supported hooks:

    onFailure hook is only triggered if error happens inside of the hooks it does not triggered by every error action.

    -
    +
    diff --git a/docs/types/Item.html b/docs/types/Item.html index b27d9853..b5b9583c 100644 --- a/docs/types/Item.html +++ b/docs/types/Item.html @@ -1,2 +1,2 @@ Item | WeivData API Reference | ExWeiv Apps
    Item: { [key: string]: any }

    Items are basically objects. Most of the time they include an _id field.

    -
    +
    diff --git a/docs/types/ItemID.html b/docs/types/ItemID.html index 6ae39abb..cf294d81 100644 --- a/docs/types/ItemID.html +++ b/docs/types/ItemID.html @@ -7,4 +7,4 @@

    ObjectId is the default _id type in MongoDB collections.

    -
    +
    diff --git a/docs/types/PipelineStage.html b/docs/types/PipelineStage.html index 0b2816dc..8d366804 100644 --- a/docs/types/PipelineStage.html +++ b/docs/types/PipelineStage.html @@ -1,2 +1,2 @@ PipelineStage | WeivData API Reference | ExWeiv Apps
    PipelineStage: { [K in PipelineStageKey]?: any }

    Possible pipeline stage object

    -
    +
    diff --git a/docs/types/PipelineStageKey.html b/docs/types/PipelineStageKey.html index 982f756c..733e8599 100644 --- a/docs/types/PipelineStageKey.html +++ b/docs/types/PipelineStageKey.html @@ -1,2 +1,2 @@ PipelineStageKey | WeivData API Reference | ExWeiv Apps
    PipelineStageKey:
        | "$addFields"
        | "$bucket"
        | "$bucketAuto"
        | "$changeStream"
        | "$changeStreamSplitLargeEvent"
        | "$collStats"
        | "$count"
        | "$currentOp"
        | "$densify"
        | "$documents"
        | "$facet"
        | "$fill"
        | "$geoNear"
        | "$graphLookup"
        | "$group"
        | "$indexStats"
        | "$limit"
        | "$listLocalSessions"
        | "$listSampledQueries"
        | "$listSearchIndexes"
        | "$listSessions"
        | "$lookup"
        | "$match"
        | "$merge"
        | "$out"
        | "$planCacheStats"
        | "$project"
        | "$redact"
        | "$replaceRoot"
        | "$replaceWith"
        | "$sample"
        | "$search"
        | "$searchMeta"
        | "$set"
        | "$setWindowFields"
        | "$shardedDataDistribution"
        | "$skip"
        | "$sort"
        | "$sortByCount"
        | "$unionWith"
        | "$unset"
        | "$unwind"
        | "$vectorSearch"

    Expected aggregation stages for MongoDB

    -
    +
    diff --git a/docs/types/ReadConcern.html b/docs/types/ReadConcern.html index 445e7e26..2d64b90c 100644 --- a/docs/types/ReadConcern.html +++ b/docs/types/ReadConcern.html @@ -1,2 +1,2 @@ ReadConcern | WeivData API Reference | ExWeiv Apps
    ReadConcern: "local" | "majority" | "linearizable" | "available" | "snapshot"

    An option to choose a consistency level when reading data from MongoDB Clusters.

    -
    +
    diff --git a/docs/types/ReferencedItem.html b/docs/types/ReferencedItem.html index 425c9d18..1df5dce8 100644 --- a/docs/types/ReferencedItem.html +++ b/docs/types/ReferencedItem.html @@ -1,4 +1,4 @@ ReferencedItem | WeivData API Reference | ExWeiv Apps
    ReferencedItem: Item | ItemID | Item[] | ItemID[]

    Referenced item can be the item itself that contains the _id key or directly the item id. There can be more than one referenced item and if so you can put the values we defined above in an array. So it can also be Array or Array

    -
    +
    diff --git a/docs/types/ReferringItem.html b/docs/types/ReferringItem.html index 935a9ace..80506b32 100644 --- a/docs/types/ReferringItem.html +++ b/docs/types/ReferringItem.html @@ -1,2 +1,2 @@ ReferringItem | WeivData API Reference | ExWeiv Apps
    ReferringItem: Item | ItemID

    Referring item can be the item itself that contains the _id key or directly the item id.

    -
    +
    diff --git a/docs/types/SaveResult.html b/docs/types/SaveResult.html index 506bce98..0cd90af5 100644 --- a/docs/types/SaveResult.html +++ b/docs/types/SaveResult.html @@ -1,3 +1,3 @@ SaveResult | WeivData API Reference | ExWeiv Apps
    SaveResult: { item: CItem; upsertedId?: ItemID }

    Type Parameters

    • CItem

    Type declaration

    • item: CItem

      Saved item.

    • OptionalupsertedId?: ItemID

      Updated item id if item was updated.

      -
    +
    diff --git a/docs/types/WeivDataAggregateRunOptions.html b/docs/types/WeivDataAggregateRunOptions.html index 04553d71..d1581aee 100644 --- a/docs/types/WeivDataAggregateRunOptions.html +++ b/docs/types/WeivDataAggregateRunOptions.html @@ -1 +1 @@ -WeivDataAggregateRunOptions | WeivData API Reference | ExWeiv Apps
    WeivDataAggregateRunOptions: {
        convertIds?: boolean;
        readConcern?: ReadConcern;
        suppressAuth?: boolean;
    }
    +WeivDataAggregateRunOptions | WeivData API Reference | ExWeiv Apps
    WeivDataAggregateRunOptions: {
        convertIds?: boolean;
        readConcern?: ReadConcern;
        suppressAuth?: boolean;
    }
    diff --git a/docs/types/WeivDataQueryReferencedOptions.html b/docs/types/WeivDataQueryReferencedOptions.html index 68ea795b..02391228 100644 --- a/docs/types/WeivDataQueryReferencedOptions.html +++ b/docs/types/WeivDataQueryReferencedOptions.html @@ -1,3 +1,3 @@ WeivDataQueryReferencedOptions | WeivData API Reference | ExWeiv Apps
    WeivDataQueryReferencedOptions: { order: "asc" | "desc"; pageSize: number }

    Type declaration

    • order: "asc" | "desc"

      Sort type of returned items. (Asc = ascending, desc = descending)

    • pageSize: number

      Page size for query.

      -
    +