@jay-framework/wix-stores 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent-kit/designer/related-products.md +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +14 -13
- package/package.json +15 -15
- package/plugin.yaml +3 -4
|
@@ -120,4 +120,4 @@ To show products from a **specific** category on any page (homepage, landing pag
|
|
|
120
120
|
|
|
121
121
|
## AIditor Add Menu
|
|
122
122
|
|
|
123
|
-
Attach **Related products** (`wix-stores:related-products`) when marking an area on a product page. The item prompt includes this recipe; `jay-stack
|
|
123
|
+
Attach **Related products** (`wix-stores:related-products`) when marking an area on a product page. The item prompt includes this recipe; `jay-stack agent-kit` writes the catalog to `agent-kit/aiditor/add-menu/wix-stores.yaml`.
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import * as _jay_framework_runtime from '@jay-framework/runtime';
|
|
|
7
7
|
import { HTMLElementCollectionProxy, HTMLElementProxy } from '@jay-framework/runtime';
|
|
8
8
|
import { WixClient } from '@wix/sdk';
|
|
9
9
|
import { Getter } from '@jay-framework/reactive';
|
|
10
|
-
import { PluginSetupContext, PluginSetupResult,
|
|
10
|
+
import { PluginSetupContext, PluginSetupResult, PluginAgentKitContext, PluginAgentKitResult } from '@jay-framework/stack-server-runtime';
|
|
11
11
|
|
|
12
12
|
declare enum OptionRenderType$2 {
|
|
13
13
|
TEXT_CHOICES,
|
|
@@ -1149,7 +1149,7 @@ declare function setupWixStores(ctx: PluginSetupContext): Promise<PluginSetupRes
|
|
|
1149
1149
|
* Generate a YAML reference file with the full category tree.
|
|
1150
1150
|
* Shows all categories with IDs, names, product counts, and parent-child hierarchy.
|
|
1151
1151
|
*/
|
|
1152
|
-
declare function
|
|
1152
|
+
declare function generateWixStoresAgentKit(ctx: PluginAgentKitContext): Promise<PluginAgentKitResult>;
|
|
1153
1153
|
|
|
1154
1154
|
/**
|
|
1155
1155
|
* Product Page Contract Generator
|
|
@@ -1166,4 +1166,4 @@ declare function generateWixStoresReferences(ctx: PluginReferencesContext): Prom
|
|
|
1166
1166
|
*/
|
|
1167
1167
|
declare const generator: _jay_framework_fullstack_component.DynamicContractGenerator<[WixStoresService]>;
|
|
1168
1168
|
|
|
1169
|
-
export { type CategoryListParams, type CategoryProductsProps, type CategoryTree, type GetProductBySlugInput, type ProductPageParams, type ProductSearchParams, type ProductSpotlightProps, WIX_STORES_CONTEXT, WIX_STORES_SERVICE_MARKER, type WixStoresContext, type WixStoresInitData, type WixStoresService, type WixStoresServiceOptions, buildCategoryUrl, buildProductUrl, categoryList, categoryProducts, findCategoryImage, findRootCategoryId, findRootCategorySlug,
|
|
1169
|
+
export { type CategoryListParams, type CategoryProductsProps, type CategoryTree, type GetProductBySlugInput, type ProductPageParams, type ProductSearchParams, type ProductSpotlightProps, WIX_STORES_CONTEXT, WIX_STORES_SERVICE_MARKER, type WixStoresContext, type WixStoresInitData, type WixStoresService, type WixStoresServiceOptions, buildCategoryUrl, buildProductUrl, categoryList, categoryProducts, findCategoryImage, findRootCategoryId, findRootCategorySlug, generateWixStoresAgentKit, getCategories, getProductBySlug, getVariantStock, init, productPage, generator as productPageContractGenerator, productSearch, productSpotlight, provideWixStoresService, searchProducts, setupWixStores };
|
package/dist/index.js
CHANGED
|
@@ -2310,13 +2310,6 @@ async function setupWixStores(ctx) {
|
|
|
2310
2310
|
message: `Wix Stores V3 API check failed: ${hint}. (${msg})`
|
|
2311
2311
|
};
|
|
2312
2312
|
}
|
|
2313
|
-
const addMenuCreated = writeAddMenuCatalog(ctx);
|
|
2314
|
-
if (addMenuCreated) {
|
|
2315
|
-
configCreated.push(addMenuCreated);
|
|
2316
|
-
}
|
|
2317
|
-
configCreated.push(
|
|
2318
|
-
...copyAiditorAddMenuThumbnails(ctx, resolvePackageAgentKitPath, "wix-stores")
|
|
2319
|
-
);
|
|
2320
2313
|
const message = `Wix Stores configured (product URL: ${service.urls.product})`;
|
|
2321
2314
|
return {
|
|
2322
2315
|
status: "configured",
|
|
@@ -2324,7 +2317,7 @@ async function setupWixStores(ctx) {
|
|
|
2324
2317
|
...configCreated.length > 0 ? { configCreated } : {}
|
|
2325
2318
|
};
|
|
2326
2319
|
}
|
|
2327
|
-
async function
|
|
2320
|
+
async function generateWixStoresAgentKit(ctx) {
|
|
2328
2321
|
if (ctx.initError) {
|
|
2329
2322
|
throw new Error(`init failed: ${ctx.initError.message}`);
|
|
2330
2323
|
}
|
|
@@ -2335,6 +2328,14 @@ async function generateWixStoresReferences(ctx) {
|
|
|
2335
2328
|
throw new Error("WixStoresService not available. Run jay-stack setup first.");
|
|
2336
2329
|
}
|
|
2337
2330
|
fs.mkdirSync(ctx.referencesDir, { recursive: true });
|
|
2331
|
+
const agentKitCreated = [];
|
|
2332
|
+
const addMenuStatic = writeAddMenuCatalog(ctx);
|
|
2333
|
+
if (addMenuStatic) {
|
|
2334
|
+
agentKitCreated.push(addMenuStatic);
|
|
2335
|
+
}
|
|
2336
|
+
agentKitCreated.push(
|
|
2337
|
+
...copyAiditorAddMenuThumbnails(ctx, resolvePackageAgentKitPath, "wix-stores")
|
|
2338
|
+
);
|
|
2338
2339
|
const allCategories = [];
|
|
2339
2340
|
let cursor;
|
|
2340
2341
|
let hasMore = true;
|
|
@@ -2416,15 +2417,15 @@ async function generateWixStoresReferences(ctx) {
|
|
|
2416
2417
|
} catch (error) {
|
|
2417
2418
|
console.error("[wix-stores] Failed to fetch data extension schemas:", error);
|
|
2418
2419
|
}
|
|
2419
|
-
|
|
2420
|
+
agentKitCreated.push(
|
|
2420
2421
|
`agent-kit/references/${ctx.pluginName}/categories.yaml`,
|
|
2421
2422
|
addMenuGenerated
|
|
2422
|
-
|
|
2423
|
+
);
|
|
2423
2424
|
if (extensionFieldCount > 0) {
|
|
2424
|
-
|
|
2425
|
+
agentKitCreated.push(`agent-kit/references/${ctx.pluginName}/data-extension-fields.yaml`);
|
|
2425
2426
|
}
|
|
2426
2427
|
return {
|
|
2427
|
-
|
|
2428
|
+
agentKitCreated,
|
|
2428
2429
|
message: `${allCategories.length} categories (${roots.length} root), ${extensionFieldCount} extension fields`
|
|
2429
2430
|
};
|
|
2430
2431
|
}
|
|
@@ -2667,7 +2668,7 @@ export {
|
|
|
2667
2668
|
findCategoryImage,
|
|
2668
2669
|
findRootCategoryId,
|
|
2669
2670
|
findRootCategorySlug,
|
|
2670
|
-
|
|
2671
|
+
generateWixStoresAgentKit,
|
|
2671
2672
|
getCategories,
|
|
2672
2673
|
getProductBySlug,
|
|
2673
2674
|
getVariantStock,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/wix-stores",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Wix Stores API client for Jay Framework",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
"test": "vitest run"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@jay-framework/component": "^0.
|
|
44
|
-
"@jay-framework/fullstack-component": "^0.
|
|
45
|
-
"@jay-framework/reactive": "^0.
|
|
46
|
-
"@jay-framework/runtime": "^0.
|
|
47
|
-
"@jay-framework/secure": "^0.
|
|
48
|
-
"@jay-framework/stack-client-runtime": "^0.
|
|
49
|
-
"@jay-framework/stack-server-runtime": "^0.
|
|
50
|
-
"@jay-framework/wix-cart": "^0.
|
|
51
|
-
"@jay-framework/wix-server-client": "^0.
|
|
52
|
-
"@jay-framework/wix-utils": "^0.
|
|
43
|
+
"@jay-framework/component": "^0.22.0",
|
|
44
|
+
"@jay-framework/fullstack-component": "^0.22.0",
|
|
45
|
+
"@jay-framework/reactive": "^0.22.0",
|
|
46
|
+
"@jay-framework/runtime": "^0.22.0",
|
|
47
|
+
"@jay-framework/secure": "^0.22.0",
|
|
48
|
+
"@jay-framework/stack-client-runtime": "^0.22.0",
|
|
49
|
+
"@jay-framework/stack-server-runtime": "^0.22.0",
|
|
50
|
+
"@jay-framework/wix-cart": "^0.22.0",
|
|
51
|
+
"@jay-framework/wix-server-client": "^0.22.0",
|
|
52
|
+
"@jay-framework/wix-utils": "^0.22.0",
|
|
53
53
|
"@wix/sdk": "^1.21.5",
|
|
54
54
|
"js-yaml": "^4.1.0"
|
|
55
55
|
},
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"@babel/core": "^7.23.7",
|
|
58
58
|
"@babel/preset-env": "^7.23.8",
|
|
59
59
|
"@babel/preset-typescript": "^7.23.3",
|
|
60
|
-
"@jay-framework/compiler-jay-stack": "^0.
|
|
61
|
-
"@jay-framework/jay-cli": "^0.
|
|
62
|
-
"@jay-framework/jay-stack-cli": "^0.
|
|
63
|
-
"@jay-framework/vite-plugin": "^0.
|
|
60
|
+
"@jay-framework/compiler-jay-stack": "^0.22.0",
|
|
61
|
+
"@jay-framework/jay-cli": "^0.22.0",
|
|
62
|
+
"@jay-framework/jay-stack-cli": "^0.22.0",
|
|
63
|
+
"@jay-framework/vite-plugin": "^0.22.0",
|
|
64
64
|
"nodemon": "^3.0.3",
|
|
65
65
|
"rimraf": "^5.0.5",
|
|
66
66
|
"tslib": "^2.6.2",
|
package/plugin.yaml
CHANGED
|
@@ -51,7 +51,6 @@ contexts:
|
|
|
51
51
|
marker: WIX_STORES_CONTEXT
|
|
52
52
|
description: Client-side stores access with product variant resolution and delegated cart operations
|
|
53
53
|
|
|
54
|
-
setup:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
description: Validate Wix Stores service; generate category tree reference
|
|
54
|
+
setup: setupWixStores
|
|
55
|
+
agentkit: generateWixStoresAgentKit
|
|
56
|
+
description: Validate Wix Stores service; generate category tree reference and Add Menu catalogs
|