From ce2f58c7266ce8daa518e454d88a85aa0d4a3e50 Mon Sep 17 00:00:00 2001 From: Enes Date: Fri, 19 Jul 2024 02:33:51 +0300 Subject: [PATCH 01/12] BUG Fixes --- CHANGELOG.md | 2 +- app/package.json | 2 +- app/src/Apps/wix_members.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06c340fb..dd51360b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ In this file you can find what's changed in each version. (Versions with -dev, - --- -### 4.5.1 +### 4.5.1, 4.5.2 - BUG Fixes and TS type fixes. For Wix Members sync plug-in. diff --git a/app/package.json b/app/package.json index cdc77cf1..12372fb3 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "@exweiv/weiv-data", - "version": "4.5.1", + "version": "4.5.2", "description": "Custom API Library for Wix sites to connect MongoDB. Designed to easily switch from wix-data APIs.", "main": "./lib/index.js", "files": [ diff --git a/app/src/Apps/wix_members.ts b/app/src/Apps/wix_members.ts index 78a46f90..6e4490a3 100644 --- a/app/src/Apps/wix_members.ts +++ b/app/src/Apps/wix_members.ts @@ -61,9 +61,9 @@ export async function onMemberUpdated(event: Document): Promise { // Insert to MongoDB (fire and forget) Promise.all([ - (await native(`${syncDatabase}/WixMembersPublicData`, true)).updateOne(find, readyPublicData, { retryWrites: true }), - (await native(`${syncDatabase}/WixMembersPrivateData`, true)).updateOne(find, readyPrivateData, { retryWrites: true }), - (await native(`${syncDatabase}/WixMembersFullData`, true)).updateOne(find, readyFullData, { retryWrites: true }), + (await native(`${syncDatabase}/WixMembersPublicData`, true)).updateOne(find, { $set: readyPublicData }, { retryWrites: true }), + (await native(`${syncDatabase}/WixMembersPrivateData`, true)).updateOne(find, { $set: readyPrivateData }, { retryWrites: true }), + (await native(`${syncDatabase}/WixMembersFullData`, true)).updateOne(find, { $set: readyFullData }, { retryWrites: true }), ]); } catch (err) { // Log Error (fire and forget) From b5876cdeb76cf1f1ca8982005814e371da308507 Mon Sep 17 00:00:00 2001 From: ExWeiv GitHub BOT Date: Thu, 18 Jul 2024 23:34:23 +0000 Subject: [PATCH 02/12] Build and Generate Docs - BOT --- app/lib/Apps/wix_members.js | 6 +- app/package-lock.json | 4 +- docs/functions/Hooks.afterCount.html | 4 +- docs/functions/Hooks.afterFindOne.html | 4 +- docs/functions/Hooks.afterGet.html | 4 +- docs/functions/Hooks.afterGetAndRemove.html | 4 +- docs/functions/Hooks.afterGetAndReplace.html | 4 +- docs/functions/Hooks.afterGetAndUpdate.html | 4 +- docs/functions/Hooks.afterIncrement.html | 4 +- docs/functions/Hooks.afterInsert.html | 4 +- docs/functions/Hooks.afterMultiply.html | 4 +- docs/functions/Hooks.afterPull.html | 4 +- docs/functions/Hooks.afterPush.html | 4 +- docs/functions/Hooks.afterQuery.html | 4 +- docs/functions/Hooks.afterRemove.html | 4 +- docs/functions/Hooks.afterReplace.html | 4 +- docs/functions/Hooks.afterUpdate.html | 4 +- docs/functions/Hooks.beforeCount.html | 4 +- docs/functions/Hooks.beforeFindOne.html | 4 +- docs/functions/Hooks.beforeGet.html | 4 +- docs/functions/Hooks.beforeGetAndRemove.html | 4 +- docs/functions/Hooks.beforeGetAndReplace.html | 4 +- docs/functions/Hooks.beforeGetAndUpdate.html | 4 +- docs/functions/Hooks.beforeIncrement.html | 4 +- docs/functions/Hooks.beforeInsert.html | 4 +- docs/functions/Hooks.beforeMultiply.html | 4 +- docs/functions/Hooks.beforePull.html | 4 +- docs/functions/Hooks.beforePush.html | 4 +- docs/functions/Hooks.beforeQuery.html | 4 +- docs/functions/Hooks.beforeRemove.html | 4 +- docs/functions/Hooks.beforeReplace.html | 4 +- docs/functions/Hooks.beforeUpdate.html | 4 +- docs/functions/Hooks.onFailure.html | 4 +- docs/functions/_version.html | 4 +- docs/functions/aggregate.html | 4 +- docs/functions/bulkInsert.html | 4 +- docs/functions/bulkRemove.html | 4 +- docs/functions/bulkSave.html | 4 +- docs/functions/bulkUpdate.html | 4 +- docs/functions/convertIdToObjectId.html | 4 +- docs/functions/convertIdToString.html | 4 +- docs/functions/createCollection.html | 4 +- docs/functions/deleteCollection.html | 4 +- docs/functions/filter.html | 4 +- docs/functions/findOne.html | 4 +- docs/functions/flushCache.html | 4 +- docs/functions/get.html | 4 +- docs/functions/getAndRemove.html | 4 +- docs/functions/getAndReplace.html | 4 +- docs/functions/getAndUpdate.html | 4 +- docs/functions/increment.html | 4 +- docs/functions/insert.html | 4 +- docs/functions/insertReference.html | 4 +- docs/functions/isReferenced.html | 4 +- docs/functions/listCollections.html | 4 +- docs/functions/multiply.html | 4 +- docs/functions/native.html | 4 +- docs/functions/pull.html | 4 +- docs/functions/push.html | 4 +- docs/functions/query.html | 4 +- docs/functions/queryReferenced.html | 4 +- docs/functions/remove.html | 4 +- docs/functions/removeReference.html | 4 +- docs/functions/renameCollection.html | 4 +- docs/functions/replace.html | 4 +- docs/functions/replaceReferences.html | 4 +- docs/functions/save.html | 4 +- docs/functions/truncate.html | 4 +- docs/functions/update.html | 4 +- docs/index.html | 2 +- .../CustomOptions.ConfigOptions.html | 6 +- .../CustomOptions.ConnectionOptions.html | 12 ++-- docs/interfaces/SyncWixApps.wixMembers.html | 6 +- docs/interfaces/WeivDataAggregate.html | 30 +++++----- docs/interfaces/WeivDataAggregateResult.html | 14 ++--- docs/interfaces/WeivDataFilter.html | 38 ++++++------- docs/interfaces/WeivDataQuery.html | 56 +++++++++---------- .../WeivDataQueryReferencedResult.html | 16 +++--- docs/interfaces/WeivDataQueryResult.html | 28 +++++----- docs/modules.html | 2 +- docs/modules/CustomOptions.html | 4 +- docs/modules/Errors.html | 4 +- docs/modules/Hooks.html | 4 +- docs/modules/SyncWixApps.html | 4 +- docs/types/BulkInsertResult.html | 4 +- docs/types/BulkRemoveResult.html | 4 +- docs/types/BulkSaveResult.html | 4 +- docs/types/BulkUpdateResult.html | 4 +- docs/types/CacheSelections.html | 4 +- docs/types/CollectionID.html | 4 +- docs/types/CustomOptions.WeivDataConfig.html | 4 +- docs/types/Errors.ErrorsList.html | 4 +- docs/types/Hooks.HookContext.html | 4 +- docs/types/Hooks.HookName.html | 4 +- docs/types/IncludeObject.html | 4 +- docs/types/Item.html | 4 +- docs/types/ItemID.html | 4 +- docs/types/PipelineStage.html | 4 +- docs/types/PipelineStageKey.html | 4 +- docs/types/ReadConcern.html | 4 +- docs/types/ReferencedItem.html | 4 +- docs/types/ReferringItem.html | 4 +- docs/types/SaveResult.html | 4 +- docs/types/WeivDataAggregateRunOptions.html | 4 +- docs/types/WeivDataOptions.html | 4 +- docs/types/WeivDataOptionsCache.html | 4 +- docs/types/WeivDataOptionsOwner.html | 4 +- docs/types/WeivDataOptionsQuery.html | 4 +- docs/types/WeivDataOptionsWrite.html | 4 +- docs/types/WeivDataOptionsWriteOwner.html | 4 +- .../types/WeivDataQueryReferencedOptions.html | 4 +- 111 files changed, 306 insertions(+), 306 deletions(-) diff --git a/app/lib/Apps/wix_members.js b/app/lib/Apps/wix_members.js index 01e95efe..9a0ba8ec 100644 --- a/app/lib/Apps/wix_members.js +++ b/app/lib/Apps/wix_members.js @@ -48,9 +48,9 @@ async function onMemberUpdated(event) { const { readyFullData, readyPrivateData, readyPublicData } = await getMemberData(memberId); const find = { "entityId": { $eq: memberId } }; Promise.all([ - (await (0, native_1.native)(`${syncDatabase}/WixMembersPublicData`, true)).updateOne(find, readyPublicData, { retryWrites: true }), - (await (0, native_1.native)(`${syncDatabase}/WixMembersPrivateData`, true)).updateOne(find, readyPrivateData, { retryWrites: true }), - (await (0, native_1.native)(`${syncDatabase}/WixMembersFullData`, true)).updateOne(find, readyFullData, { retryWrites: true }), + (await (0, native_1.native)(`${syncDatabase}/WixMembersPublicData`, true)).updateOne(find, { $set: readyPublicData }, { retryWrites: true }), + (await (0, native_1.native)(`${syncDatabase}/WixMembersPrivateData`, true)).updateOne(find, { $set: readyPrivateData }, { retryWrites: true }), + (await (0, native_1.native)(`${syncDatabase}/WixMembersFullData`, true)).updateOne(find, { $set: readyFullData }, { retryWrites: true }), ]); } catch (err) { diff --git a/app/package-lock.json b/app/package-lock.json index 0069609e..79895a31 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,12 +1,12 @@ { "name": "@exweiv/weiv-data", - "version": "4.5.1", + "version": "4.5.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@exweiv/weiv-data", - "version": "4.5.1", + "version": "4.5.2", "license": "Apache-2.0", "dependencies": { "crypto-js": "^4.2.0", diff --git a/docs/functions/Hooks.afterCount.html b/docs/functions/Hooks.afterCount.html index 301fd666..6a6121b8 100644 --- a/docs/functions/Hooks.afterCount.html +++ b/docs/functions/Hooks.afterCount.html @@ -3,10 +3,10 @@
  • 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.

    -