From 9c3c107593db6870663992fac6cda57396d919ab Mon Sep 17 00:00:00 2001 From: Enes Date: Fri, 19 Jul 2024 17:30:48 +0300 Subject: [PATCH] TS Declarations for Sync Plugins and Errors + Changelog --- CHANGELOG.md | 5 ++-- app/package.json | 2 +- app/weivdata.d.ts | 61 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2e356e7..7399017a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,11 @@ In this file you can find what's changed in each version. (Versions with -dev, - --- -### 4.6.0 +### 4.7.0 -- New Wix apps added to Sync plug-in including: Wix Stores, Wix eCommerce, Wix Marketing, Wix Paid Plans, Wix Blog, Wix Forum. Now you can sync all data from these apps easily. +- New Wix apps added to Sync plug-in including: Wix Stores, Wix eCommerce, Wix Marketing, Wix Pricing Plans, Wix Blog. Now you can sync all data from these apps easily. - Wix Members now also has functions for badges collection. +- Some BUG Fixes for sync plugins ### 4.5.1, 4.5.2 diff --git a/app/package.json b/app/package.json index 524cbeb9..04dff28e 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "@exweiv/weiv-data", - "version": "4.6.0", + "version": "4.7.0", "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/weivdata.d.ts b/app/weivdata.d.ts index 4a504293..4963a2f1 100644 --- a/app/weivdata.d.ts +++ b/app/weivdata.d.ts @@ -2175,6 +2175,21 @@ declare module '@exweiv/weiv-data' { * ``` */ "00024": "Wix Application Sync Error" + + /** + * @description + * + * 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. + */ + "00025": "Wix Application Sync Error - Event data not found, don't forget to pass the event object from the Wix event function" + + /** + * @description + * + * 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. + */ + "00026": "You didn't configure any database name to sync Wix apps data!" } } @@ -2244,10 +2259,56 @@ declare module '@exweiv/weiv-data' { onCollectionDeleted(event: any): Promise; } + interface wixEcom { + onOrderCreated(event: any): Promise; + onOrderUpdated(event: any): Promise; + + onAbandonedCheckoutCreated(event: any): Promise; + onAbandonedCheckoutRecovered(event: any): Promise; + } + + interface wixMarketing { + onCouponCreated(event: any): Promise; + onCouponUpdated(event: any): Promise; + onCouponDeleted(event: any): Promise; + } + + interface wixPricingPlans { + onPlanCreated(event: any): Promise; + onPlanUpdated(event: any): Promise; + onPlanArchived(event: any, deletePlan?: boolean): Promise; + } + + interface wixBlog { + onPostCreated(event: any): Promise; + onPostUpdated(event: any): Promise; + onPostDeleted(event: any): Promise; + + onCategoryCreated(event: any): Promise; + onCategoryUpdated(event: any): Promise; + onCategoryDeleted(event: any): Promise; + + onTagCreated(event: any): Promise; + onTagUpdated(event: any): Promise; + onTagDeleted(event: any): Promise; + } + /**@internal */ const wixMembers: wixMembers; /**@internal */ const wixStores: wixStores; + + /**@internal */ + const wixEcom: wixEcom; + + /**@internal */ + const wixMarketing: wixMarketing; + + /**@internal */ + const wixPricingPlans: wixPricingPlans; + + /**@internal */ + const wixBlog: wixBlog; } } \ No newline at end of file