Skip to content

Commit

Permalink
TS Declarations for Sync Plugins and Errors + Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
loeiks committed Jul 19, 2024
1 parent 86035ea commit 9c3c107
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
61 changes: 61 additions & 0 deletions app/weivdata.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
}
}

Expand Down Expand Up @@ -2244,10 +2259,56 @@ declare module '@exweiv/weiv-data' {
onCollectionDeleted(event: any): Promise<void>;
}

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

onAbandonedCheckoutCreated(event: any): Promise<void>;
onAbandonedCheckoutRecovered(event: any): Promise<void>;
}

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

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

interface wixBlog {
onPostCreated(event: any): Promise<void>;
onPostUpdated(event: any): Promise<void>;
onPostDeleted(event: any): Promise<void>;

onCategoryCreated(event: any): Promise<void>;
onCategoryUpdated(event: any): Promise<void>;
onCategoryDeleted(event: any): Promise<void>;

onTagCreated(event: any): Promise<void>;
onTagUpdated(event: any): Promise<void>;
onTagDeleted(event: any): Promise<void>;
}

/**@internal */
const wixMembers: wixMembers;

/**@internal */
const wixStores: wixStores;

/**@internal */
const wixEcom: wixEcom;

/**@internal */
const wixMarketing: wixMarketing;

/**@internal */
const wixPricingPlans: wixPricingPlans;

/**@internal */
const wixBlog: wixBlog;
}
}

0 comments on commit 9c3c107

Please sign in to comment.