@wix/agent-skills 1.15.1 → 1.16.1
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/README.md +3 -7
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +4 -1
- package/skills/wix-app/references/APP_TOOLS.md +134 -0
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +1 -1
- package/skills/wix-app/references/DASHBOARD_PAGE.md +0 -10
- package/skills/wix-app/references/DATA_COLLECTION.md +1 -1
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +42 -8
- package/skills/wix-app/references/SERVICE_PLUGIN.md +12 -10
- package/skills/wix-app/references/app-tools/TOOLS.md +75 -0
- package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +2 -2
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +172 -0
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +143 -0
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +23 -2
- package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +29 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +1 -1
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +60 -0
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +27 -2
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +5 -3
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +24 -7
- package/skills/wix-app/references/editor-react-component/PARTS.md +15 -2
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +2 -3
- package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +187 -0
- package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +13 -9
- package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +4 -0
- package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +4 -0
- package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +3 -1
- package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +4 -0
- package/skills/wix-app/references/service-plugin/TOOLS_PROVIDER.md +54 -0
- package/skills/wix-app/references/stores/QUERY.md +32 -0
- package/skills/wix-app/scripts/scan-a11y-code.cjs +777 -0
- package/skills/wix-app/scripts/scan-a11y-eslint.cjs +201 -0
- package/skills/wix-docs/SKILL.md +35 -3
- package/skills/wix-headless/SKILL.md +3 -1
- package/skills/wix-headless/references/CAPABILITIES.md +16 -3
- package/skills/wix-headless/references/CONTENT.md +36 -0
- package/skills/wix-headless/references/DESIGN.md +54 -0
- package/skills/wix-headless/references/DISCOVERY.md +24 -0
- package/skills/wix-headless/references/IMAGE_GENERATION.md +10 -0
- package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
- package/skills/wix-headless/references/SEED.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +3 -2
- package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +560 -102
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +210 -143
- package/skills/wix-headless/references/inline-recipes/setup-online-store.md +32 -23
- package/skills/wix-headless/references/managed/CONNECT.md +1 -1
- package/skills/wix-headless/references/managed/CREATE.md +14 -0
- package/skills/wix-headless/references/managed/DEPLOYMENT.md +25 -0
- package/skills/wix-manage/SKILL.md +130 -7
- package/skills/wix-manage/references/accessibility/scan-site-accessibility.md +98 -0
- package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +40 -0
- package/skills/wix-manage/references/app-installation/app-installation-dashboard-navigation.md +28 -0
- package/skills/wix-manage/references/blog/blog-dashboard-navigation.md +56 -0
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +31 -6
- package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +3 -1
- package/skills/wix-manage/references/bookings/bookings-dashboard-navigation.md +63 -0
- package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +10 -1
- package/skills/wix-manage/references/cms/cms-dashboard-navigation.md +44 -0
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +31 -3
- package/skills/wix-manage/references/cms/cms-publishing-flow.md +287 -0
- package/skills/wix-manage/references/cms/cms-schema-management.md +27 -1
- package/skills/wix-manage/references/contacts/contacts-dashboard-navigation.md +46 -0
- package/skills/wix-manage/references/contacts/create-a-contact.md +82 -0
- package/skills/wix-manage/references/contacts/update-a-contact.md +119 -0
- package/skills/wix-manage/references/dashboard-navigation/dashboard-navigation.md +82 -0
- package/skills/wix-manage/references/dashboard-navigation/routes.json +1733 -0
- package/skills/wix-manage/references/domains/domains-dashboard-navigation.md +32 -0
- package/skills/wix-manage/references/ecommerce/ecom-pricing.md +4 -4
- package/skills/wix-manage/references/ecommerce/ecom-shipping.md +1 -1
- package/skills/wix-manage/references/ecommerce/gift-cards/ecom-gift-cards-goal-sell-gift-cards.md +338 -0
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-discount-rule.md +42 -78
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-bundle-and-save.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-stock-mover.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-upsell-boost.md +1 -1
- package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +90 -92
- package/skills/wix-manage/references/events/create-wix-event.md +176 -0
- package/skills/wix-manage/references/events/manage-wix-events.md +174 -0
- package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +44 -0
- package/skills/wix-manage/references/get-paid/get-paid-dashboard-navigation.md +52 -0
- package/skills/wix-manage/references/google-ads/billing-and-payment.md +80 -0
- package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +212 -0
- package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +110 -0
- package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +25 -0
- package/skills/wix-manage/references/google-ads/install-and-create-account.md +155 -0
- package/skills/wix-manage/references/google-ads/manage-campaign-lifecycle.md +63 -0
- package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +155 -0
- package/skills/wix-manage/references/marketing/marketing-dashboard-navigation.md +52 -0
- package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +99 -1
- package/skills/wix-manage/references/pricing-plans/pricing-plans-dashboard-navigation.md +45 -0
- package/skills/wix-manage/references/restaurants/restaurants-dashboard-navigation.md +68 -0
- package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +94 -125
- package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +48 -9
- package/skills/wix-manage/references/site-properties/site-properties-dashboard-navigation.md +31 -0
- package/skills/wix-manage/references/sites/create-headless-site.md +52 -0
- package/skills/wix-manage/references/sites/create-site-from-template.md +2 -25
- package/skills/wix-manage/references/sites/site-import.md +217 -192
- package/skills/wix-manage/references/sites/sites-dashboard-navigation.md +29 -0
- package/skills/wix-manage/references/stores/add-store-pages-to-site.md +17 -1
- package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +26 -8
- package/skills/wix-manage/references/stores/stores-dashboard-navigation.md +65 -0
- package/skills/wix-manage/references/stores/update-product-with-options.md +39 -7
- package/skills/wix-replatform/.publish-manifest.json +8 -0
- package/skills/wix-replatform/SKILL.md +693 -0
- package/skills/wix-replatform/lib/artifact-freshness.js +215 -0
- package/skills/wix-replatform/lib/completion-report.js +200 -0
- package/skills/wix-replatform/lib/config-env.js +59 -0
- package/skills/wix-replatform/lib/execution-manifest.js +185 -0
- package/skills/wix-replatform/lib/execution-state.js +173 -0
- package/skills/wix-replatform/lib/import-recovery.js +313 -0
- package/skills/wix-replatform/lib/local-state.js +642 -0
- package/skills/wix-replatform/lib/orchestration-preflight.js +143 -0
- package/skills/wix-replatform/lib/orchestration-router.js +122 -0
- package/skills/wix-replatform/lib/orchestration-state.js +455 -0
- package/skills/wix-replatform/lib/progress-log.js +224 -0
- package/skills/wix-replatform/lib/progress-log.sh +140 -0
- package/skills/wix-replatform/lib/url-preservation-state.js +391 -0
- package/skills/wix-replatform/resources/rp-discovery/SKILL.md +184 -0
- package/skills/wix-replatform/resources/rp-execute-import/SKILL.md +529 -0
- package/skills/wix-replatform/resources/rp-execute-setup/SKILL.md +316 -0
- package/skills/wix-replatform/resources/rp-execute-setup/scripts/mint-token.sh +64 -0
- package/skills/wix-replatform/resources/rp-import-codegen/SKILL.md +1114 -0
- package/skills/wix-replatform/resources/rp-mapper/SKILL.md +430 -0
- package/skills/wix-replatform/resources/rp-mapper/lib/mapping-resolve.js +217 -0
- package/skills/wix-replatform/resources/rp-mapper/scripts/resolve-mapping.js +148 -0
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +378 -0
- package/skills/wix-replatform/resources/rp-setup-discovery/SKILL.md +183 -0
- package/skills/wix-replatform/resources/rp-source-csv/SKILL.md +478 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/canonical-record.js +136 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fileset.js +0 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fingerprint.js +310 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-layout.js +1081 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-parse.js +618 -0
- package/skills/wix-replatform/resources/rp-source-csv/scripts/csv-discovery.js +949 -0
- package/skills/wix-replatform/resources/rp-source-csv/source-schema.example.json +196 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/bigcommerce.json +66 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/magento.json +60 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/shopify.json +95 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/woocommerce.json +82 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/SKILL.md +256 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-http.js +249 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-route-classifier.js +444 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-discovery.js +774 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/source-schema.example.json +71 -0
- package/skills/wix-replatform/resources/rp-target-wix/SKILL.md +632 -0
- package/skills/wix-replatform/resources/rp-target-wix/SPEC-product-reviews-and-blog-authorship.md +330 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/README.md +21 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/domain.json +19 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/category.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/comment.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/post.json +39 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/tag.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/collection.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/data-item.json +36 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/reference.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/contact.json +131 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/email-subscription.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/label.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/domain.json +21 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-refund.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order.json +97 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/index.json +528 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-file.json +38 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-folder.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/domain.json +13 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/badge.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member.json +53 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/schema.json +84 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/domain.json +25 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/category.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/coupon.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/inventory-item.json +38 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-tag.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product.json +90 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/audit-summary.js +64 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/contract-ledger.js +141 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/domain-knowledge.js +384 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/ndjson.js +260 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-verification.js +238 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-build.js +237 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-target-spec.js +238 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +2219 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge-validate.js +31 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge.js +100 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js +107 -0
- package/skills/wix-replatform/resources/rp-telemetry/SKILL.md +344 -0
- package/skills/wix-replatform/resources/rp-telemetry/lib/bi-sink.js +250 -0
- package/skills/wix-replatform/resources/rp-telemetry/lib/telemetry-recorder.js +1927 -0
- package/skills/wix-replatform/resources/rp-telemetry/scripts/meter-from-audit.js +83 -0
- package/skills/wix-replatform/resources/rp-telemetry/scripts/rp-telemetry.js +141 -0
- package/skills/wix-replatform/scripts/artifact-freshness.js +76 -0
- package/skills/wix-replatform/scripts/execution-manifest-validate.js +43 -0
- package/skills/wix-replatform/scripts/execution-state-prepare.js +128 -0
- package/skills/wix-replatform/scripts/orchestration-preflight.js +48 -0
- package/skills/wix-replatform/scripts/orchestration-route.js +46 -0
- package/skills/wix-replatform/scripts/orchestration-state.js +245 -0
- package/skills/wix-vibe-headless/SKILL.md +49 -25
- package/skills/wix-vibe-headless/install/deploy.cjs +156 -0
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +34 -0
- package/skills/wix-vibe-headless/platforms/README.md +8 -4
- package/skills/wix-vibe-headless/platforms/base44.md +111 -101
- package/skills/wix-vibe-headless/platforms/generic.md +99 -64
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +226 -119
- package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +43 -0
- package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +25 -0
- package/skills/wix-vibe-headless/references/blog/app/components/PostGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/blog/app/context/TaxonomyContext.jsx +35 -0
- package/skills/wix-vibe-headless/references/blog/app/hooks/usePostDetail.js +38 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/Blog.jsx +40 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +54 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +65 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +50 -0
- package/skills/wix-vibe-headless/references/blog/seed/SEED.md +103 -0
- package/skills/wix-vibe-headless/references/blog/seed/seed-blog.js +270 -0
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +256 -149
- package/skills/wix-vibe-headless/references/bookings/app/components/BookingForm.jsx +65 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +47 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceGrid.jsx +13 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/SlotPicker.jsx +126 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +108 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServices.js +58 -0
- package/skills/wix-vibe-headless/references/bookings/app/lib/serviceFacts.js +95 -0
- package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +94 -0
- package/skills/wix-vibe-headless/references/bookings/app/pages/Services.jsx +89 -0
- package/skills/wix-vibe-headless/references/bookings/{wix-bookings-checkout.js → app/rest/wix-bookings-checkout.js} +1 -1
- package/skills/wix-vibe-headless/references/bookings/{wix-bookings-services.js → app/rest/wix-bookings-services.js} +87 -11
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +117 -0
- package/skills/wix-vibe-headless/references/bookings/seed/seed-bookings.js +333 -0
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +168 -147
- package/skills/wix-vibe-headless/references/cms/app/collection.config.js +31 -0
- package/skills/wix-vibe-headless/references/cms/app/lib/wixImage.js +18 -0
- package/skills/wix-vibe-headless/references/cms/{wix-cms.js → app/rest/wix-cms.js} +47 -2
- package/skills/wix-vibe-headless/references/cms/seed/SEED.md +145 -0
- package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +223 -131
- package/skills/wix-vibe-headless/references/events/app/components/CategoryFilter.jsx +23 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +43 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventGrid.jsx +13 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventRegistration.jsx +29 -0
- package/skills/wix-vibe-headless/references/events/app/components/RsvpForm.jsx +57 -0
- package/skills/wix-vibe-headless/references/events/app/components/TicketPicker.jsx +78 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventDetail.js +27 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventsList.js +54 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useRsvpForm.js +40 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useTicketing.js +81 -0
- package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +48 -0
- package/skills/wix-vibe-headless/references/events/app/pages/Events.jsx +36 -0
- package/skills/wix-vibe-headless/references/events/{wix-events-browse.js → app/rest/wix-events-browse.js} +1 -1
- package/skills/wix-vibe-headless/references/events/seed/SEED.md +107 -0
- package/skills/wix-vibe-headless/references/events/seed/seed-events.js +251 -0
- package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +272 -188
- package/skills/wix-vibe-headless/references/members/app/components/LoginForm.jsx +101 -0
- package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +33 -0
- package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +21 -0
- package/skills/wix-vibe-headless/references/members/app/components/SocialButtons.jsx +29 -0
- package/skills/wix-vibe-headless/references/members/app/context/MemberContext.jsx +54 -0
- package/skills/wix-vibe-headless/references/members/app/hooks/useLoginForm.js +77 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Account.jsx +36 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Callback.jsx +32 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +35 -0
- package/skills/wix-vibe-headless/references/members/{wix-members-auth.js → app/rest/wix-members-auth.js} +6 -3
- package/skills/wix-vibe-headless/references/members/install/Register.jsx +22 -0
- package/skills/wix-vibe-headless/references/members/seed/SEED.md +22 -0
- package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +229 -104
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +31 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +39 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +29 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useCollectionProjects.js +35 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/usePortfolioGallery.js +27 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useProjectDetail.js +25 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +39 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/Portfolio.jsx +27 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +60 -0
- package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +94 -0
- package/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.js +236 -0
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +236 -117
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +35 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +48 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanGrid.jsx +16 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanPrice.jsx +35 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/useMyPlans.js +25 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlanDetail.js +28 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlans.js +30 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/MyPlans.jsx +30 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +53 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/Plans.jsx +28 -0
- package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +86 -0
- package/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.js +251 -0
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +244 -124
- package/skills/wix-vibe-headless/references/restaurants/app/components/ItemDialog.jsx +81 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuItemCard.jsx +71 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuList.jsx +43 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartButton.jsx +21 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +60 -0
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +63 -0
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useItemOrder.js +32 -0
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useReservation.js +73 -0
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Menu.jsx +28 -0
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Reservations.jsx +102 -0
- package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +180 -0
- package/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.js +452 -0
- package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +56 -0
- package/skills/wix-vibe-headless/references/shared/{wix-client.js → app/rest/wix-client.js} +6 -8
- package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +8 -0
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +259 -157
- package/skills/wix-vibe-headless/references/storefront/app/components/CartButton.jsx +20 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +150 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +167 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +51 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +54 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +119 -0
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +71 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +109 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +98 -0
- package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +27 -0
- package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +139 -0
- package/skills/wix-vibe-headless/references/storefront/app/pages/Shop.jsx +75 -0
- package/skills/wix-vibe-headless/references/storefront/{wix-store-cart.js → app/rest/wix-store-cart.js} +1 -1
- package/skills/wix-vibe-headless/references/storefront/{wix-store-catalog.js → app/rest/wix-store-catalog.js} +20 -1
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +111 -0
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +338 -0
- /package/skills/wix-vibe-headless/references/blog/{wix-blog.js → app/rest/wix-blog.js} +0 -0
- /package/skills/wix-vibe-headless/references/events/{wix-events-registration.js → app/rest/wix-events-registration.js} +0 -0
- /package/skills/wix-vibe-headless/references/portfolio/{wix-portfolio.js → app/rest/wix-portfolio.js} +0 -0
- /package/skills/wix-vibe-headless/references/pricing-plans/{wix-pricing-plans.js → app/rest/wix-pricing-plans.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-menu.js → app/rest/wix-restaurants-menu.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-ordering.js → app/rest/wix-restaurants-ordering.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-reservations.js → app/rest/wix-restaurants-reservations.js} +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Bookings Dashboard Navigation"
|
|
3
|
+
description: "Builds direct links to Wix Bookings dashboard pages on manage.wix.com — services list, edit a specific service, calendar, booking list, staff, availability, resources, and settings pages. Pairs each main Bookings entity with its read API so you can fetch an entity and hand back a 'view it in your dashboard' link. Use when the user asks where something is in the Wix dashboard, wants a direct link to a dashboard page, or you need a dashboard URL to include with the result of an API operation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Bookings Dashboard Navigation
|
|
7
|
+
|
|
8
|
+
Build direct links into the Wix Bookings pages of a site's dashboard. For the general URL contract (metaSiteId, fallbacks, redirects), see [Dashboard Navigation](../dashboard-navigation/dashboard-navigation.md).
|
|
9
|
+
|
|
10
|
+
All Wix Bookings (app ID `13d21c63-b5ec-5912-8397-c3a5ddb27a97`) pages live under:
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
https://manage.wix.com/dashboard/{metaSiteId}/bookings/{route}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Main Pages
|
|
17
|
+
|
|
18
|
+
| Page | URL after `/dashboard/{metaSiteId}/` | What it manages |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| Services list | `bookings/services` | All services (appointments, classes, courses) |
|
|
21
|
+
| Create service | `bookings/services/form` | New service form |
|
|
22
|
+
| Edit service | `bookings/services/form/{serviceId}` | A specific service |
|
|
23
|
+
| Service templates | `bookings/services/templates-catalog` | Create a service from a template |
|
|
24
|
+
| Calendar | `bookings/calendar` | Sessions and daily schedule |
|
|
25
|
+
| Booking list | `bookings/bookings/bookings-list` | All bookings in a table view |
|
|
26
|
+
| Staff list | `bookings/staff` | Staff members |
|
|
27
|
+
| Staff details | `bookings/staff/details/{staffMemberId}` | A specific staff member |
|
|
28
|
+
| Availability | `bookings/availability` | Staff working hours / availability management |
|
|
29
|
+
| Default business hours | `bookings/availability/default-hours` | The default weekly hours |
|
|
30
|
+
| Resources | `bookings/resource-management/resource-types` | Resource types (rooms, equipment) |
|
|
31
|
+
| Bookings settings | `bookings/settings` | Settings hub |
|
|
32
|
+
| Booking policies | `bookings/settings/policies` | Cancellation / booking policies |
|
|
33
|
+
| Reminders | `bookings/settings/reminders` | Email & SMS reminders |
|
|
34
|
+
| Booking form | `bookings/settings/booking-form-page` | The customer booking form |
|
|
35
|
+
| Apps & integrations | `bookings/integrations` | Bookings integration channels |
|
|
36
|
+
|
|
37
|
+
Entity-specific links (`{serviceId}`, `{staffMemberId}`) accept the entity's ID appended as an extra path segment. Query params can follow (e.g. `?referralInfo=...`).
|
|
38
|
+
|
|
39
|
+
Older link formats (`bookings/scheduler/owner/...`) still redirect to the current pages, so links found in existing content keep working.
|
|
40
|
+
|
|
41
|
+
## Pairing Entities with Their Read APIs
|
|
42
|
+
|
|
43
|
+
Fetch the entity via REST, then link the matching dashboard page. All calls use `https://www.wixapis.com` with an `Authorization` header.
|
|
44
|
+
|
|
45
|
+
| Entity | Read API | Dashboard link |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| Service | `POST /bookings/v2/services/query` · `GET /bookings/v2/services/{serviceId}` | `bookings/services/form/{serviceId}` (edit) or `bookings/services` (list) |
|
|
48
|
+
| Booking | `POST /bookings/v2/extended-bookings/query` | `bookings/bookings/bookings-list` |
|
|
49
|
+
| Staff member | `POST /bookings/v1/staff-members/query` | `bookings/staff/details/{staffMemberId}` |
|
|
50
|
+
| Session / event | `POST /calendar/v3/events/query` | `bookings/calendar` |
|
|
51
|
+
| Resource type | Resources v2 APIs (`/bookings/v2/resources/...`) | `bookings/resource-management/resource-types` |
|
|
52
|
+
| Booking policy | Services API `bookingPolicy` fields | `bookings/settings/policies` |
|
|
53
|
+
|
|
54
|
+
Example — after creating a service, hand back its edit link:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Created "Deep Tissue Massage".
|
|
58
|
+
Manage it here: https://manage.wix.com/dashboard/{metaSiteId}/bookings/services/form/{serviceId}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Notes
|
|
62
|
+
|
|
63
|
+
- Pages marked with an entity ID also work without it (they fall back to the list/create state).
|
|
@@ -27,9 +27,13 @@ Don't diagnose by default. If the owner just wants to know the status and the se
|
|
|
27
27
|
|
|
28
28
|
- Owner asks whether an **appointment-based** service has availability / bookable times → [Step 1](#step-1--report-the-current-availability-status).
|
|
29
29
|
- Owner reports the service has **no bookable times**, or that **customers can't book (or can't even find) it** → Step 1 will come back empty, so go on to diagnose ([Step 2](#step-2--rule-out-service-level-blockers-visibility--online-booking) onward). For "can't book / can't find," start diagnosis at Step 2 even if Step 1 returned slots — a hidden service still lists slots (see the note in Step 1).
|
|
30
|
+
- Owner **narrows to a specific date/time** ("why nothing on 3 Aug from 4pm?") and the slot check for that window comes back **empty** → this **is** a "why" question. Run the diagnosis (Step 2 → [Step 3](#step-3--run-the-diagnosis)). **Do not answer it from the empty slot list alone.**
|
|
30
31
|
|
|
31
32
|
> **Scope:** appointment-based services.
|
|
32
33
|
|
|
34
|
+
> ## 🚫 Never invent the cause (read first)
|
|
35
|
+
> An empty `ListAvailabilityTimeSlots` tells you **there is no availability — not *why*.** The reason for an empty result comes **only** from the checks in Steps 2–4 (`service.hidden` / `onlineBooking`, then `DiagnoseAvailability`, then policy/capacity). **Never state a cause you didn't get from them** — do not guess "the staff aren't scheduled," "it's outside working hours," a date-range problem, or anything else from a zero slot count. If you haven't run the diagnosis, you don't know the reason yet: run it, then report what it returns.
|
|
36
|
+
|
|
33
37
|
---
|
|
34
38
|
|
|
35
39
|
## Prerequisites
|
|
@@ -56,7 +60,7 @@ Interpret the result:
|
|
|
56
60
|
|-----------------|---------------------|------------|
|
|
57
61
|
| One or more **bookable** slots | **Bookable.** | Tell the owner in a sentence and stop — no diagnosis needed unless they ask why/how to change something. |
|
|
58
62
|
| Slots exist but **none are bookable** (`nonBookableReasons` / `bookingPolicyViolations` set) | **Not bookable — policy/capacity.** | This is the cause. Surface it directly ([policy/capacity causes](#booking-policy--capacity-slots-exist-but-arent-bookable)). No need to run `DiagnoseAvailability`. |
|
|
59
|
-
| **No slots at all** | **No availability.** | Diagnose: go to [Step 2](#step-2--rule-out-service-level-blockers-visibility--online-booking). |
|
|
63
|
+
| **No slots at all** | **No availability.** | Diagnose: go to [Step 2](#step-2--rule-out-service-level-blockers-visibility--online-booking), then [Step 3](#step-3--run-the-diagnosis). **Don't guess the reason from the empty list** — an empty result isn't a cause. |
|
|
60
64
|
|
|
61
65
|
> **The hidden-service trap.** A service that's **hidden** from the site, or has **online booking turned off**, can still list slots here — so bookable slots do **not** prove customers can book it. When the complaint is "customers can't book / can't find this service" (as opposed to "the calendar is empty"), **run [Step 2](#step-2--rule-out-service-level-blockers-visibility--online-booking) before trusting the slot count** — it's the single most common cause and neither `ListAvailabilityTimeSlots` nor `DiagnoseAvailability` detects it.
|
|
62
66
|
|
|
@@ -174,6 +178,7 @@ curl -X POST 'https://www.wixapis.com/_api/service-availability/v2/time-slots/di
|
|
|
174
178
|
| `RESOURCE_HAS_NO_WORKING_HOURS` | `CHECK_STAFF_WORKING_HOURS` | The staff member has no working-hours schedule. Configure working hours — see [Bookings Staff Setup](bookings-staff-setup.md). |
|
|
175
179
|
| `RESOURCE_NOT_AVAILABLE_AT_SERVICE_LOCATION` | `CHECK_WORK_LOCATIONS` | Assigned resources have availability windows, but none at a location the service offers. Add working hours at an offered location, offer the service where the staff works, or assign a provider who works at the offered location. |
|
|
176
180
|
| `NO_RESOURCE_AVAILABILITY_WINDOWS` | `CHECK_STAFF_WORKING_HOURS` | No availability windows exist anywhere in the diagnosed range. Add working hours, or widen the range. |
|
|
181
|
+
| `REQUESTED_DATE_OUTSIDE_SERVICE_AVAILABILITY_RANGE` | `CHECK_SERVICE_AVAILABILITY_RANGE` | The dates being checked fall **outside the date range the service itself is offered on** (its own availability window) — so no slots exist there, whatever the staff's hours. Covers both *before* the range starts and *after* it ends. Deterministic: returned on the **standard call** (no `deep` needed) and **ahead of** the working-hours/blocked reasons, so trust it over `RESOURCE_NOT_IN_WORKING_HOURS`. Fix: extend the service's available date range, or check dates within it. (The exact bounds aren't in `resolvedContext`; if you need to state the start date, read `service.schedule.firstSessionStart` via [Services V2 Get Service](#step-2--rule-out-service-level-blockers-visibility--online-booking).) |
|
|
177
182
|
| `REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE` | `CHECK_SERVICE_LOCATIONS` | A requested `locations` filter isn't offered by the service. Drop the filter or fix the service's locations. |
|
|
178
183
|
| `DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS` | `REDUCE_DURATION_OR_BUFFER` | The service is longer than every free window. Shorten it or lengthen working hours. |
|
|
179
184
|
| `BUFFER_TIME_ELIMINATES_WINDOWS` | `REDUCE_DURATION_OR_BUFFER` | Buffer time consumes all otherwise-free windows. Reduce the buffer or lengthen working hours. |
|
|
@@ -241,6 +246,7 @@ Whether you're reporting status or a cause, reply in plain, friendly language an
|
|
|
241
246
|
| Provider has no working hours | "The staff for this service don't have any working hours set, so there are no times to offer. Let's set their hours." |
|
|
242
247
|
| Provider works only at other locations | "Your staff have working hours, but not at the location(s) this service is offered at. We can either add hours at one of the service's locations, or offer the service where they already work." |
|
|
243
248
|
| No working-hours windows in range | "None of the staff for this service have working hours in the dates you're checking. Let's add or extend their hours — or try a different date range." |
|
|
249
|
+
| Dates outside the service's available range | "This service isn't offered on the dates you're looking at — it's only available during a set date range. Want me to extend the dates it's offered, or check a date inside that range?" |
|
|
244
250
|
| Outside working hours (deep) | "For those dates, your staff simply aren't scheduled to work, so there's nothing to offer. Let's add working hours in that period." |
|
|
245
251
|
| Within hours but blocked/busy (deep) | "Your staff are scheduled to work then, but that time is already taken up — by existing bookings or events on their calendar. Freeing some of it up will open slots." |
|
|
246
252
|
| Service too long / buffer too large | "The service is longer than any open gap in your staff's schedule (the duration plus buffer doesn't fit). Shortening it a bit, or widening working hours, would open up slots." |
|
|
@@ -269,6 +275,7 @@ Popular reasons a service shows no availability, and where each surfaces:
|
|
|
269
275
|
| Provider has no working hours | `RESOURCE_HAS_NO_WORKING_HOURS` | Configure working hours. |
|
|
270
276
|
| Provider works only at other locations | `RESOURCE_NOT_AVAILABLE_AT_SERVICE_LOCATION` | Align staff work locations with the service's offered locations. |
|
|
271
277
|
| No working-hours windows in range | `NO_RESOURCE_AVAILABILITY_WINDOWS` | Add working hours / widen the range. |
|
|
278
|
+
| Dates fall outside the service's own offered date range | `REQUESTED_DATE_OUTSIDE_SERVICE_AVAILABILITY_RANGE` | Extend the service's available date range, or check dates within it. |
|
|
272
279
|
| No windows — outside working hours (deep) | `RESOURCE_NOT_IN_WORKING_HOURS` (`deep: true`) | Add or extend working hours in the range. |
|
|
273
280
|
| No windows — within hours but blocked/busy (deep) | `RESOURCE_BLOCKED` (`deep: true`) | Free up blocked time / check the external calendar. |
|
|
274
281
|
| Service too long / buffer too large for the windows | `DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS`, `BUFFER_TIME_ELIMINATES_WINDOWS` | Shorten duration/buffer or lengthen hours. |
|
|
@@ -285,6 +292,8 @@ Popular reasons a service shows no availability, and where each surfaces:
|
|
|
285
292
|
- **`hasAvailability: false` + empty `reasons` ≠ a confirmed problem.** It means "no blocking cause detected." Always confirm with `ListAvailabilityTimeSlots`.
|
|
286
293
|
- **`DiagnoseAvailability` is ALPHA and feature-toggled.** If it returns nothing for an obviously broken service, the `diagnoseAvailabilityEndpoint` toggle may be off — fall back to Step 4.
|
|
287
294
|
- **A 403 is an auth problem, not a diagnosis.** The action needs the `bookings:availability:v2:time_slot:diagnose_availability` permission; a caller without it gets a 403 with an empty body. Don't read that as "no cause found" — confirm the caller has the permission (see [Prerequisites](#prerequisites)).
|
|
295
|
+
- **Never state a cause you didn't diagnose.** A zero slot count from `ListAvailabilityTimeSlots` means "no availability," not a reason. Guessing "the staff aren't scheduled to work" (or any other cause) from an empty list is the failure this recipe exists to prevent — run `DiagnoseAvailability` and report the code it returns. This applies especially when the owner narrows to a specific date/time and it comes back empty: that's a diagnosis trigger, not a status reply.
|
|
296
|
+
- **A date-range restriction is a distinct cause — don't blame staff hours for it.** When a service is only offered within a set date range and the owner asks about a date outside it, `DiagnoseAvailability` returns `REQUESTED_DATE_OUTSIDE_SERVICE_AVAILABILITY_RANGE` on the **standard call**, ahead of the deep working-hours/blocked reasons. If you see it, say the service isn't offered on those dates — **not** that staff aren't scheduled (they may well work then; the service just isn't offered). It covers dates both before and after the range.
|
|
288
297
|
- **`deep: true` needs a `serviceId`** (resource-only + `deep` → `MISSING_ARGUMENTS`) and only refines a "no windows" result — it does nothing when windows already exist.
|
|
289
298
|
- **`DiagnoseAvailability` ignores booking policy and capacity** — those come from `ListAvailabilityTimeSlots` (Step 1 / Step 4).
|
|
290
299
|
- **Resource-only diagnosis is lighter.** Passing `resourceId` without `serviceId` catches missing/empty working hours but skips the window, location, and deep checks, so it can return "inconclusive" for service-dependent problems. Valid when there's no service context (e.g. the staff editor); otherwise pair the resource with a service.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "CMS Dashboard Navigation"
|
|
3
|
+
description: "Builds direct links to the Wix CMS (Content Manager) dashboard pages on manage.wix.com — the collections list and a specific collection's items view. Pairs collections and data items with their read APIs so you can fetch data and hand back a 'view it in your dashboard' link. Use when the user asks where something is in the Wix dashboard, wants a direct link to a dashboard page, or you need a dashboard URL to include with the result of an API operation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CMS Dashboard Navigation
|
|
7
|
+
|
|
8
|
+
Build direct links into the CMS (Content Manager) pages of a site's dashboard. For the general URL contract (metaSiteId, fallbacks, redirects), see [Dashboard Navigation](../dashboard-navigation/dashboard-navigation.md).
|
|
9
|
+
|
|
10
|
+
All CMS (app ID `e593b0bd-b783-45b8-97c2-873d42aacaf4`) pages live under:
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
https://manage.wix.com/dashboard/{metaSiteId}/wix-cms/{route}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Main Pages
|
|
17
|
+
|
|
18
|
+
| Page | URL after `/dashboard/{metaSiteId}/` | What it manages |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| Collections list | `wix-cms` | All CMS collections on the site |
|
|
21
|
+
| Collection items | `wix-cms/data/{collectionId}` | A specific collection's items table |
|
|
22
|
+
|
|
23
|
+
Older links (`database`, `developer-tools/database`) redirect to `wix-cms`. `{collectionId}` is the collection's ID (e.g. `Stores/Products` for app collections, or the ID you set when creating the collection).
|
|
24
|
+
|
|
25
|
+
## Pairing Entities with Their Read APIs
|
|
26
|
+
|
|
27
|
+
Fetch the entity via REST, then link the matching dashboard page. All calls use `https://www.wixapis.com` with an `Authorization` header.
|
|
28
|
+
|
|
29
|
+
| Entity | Read API | Dashboard link |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| Collection (schema) | `GET /wix-data/v2/collections/{collectionId}` · `GET /wix-data/v2/collections` (list) | `wix-cms/data/{collectionId}` |
|
|
32
|
+
| Data item | `POST /wix-data/v2/items/query` (body includes `dataCollectionId`) · `GET /wix-data/v2/items/{itemId}?dataCollectionId=...` | `wix-cms/data/{collectionId}` (the collection's items table) |
|
|
33
|
+
|
|
34
|
+
Example — after creating a collection and inserting items:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Created the "Recipes" collection with 12 items.
|
|
38
|
+
Manage it here: https://manage.wix.com/dashboard/{metaSiteId}/wix-cms/data/Recipes
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Notes
|
|
42
|
+
|
|
43
|
+
- There is no per-item dashboard URL; link the collection's items table.
|
|
44
|
+
- Unknown deeper paths fall back to the longest matching route, so a wrong collection ID lands on the CMS home rather than a 404.
|
|
@@ -25,11 +25,13 @@ This recipe covers basic Create, Read, Update, Delete (CRUD) operations for Wix
|
|
|
25
25
|
Before inserting or updating items, you need to know the collection's field names and types. If you don't already know the schema:
|
|
26
26
|
|
|
27
27
|
1. **Query existing items** - Fetch a few items to infer field names from the data
|
|
28
|
-
2. **Get collection schema** - Use `GET /collections/{dataCollectionId}` for full field definitions
|
|
29
|
-
3. **List collections** - Use `GET /collections?fields=displayName` to see what collections exist (see [Schema Management](cms-schema-management.md))
|
|
28
|
+
2. **Get collection schema** - Use `GET /collections/{dataCollectionId}` for full field definitions, **including `plugins`** — don't omit the `plugins` field when fetching or listing schemas
|
|
29
|
+
3. **List collections** - Use `GET /collections?fields=displayName,plugins` to see what collections exist (see [Schema Management](cms-schema-management.md))
|
|
30
30
|
|
|
31
31
|
It may be, that user refers to schema by its `displayName` rather than `id`, if collection is not found list all collections to find the right `id` (`dataCollectionId`) to use.
|
|
32
32
|
|
|
33
|
+
**Check for the Draft Items plugin.** If the collection's `plugins` include the Draft Items plugin, this collection gates items behind a draft/publish workflow. **Stop and load [CMS Draft & Publish Workflow](cms-publishing-flow.md)** before making any data changes, and follow its instructions instead of the plain CRUD flow below for that collection.
|
|
34
|
+
|
|
33
35
|
---
|
|
34
36
|
|
|
35
37
|
## Insert Data Item
|
|
@@ -367,7 +369,7 @@ curl -X DELETE \
|
|
|
367
369
|
| `IMAGE` | Image reference (HTTP url or wix:image://v1/{mediaId}/{friendlyName}) | `"wix:image://v1/3f72369f2219e2ee853e9e3df0217ce1.jpg/Colorful%20Business%20Cards.jpg"` |
|
|
368
370
|
| `VIDEO` | Video reference (HTTP url or wix:video://v1/{mediaId}/{friendlyName}) | `"wix:video://v1/11062b_484182533ede4b9a81329daf20238867/Sketching%20Design%20Concepts#posterUri=11062b_484182533ede4b9a81329daf20238867f000.jpg&posterWidth=1920&posterHeight=1080"` |
|
|
369
371
|
| `DOCUMENT` | Document reference (HTTP url or wix:document://v1/{mediaId}) | `"wix:document://v1/..."` |
|
|
370
|
-
| `MEDIA_IMAGE` | Wix Media Image | `{ "url": "http://...", "height": 640, "width": 480, "
|
|
372
|
+
| `MEDIA_IMAGE` | Wix Media Image | `{ "id": "<mediaId>", "url": "http://...", "height": 640, "width": 480, "altText": "Picture" }` |
|
|
371
373
|
| `MEDIA_VECTOR_ART` | Wix Media Vector Art | `{ "uri": "wix:vector://v1/...", "viewBox": "0 0 100 100", "contentType": "shape", "svgContent": "<svg>...</svg>" }` |
|
|
372
374
|
| `URL` | Web URL | `"https://example.com"` |
|
|
373
375
|
| `RICH_TEXT` | HTML content | `"<p>Rich text</p>"` |
|
|
@@ -429,6 +431,31 @@ curl -X DELETE \
|
|
|
429
431
|
|
|
430
432
|
## Error Handling
|
|
431
433
|
|
|
434
|
+
### Recovering from WDE0110
|
|
435
|
+
|
|
436
|
+
`WDE0110` means the Wix CMS (Wix Data) app is not installed on the site. If the user has
|
|
437
|
+
explicitly asked to install it, install the app before retrying the data-item request:
|
|
438
|
+
|
|
439
|
+
```http
|
|
440
|
+
POST https://www.wixapis.com/apps-installer-service/v1/app-instance/install
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
```json
|
|
444
|
+
{
|
|
445
|
+
"tenant": {
|
|
446
|
+
"tenantType": "SITE",
|
|
447
|
+
"id": "<SITE_ID>"
|
|
448
|
+
},
|
|
449
|
+
"appInstance": {
|
|
450
|
+
"appDefId": "e593b0bd-b783-45b8-97c2-873d42aacaf4"
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
After the installation succeeds, retry the original `POST /wix-data/v2/items` request. If the
|
|
456
|
+
user only asks what the error means or how to fix it, explain this installation step and ask for
|
|
457
|
+
confirmation before performing the install.
|
|
458
|
+
|
|
432
459
|
| Error | Cause | Solution |
|
|
433
460
|
|-------|-------|----------|
|
|
434
461
|
| `COLLECTION_NOT_FOUND` | Invalid collection ID | Check collection exists |
|
|
@@ -449,3 +476,4 @@ curl -X DELETE \
|
|
|
449
476
|
- [CMS Schema Management](cms-schema-management.md) - Creating and modifying collections
|
|
450
477
|
- [CMS References & Relationships](cms-references-and-relationships.md) - Linking collections
|
|
451
478
|
- [CMS Data Operations Extended](cms-data-operations-extended.md) - Count, upsert, aggregate
|
|
479
|
+
- [CMS Draft & Publish Workflow](cms-publishing-flow.md) - Collections gated behind a draft/publish (Draft Items plugin) workflow
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "CMS Draft & Publish Workflow (Draft Items plugin)"
|
|
3
|
+
description: "Interact with CMS collections that gate their items behind a draft/publish workflow via the Draft Items plugin. Covers detecting the plugin, locating the paired drafts collection, reading published vs draft items, authoring/editing drafts, and publishing, unpublishing, reverting, and deleting items. Key endpoints: /wix-data/v2/items/publish-draft, /wix-data/v2/items/unpublish, /wix-data/v2/collections/add-draft-items-plugin, and the paired drafts collection referenced by draftItemsPluginOptions.draftsCollectionId."
|
|
4
|
+
---
|
|
5
|
+
# CMS Draft & Publish Workflow
|
|
6
|
+
|
|
7
|
+
> **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`.
|
|
8
|
+
|
|
9
|
+
Some CMS collections gate their items behind a **draft/publish workflow** instead of writing straight to the live site. Such a collection has the **Draft Items plugin** installed. Each item is in one of three states — **DRAFT**, **PUBLISHED**, or **CHANGED** (a published item with a pending draft edit) — and edits are staged as drafts until explicitly published.
|
|
10
|
+
|
|
11
|
+
This reference is for an agent that must **detect** whether a collection uses this workflow, **read** the right version of an item, and **drive item state transitions** (publish, unpublish, revert, delete) through the public Wix Data REST API.
|
|
12
|
+
|
|
13
|
+
## Prerequisites
|
|
14
|
+
|
|
15
|
+
1. Wix CMS enabled on the site.
|
|
16
|
+
2. The collection already exists (see [CMS Schema Management](cms-schema-management.md)).
|
|
17
|
+
3. API access with write permission on the collection's data items (reading, authoring drafts, and publishing all go through the Data Items API), plus collection-management permission to add or remove the Draft Items plugin.
|
|
18
|
+
|
|
19
|
+
## Required APIs
|
|
20
|
+
|
|
21
|
+
- **Data Items API**: [REST](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/introduction) — includes Publish Data Item Draft and Unpublish Data Item.
|
|
22
|
+
- **Data Collections API**: [REST](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction) — Add/Delete Data Collection Plugin.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Mental model — where drafts live
|
|
27
|
+
|
|
28
|
+
A collection with the Draft Items plugin has **two paired surfaces**:
|
|
29
|
+
|
|
30
|
+
| Surface | Collection ID | Holds |
|
|
31
|
+
|---------|---------------|-------|
|
|
32
|
+
| Published (live) | the collection's own id (e.g. `articles`) | Items visible on the site |
|
|
33
|
+
| Paired drafts | `draftItemsPluginOptions.draftsCollectionId` (conventionally `<collectionId>__drafts`, e.g. `articles__drafts`) | Pending drafts (new items not yet published, or edits to a published item) |
|
|
34
|
+
|
|
35
|
+
**Read the drafts collection id from the plugin — do not assume the `__drafts` suffix.** The published collection's Draft Items plugin exposes `draftItemsPluginOptions.draftsCollectionId`; the drafts collection's plugin exposes `draftItemsPluginOptions.publishedCollectionId`. Resolve the pairing from those fields.
|
|
36
|
+
|
|
37
|
+
Item **state** is derived from where the item exists:
|
|
38
|
+
|
|
39
|
+
| State | Meaning | Where it lives |
|
|
40
|
+
|-------|---------|----------------|
|
|
41
|
+
| **DRAFT** | Not yet on the site | Only in the drafts collection |
|
|
42
|
+
| **PUBLISHED** | Live on the site, no pending edit | Only in the published collection |
|
|
43
|
+
| **CHANGED** | Live on the site **and** has a pending draft edit | In both the published and drafts collections |
|
|
44
|
+
|
|
45
|
+
> Treat state as **server-authoritative**. Derive it from the published/draft surfaces (or the item the API returns) — never render an optimistic status before the write confirms.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 1. Detect the workflow on a collection
|
|
50
|
+
|
|
51
|
+
Read the collection and inspect its **plugins**. A collection with the **Draft Items plugin** uses the draft/publish workflow.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
curl -X GET \
|
|
55
|
+
'https://www.wixapis.com/wix-data/v2/collections/articles' \
|
|
56
|
+
-H 'Authorization: <AUTH>'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- **Draft Items plugin present** → the collection gates items behind draft/publish. Its `draftItemsPluginOptions.draftsCollectionId` gives the paired drafts collection to author and edit drafts against.
|
|
60
|
+
- **Draft Items plugin absent** → plain collection; every insert/update goes straight live. No draft surface exists.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 2. Read items
|
|
65
|
+
|
|
66
|
+
Reads target a specific surface — there is no merged view:
|
|
67
|
+
|
|
68
|
+
- **Published items**: query the published collection (`articles`).
|
|
69
|
+
- **Drafts**: query the drafts collection resolved from `draftItemsPluginOptions.draftsCollectionId` (e.g. `articles__drafts`).
|
|
70
|
+
|
|
71
|
+
**Endpoint**: `POST /wix-data/v2/items/query`
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"dataCollectionId": "articles__drafts",
|
|
76
|
+
"query": {
|
|
77
|
+
"filter": { "category": "news" },
|
|
78
|
+
"paging": { "limit": 50, "offset": 0 }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- To read only **published** items, query with `dataCollectionId: "articles"`.
|
|
84
|
+
- To read **drafts**, query with `dataCollectionId` set to the paired drafts collection id.
|
|
85
|
+
- Compute **CHANGED** by checking whether an item id exists in **both** the published and drafts surfaces.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 3. Write & transition items
|
|
90
|
+
|
|
91
|
+
### Author a brand-new draft
|
|
92
|
+
|
|
93
|
+
Insert into the **drafts** collection. The item starts as **DRAFT**.
|
|
94
|
+
|
|
95
|
+
**Endpoint**: `POST /wix-data/v2/items`
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"dataCollectionId": "articles__drafts",
|
|
100
|
+
"dataItem": {
|
|
101
|
+
"data": { "title": "Draft headline", "body": "Work in progress" }
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Edit a draft
|
|
107
|
+
|
|
108
|
+
Update or patch against the **drafts** collection (`articles__drafts`). See [CMS Data Items CRUD](cms-data-items-crud.md) for Update/Patch shapes.
|
|
109
|
+
|
|
110
|
+
### Edit a PUBLISHED item → produces CHANGED
|
|
111
|
+
|
|
112
|
+
Editing a live item does **not** overwrite the live copy — it stages a **pending draft**, leaving the published version untouched until published. The live item then has a pending draft (state **CHANGED**).
|
|
113
|
+
|
|
114
|
+
**Create the draft first, then edit it.** To edit a published item, explicitly create the draft via the **create-draft** flow (`createDataItemDraft`) rather than relying on an implicit draft-on-update. Create-draft seeds a full draft copy of the currently-published item into the drafts collection under the same item id; you then apply your edits to that draft. This is the more reliable path — a bare partial update straight to the drafts collection risks producing a draft that is missing the fields you didn't touch. So: create-draft for the published item id, then Update/Patch that draft on the drafts collection (`articles__drafts`).
|
|
115
|
+
|
|
116
|
+
### Publish a pending draft (DRAFT/CHANGED → PUBLISHED)
|
|
117
|
+
|
|
118
|
+
Replaces the published item's data with the draft's content; the draft is then deleted. Pass the **published** collection id.
|
|
119
|
+
|
|
120
|
+
**Endpoint**: `POST /wix-data/v2/items/publish-draft`
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
curl -X POST \
|
|
124
|
+
'https://www.wixapis.com/wix-data/v2/items/publish-draft' \
|
|
125
|
+
-H 'Content-Type: application/json' \
|
|
126
|
+
-H 'Authorization: <AUTH>' \
|
|
127
|
+
-d '{
|
|
128
|
+
"dataCollectionId": "articles",
|
|
129
|
+
"dataItemId": "5331fc15-9441-4fd4-bc7b-7f6870c69228"
|
|
130
|
+
}'
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Response** — the newly-published item (the draft is gone):
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"dataItem": {
|
|
137
|
+
"id": "5331fc15-9441-4fd4-bc7b-7f6870c69228",
|
|
138
|
+
"dataCollectionId": "articles",
|
|
139
|
+
"data": { "_id": "5331fc15-...", "title": "Draft headline" }
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
- Returns `NOT_FOUND` if no pending draft exists for that id.
|
|
145
|
+
|
|
146
|
+
### Unpublish a live item (PUBLISHED/CHANGED → DRAFT)
|
|
147
|
+
|
|
148
|
+
Retracts a published item back to draft state. Pass the **published** collection id.
|
|
149
|
+
|
|
150
|
+
**Endpoint**: `POST /wix-data/v2/items/unpublish`
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
curl -X POST \
|
|
154
|
+
'https://www.wixapis.com/wix-data/v2/items/unpublish' \
|
|
155
|
+
-H 'Content-Type: application/json' \
|
|
156
|
+
-H 'Authorization: <AUTH>' \
|
|
157
|
+
-d '{
|
|
158
|
+
"dataCollectionId": "articles",
|
|
159
|
+
"dataItemId": "5331fc15-9441-4fd4-bc7b-7f6870c69228",
|
|
160
|
+
"copyToDraft": true
|
|
161
|
+
}'
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
`copyToDraft` controls the two "keep vs discard" variants:
|
|
165
|
+
|
|
166
|
+
| `copyToDraft` | Behavior | Use for |
|
|
167
|
+
|---------------|----------|---------|
|
|
168
|
+
| `true` (default) | Removes the live copy, creates a draft seeded with the previously-published data. Any existing pending draft for that id is **overwritten**. | "Unpublish and keep changes" |
|
|
169
|
+
| `false` | Removes the live copy **without** creating a draft. No `dataItem` returned. | "Unpublish and discard" |
|
|
170
|
+
|
|
171
|
+
- Response (`copyToDraft: true`) carries the **new draft**, not the removed live item.
|
|
172
|
+
- Returns `NOT_FOUND` if no published item exists with that id.
|
|
173
|
+
|
|
174
|
+
### Revert to live version (CHANGED → PUBLISHED, discard the pending edit)
|
|
175
|
+
|
|
176
|
+
Discard the pending draft while keeping the live version as-is: **delete the item from the drafts collection**.
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
curl -X DELETE \
|
|
180
|
+
'https://www.wixapis.com/wix-data/v2/items/5331fc15-...?dataCollectionId=articles__drafts' \
|
|
181
|
+
-H 'Authorization: <AUTH>'
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Delete an item entirely (removes both versions)
|
|
185
|
+
|
|
186
|
+
Deleting must remove **both** the live item and any pending draft.
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# live version
|
|
190
|
+
curl -X DELETE 'https://www.wixapis.com/wix-data/v2/items/<id>?dataCollectionId=articles' -H 'Authorization: <AUTH>'
|
|
191
|
+
# drafts collection, if a draft exists
|
|
192
|
+
curl -X DELETE 'https://www.wixapis.com/wix-data/v2/items/<id>?dataCollectionId=articles__drafts' -H 'Authorization: <AUTH>'
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## 4. Enable / disable the workflow on a collection
|
|
198
|
+
|
|
199
|
+
**Enable** — add the Draft Items plugin (requires collection-management permission). Use the dedicated endpoint; the Draft Items plugin cannot be added through the generic add-plugin call.
|
|
200
|
+
|
|
201
|
+
**Endpoint**: `POST /wix-data/v2/collections/add-draft-items-plugin`
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
curl -X POST 'https://www.wixapis.com/wix-data/v2/collections/add-draft-items-plugin' \
|
|
205
|
+
-H 'Content-Type: application/json' \
|
|
206
|
+
-H 'Authorization: <AUTH>' \
|
|
207
|
+
-d '{
|
|
208
|
+
"dataCollectionId": "articles",
|
|
209
|
+
"publishPluginConflictAction": "FAIL_WHEN_PUBLISH_INSTALLED"
|
|
210
|
+
}'
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
`publishPluginConflictAction` controls what happens if the legacy Publish plugin is already installed:
|
|
214
|
+
|
|
215
|
+
| Value | Behavior |
|
|
216
|
+
|-------|----------|
|
|
217
|
+
| `FAIL_WHEN_PUBLISH_INSTALLED` | Fail if the Publish plugin is already installed. |
|
|
218
|
+
| `COPY_DRAFT_ITEMS_WITH_DRAFT_STATUS` | Copy draft items with draft status; where a published version already exists, discard the draft item. |
|
|
219
|
+
|
|
220
|
+
**Disable** — remove the plugin:
|
|
221
|
+
|
|
222
|
+
**Endpoint**: `POST /wix-data/v2/collections/delete-draft-items-plugin`
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
curl -X POST 'https://www.wixapis.com/wix-data/v2/collections/delete-draft-items-plugin' \
|
|
226
|
+
-H 'Content-Type: application/json' \
|
|
227
|
+
-H 'Authorization: <AUTH>' \
|
|
228
|
+
-d '{
|
|
229
|
+
"dataCollectionId": "articles",
|
|
230
|
+
"draftItemsRemovalAction": "FAIL_IF_DRAFT_ITEMS_EXIST"
|
|
231
|
+
}'
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
`draftItemsRemovalAction` decides the fate of existing drafts:
|
|
235
|
+
|
|
236
|
+
| Value | Behavior |
|
|
237
|
+
|-------|----------|
|
|
238
|
+
| `FAIL_IF_DRAFT_ITEMS_EXIST` | Fail if any draft items exist. |
|
|
239
|
+
| `DISCARD_EXISTING_DRAFT_ITEMS` | Discard draft items (data loss). |
|
|
240
|
+
| `PUBLISH_EXISTING_DRAFT_ITEMS` | Publish draft items, overwriting any currently published items with the same ids. |
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Permissions
|
|
245
|
+
|
|
246
|
+
At the REST level, every read/author/publish/unpublish call here goes through the Data Items API and requires write access to the collection's data items. Beyond that, individual draft and publish actions may be further permission-restricted per caller on the collection, and there's no way to introspect those permissions ahead of time — so attempt the action and **handle authorization errors gracefully** if the write is rejected.
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Decision table — collection + desired action → API + permission
|
|
251
|
+
|
|
252
|
+
| Collection state | Desired action | API call | Permission needed |
|
|
253
|
+
|------------------|----------------|----------|-------------------|
|
|
254
|
+
| Draft Items plugin absent | Any write | Normal insert/update — writes go live immediately | Write Data Items |
|
|
255
|
+
| Draft Items enabled | Detect workflow | `GET /collections/{id}` → inspect plugins for the Draft Items plugin; read `draftItemsPluginOptions.draftsCollectionId` | (read) |
|
|
256
|
+
| Draft Items enabled | Read published items | `POST /items/query` on the published id | read |
|
|
257
|
+
| Draft Items enabled | Read drafts | `POST /items/query` on the drafts collection id | read |
|
|
258
|
+
| PUBLISHED | Edit into a pending draft (→ CHANGED) | Create the draft (`createDataItemDraft`), then edit it on the drafts collection | Write Data Items |
|
|
259
|
+
| — | Create new draft (→ DRAFT) | `POST /items` on the drafts collection | Write Data Items |
|
|
260
|
+
| DRAFT / CHANGED | Publish (→ PUBLISHED) | `POST /items/publish-draft` (published id) | Write Data Items |
|
|
261
|
+
| PUBLISHED / CHANGED | Unpublish, keep as draft (→ DRAFT) | `POST /items/unpublish` `copyToDraft:true` | Write Data Items |
|
|
262
|
+
| PUBLISHED / CHANGED | Unpublish, discard | `POST /items/unpublish` `copyToDraft:false` | Write Data Items |
|
|
263
|
+
| CHANGED | Revert to live version (discard edit) | `DELETE /items/{id}?dataCollectionId=<drafts id>` | Write Data Items |
|
|
264
|
+
| any | Delete entirely (both versions) | Delete on the published id (+ drafts id if a draft exists) | Write Data Items |
|
|
265
|
+
| plain, no plugin | Enable workflow | `POST /collections/add-draft-items-plugin` | Manage Data Collections |
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Agent gotchas
|
|
270
|
+
|
|
271
|
+
- **Resolve the drafts collection from the plugin.** Read `draftItemsPluginOptions.draftsCollectionId` off the published collection's Draft Items plugin rather than assuming a `__drafts` suffix.
|
|
272
|
+
- **Status is server-authoritative.** Derive DRAFT/PUBLISHED/CHANGED from the published + drafts surfaces (or the value the API returns). Never compute it locally, and never render an optimistic status before the write confirms (**confirm-then-render**).
|
|
273
|
+
- **Pass the *published* collection id** to `publish-draft` and `unpublish` — not the drafts collection id. Author and edit drafts against the drafts collection id.
|
|
274
|
+
- **Publishing deletes the draft.** After `publish-draft`, the pending draft no longer exists; the returned item is the live one.
|
|
275
|
+
- **Unpublish overwrites an existing draft** when `copyToDraft: true` — any pending edit for that id is replaced with the previously-published data.
|
|
276
|
+
- **Refetch after publish/unpublish.** State changes across the published/draft surfaces are not guaranteed atomic; re-query rather than assuming local state. Wix Data is eventually consistent — use `consistentRead: true` if you must read immediately after a write.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Related Documentation
|
|
281
|
+
|
|
282
|
+
- [Publish Data Item Draft](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/publish-data-item-draft)
|
|
283
|
+
- [Unpublish Data Item](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/unpublish-data-item)
|
|
284
|
+
- [Data Collections API](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction) — plugin management
|
|
285
|
+
- [CMS Data Items CRUD](cms-data-items-crud.md) — insert/update/patch/delete/query shapes
|
|
286
|
+
- [CMS Schema Management](cms-schema-management.md) — creating and modifying collections
|
|
287
|
+
- [Wix Data and Eventual Consistency](https://dev.wix.com/docs/api-reference/business-solutions/cms/eventual-consistency)
|
|
@@ -112,6 +112,31 @@ curl -X GET \
|
|
|
112
112
|
}
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
+
This works for `displayName`/`displayField`. **Permission updates currently fail with `WDE0075: Not recognized role provided in permissions.`** Use the full-replace endpoint below to update a collection's permissions.
|
|
116
|
+
|
|
117
|
+
**To change permissions on an existing collection, use the full-replace endpoint instead** (`UpdateDataCollection`, not `PatchDataCollection`) — it requires the collection's current `revision` and full `fields` array (get both from a `GET` first), but it does work:
|
|
118
|
+
|
|
119
|
+
**Endpoint**: `PUT /wix-data/v2/collections`
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"collection": {
|
|
124
|
+
"id": "Products",
|
|
125
|
+
"revision": "3",
|
|
126
|
+
"displayName": "Product Catalog",
|
|
127
|
+
"fields": [ /* the collection's full current non-system fields, from GET */ ],
|
|
128
|
+
"permissions": {
|
|
129
|
+
"insert": "ADMIN",
|
|
130
|
+
"update": "ADMIN",
|
|
131
|
+
"remove": "ADMIN",
|
|
132
|
+
"read": "SITE_MEMBER"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Don't delete and recreate a collection just to change its permissions — this full-replace call is the working path.
|
|
139
|
+
|
|
115
140
|
## Field Types Reference
|
|
116
141
|
|
|
117
142
|
| Type | Description | Example Value |
|
|
@@ -122,7 +147,7 @@ curl -X GET \
|
|
|
122
147
|
| `DATE` | Date only | `"2024-01-15"` |
|
|
123
148
|
| `DATETIME` | Date and time | `{ "$date": "2024-01-15T10:00:00.000Z" }` |
|
|
124
149
|
| `IMAGE` | Image reference | `"wix:image://v1/..."` |
|
|
125
|
-
| `MEDIA_IMAGE` | Wix Media Image | `{ "url": "http://...", "height": 640, "width": 480, "
|
|
150
|
+
| `MEDIA_IMAGE` | Wix Media Image | `{ "id": "<mediaId>", "url": "http://...", "height": 640, "width": 480, "altText": "Picture" }` |
|
|
126
151
|
| `MEDIA_VECTOR_ART` | Wix Media Vector Art | `{ "uri": "wix:vector://v1/...", "viewBox": "0 0 100 100", "contentType": "shape", "svgContent": "<svg>...</svg>" }` |
|
|
127
152
|
| `URL` | Web URL | `"https://example.com"` |
|
|
128
153
|
| `RICH_TEXT` | HTML content | `"<p>Rich text</p>"` |
|
|
@@ -138,6 +163,7 @@ curl -X GET \
|
|
|
138
163
|
| `ANYONE` | All visitors (including anonymous) |
|
|
139
164
|
| `SITE_MEMBER` | Logged-in site members |
|
|
140
165
|
| `SITE_MEMBER_AUTHOR` | Members who created the item |
|
|
166
|
+
| `PRIVILEGED` | Access to collection is controlled per role |
|
|
141
167
|
| `ADMIN` | Site admins only |
|
|
142
168
|
|
|
143
169
|
## Error Handling
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Contacts Dashboard Navigation"
|
|
3
|
+
description: "Builds direct links to Wix Contacts (CRM) dashboard pages on manage.wix.com — the contacts list, a specific contact's view page, contact import, and the segments page. Pairs each main contacts entity with its read API so you can fetch an entity and hand back a 'view it in your dashboard' link. Use when the user asks where something is in the Wix dashboard, wants a direct link to a dashboard page, or you need a dashboard URL to include with the result of an API operation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Contacts Dashboard Navigation
|
|
7
|
+
|
|
8
|
+
Build direct links into the contacts (CRM) pages of a site's dashboard. For the general URL contract (metaSiteId, fallbacks, redirects), see [Dashboard Navigation](../dashboard-navigation/dashboard-navigation.md).
|
|
9
|
+
|
|
10
|
+
Contacts pages are split across **two apps** with two URL namespaces:
|
|
11
|
+
|
|
12
|
+
- **Contacts** (`74bff718-5977-47f2-9e5f-a9fd0047fd1f`) — the contact list, contact view, and import. Routes under `contacts/`.
|
|
13
|
+
- **Segments** (`ee070097-0850-4f23-ad8c-3cdd4efd5244`) — contact segments. Routes under `segments/`.
|
|
14
|
+
|
|
15
|
+
## Contacts Pages
|
|
16
|
+
|
|
17
|
+
| Page | URL after `/dashboard/{metaSiteId}/` | What it manages |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| Contacts list | `contacts` | All contacts (filter, label, search) |
|
|
20
|
+
| Contact view | `contacts/view/{contactId}` | A specific contact's details and activity |
|
|
21
|
+
| Import contacts | `contacts/contacts/import` | Import contacts (CSV, Gmail) |
|
|
22
|
+
|
|
23
|
+
Older `contacts/import` links redirect to the current import route.
|
|
24
|
+
|
|
25
|
+
## Segments Pages
|
|
26
|
+
|
|
27
|
+
| Page | URL after `/dashboard/{metaSiteId}/` | What it manages |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| Segments | `segments` | Contact segments (saved smart filters over contacts) |
|
|
30
|
+
|
|
31
|
+
## Pairing Entities with Their Read APIs
|
|
32
|
+
|
|
33
|
+
Fetch the entity via REST, then link the matching dashboard page. All calls use `https://www.wixapis.com` with an `Authorization` header.
|
|
34
|
+
|
|
35
|
+
| Entity | Read API | Dashboard link |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| Contact | `POST /contacts/v4/contacts/query` · `GET /contacts/v4/contacts/{id}` | `contacts/view/{contactId}` (view) or `contacts` (list) |
|
|
38
|
+
| Label | `GET /contacts/v4/labels` · `POST /contacts/v4/labels/query` | `contacts` (labels filter the contacts list) |
|
|
39
|
+
| Segment | Segments API (no public REST read endpoint) | `segments` |
|
|
40
|
+
|
|
41
|
+
Example — after creating a contact, hand back its view link:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Created contact "Dana Cohen".
|
|
45
|
+
View them here: https://manage.wix.com/dashboard/{metaSiteId}/contacts/view/{contactId}
|
|
46
|
+
```
|