@wix/himalaya-cli 0.1583.0 → 0.1585.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/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +7 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/bindings.d.ts +7 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/extensions.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/comments-v1/src/extensions.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/index.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/groups/src/extensions.d.ts +15 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/loyalty/src/extensions.d.ts +13 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +19 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +8 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +4 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-groups.mjs +5 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-loyalty.mjs +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +10 -3
- package/dist/cli.mjs +2201 -1716
- package/dist/preview-assets.generated.bin +0 -0
- package/fixtures/wix-canned.json +25 -0
- package/guides/branded-lite-site-binding.md +7 -1
- package/guides/designing-himi-screens.md +47 -7
- package/guides/himi-skill.md +16 -0
- package/guides/index.json +1 -0
- package/guides/one-app-to-himi-app.md +52 -1
- package/guides/sdk-reference.json +37 -9
- package/guides/tier-5-add-a-screen.md +9 -0
- package/guides/wix-api-usage.md +9 -0
- package/package.json +2 -2
- package/templates/beauty-salon/config.ts +7 -0
- package/templates/beauty-salon/dev/index.ts +758 -352
- package/templates/beauty-salon/himalaya.content.json +3 -0
- package/templates/beauty-salon/tier5-src/_shared/branded-lite-hosted.ts +1 -1
- package/templates/beauty-salon/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/beauty-salon/tier5-src/_shared/himi-restaurants.ts +2 -1
- package/templates/beauty-salon/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/beauty-salon/tier5-src/_shared/store-product-info.ts +50 -0
- package/templates/beauty-salon/tier5-src/himi-blog-post/index.ts +21 -8
- package/templates/beauty-salon/tier5-src/himi-branded-lite-category/index.ts +3 -2
- package/templates/beauty-salon/tier5-src/himi-branded-lite-notifsettings/index.ts +173 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-plans/index.ts +2 -1
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +14 -3
- package/templates/beauty-salon/tier5-src/wix-spaces-plan-detail/index.ts +2 -1
- package/templates/beauty-salon/tier5-src/wix-spaces-whats-new/index.ts +2 -1
- package/templates/beauty-salon-owner/dev/index.ts +129 -66
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post/index.ts +7 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-product/index.ts +39 -6
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-product-form/index.ts +14 -8
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-products/index.ts +7 -4
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-service/index.ts +38 -7
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-service-form/index.ts +53 -7
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-services/index.ts +4 -2
- package/templates/branded-lite/config.ts +9 -0
- package/templates/branded-lite/dev/index.ts +4988 -3304
- package/templates/branded-lite/himalaya.content.json +3 -0
- package/templates/branded-lite/tier5-src/_shared/branded-lite-hosted.ts +1 -1
- package/templates/branded-lite/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/branded-lite/tier5-src/_shared/event-registration.ts +86 -0
- package/templates/branded-lite/tier5-src/_shared/himi-restaurants.ts +2 -1
- package/templates/branded-lite/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/branded-lite/tier5-src/_shared/store-product-info.ts +50 -0
- package/templates/branded-lite/tier5-src/himi-blog-post/index.ts +21 -8
- package/templates/branded-lite/tier5-src/himi-branded-lite-badges/index.ts +2 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-category/index.ts +3 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-feed/index.ts +4 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-group-about/index.ts +243 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-loyalty/index.ts +115 -49
- package/templates/branded-lite/tier5-src/himi-branded-lite-plans/index.ts +2 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-podcasts/index.ts +2 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-portfolio/index.ts +2 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-portfolio-project/index.ts +3 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-program/facts.ts +52 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +21 -11
- package/templates/branded-lite/tier5-src/himi-branded-lite-video/index.ts +2 -1
- package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +12 -86
- package/templates/branded-lite/tier5-src/himi-events-list/index.ts +47 -6
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +13 -3
- package/templates/branded-lite/tier5-src/wix-spaces-forum-post/index.ts +3 -2
- package/templates/branded-lite/tier5-src/wix-spaces-member-detail/index.ts +53 -37
- package/templates/branded-lite/tier5-src/wix-spaces-members/index.ts +100 -34
- package/templates/branded-lite/tier5-src/wix-spaces-plan-detail/index.ts +2 -1
- package/templates/branded-lite/tier5-src/wix-spaces-whats-new/index.ts +2 -1
- package/templates/community-club/config.ts +16 -0
- package/templates/community-club/dev/index.ts +1930 -401
- package/templates/community-club/himalaya.content.json +6 -0
- package/templates/community-club/tier5-src/_shared/branded-lite-hosted.ts +1 -1
- package/templates/community-club/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/community-club/tier5-src/_shared/event-registration.ts +86 -0
- package/templates/community-club/tier5-src/_shared/himi-restaurants.ts +2 -1
- package/templates/community-club/tier5-src/himi-blog-post/index.ts +21 -8
- package/templates/community-club/tier5-src/himi-branded-lite-feed/index.ts +4 -3
- package/templates/community-club/tier5-src/himi-branded-lite-group-about/index.ts +243 -0
- package/templates/community-club/tier5-src/himi-branded-lite-notifsettings/index.ts +173 -0
- package/templates/community-club/tier5-src/himi-events-detail/index.ts +12 -86
- package/templates/community-club/tier5-src/himi-events-list/index.ts +47 -6
- package/templates/community-club/tier5-src/wix-spaces-whats-new/index.ts +2 -1
- package/templates/community-club-owner/dev/index.ts +53 -1
- package/templates/community-club-owner/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/community-club-owner/tier5-src/himi-owner-lite-event/index.ts +16 -8
- package/templates/community-club-owner/tier5-src/himi-owner-lite-event-form/index.ts +16 -7
- package/templates/community-club-owner/tier5-src/himi-owner-lite-events/index.ts +4 -2
- package/templates/community-club-owner/tier5-src/himi-owner-lite-post/index.ts +7 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-product/index.ts +39 -6
- package/templates/community-club-owner/tier5-src/himi-owner-lite-product-form/index.ts +14 -8
- package/templates/community-club-owner/tier5-src/himi-owner-lite-products/index.ts +7 -4
- package/templates/events-meetups/config.ts +16 -0
- package/templates/events-meetups/dev/index.ts +1930 -401
- package/templates/events-meetups/himalaya.content.json +6 -0
- package/templates/events-meetups/tier5-src/_shared/branded-lite-hosted.ts +1 -1
- package/templates/events-meetups/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/events-meetups/tier5-src/_shared/event-registration.ts +86 -0
- package/templates/events-meetups/tier5-src/_shared/himi-restaurants.ts +2 -1
- package/templates/events-meetups/tier5-src/himi-blog-post/index.ts +21 -8
- package/templates/events-meetups/tier5-src/himi-branded-lite-feed/index.ts +4 -3
- package/templates/events-meetups/tier5-src/himi-branded-lite-group-about/index.ts +243 -0
- package/templates/events-meetups/tier5-src/himi-branded-lite-notifsettings/index.ts +173 -0
- package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +12 -86
- package/templates/events-meetups/tier5-src/himi-events-list/index.ts +47 -6
- package/templates/events-meetups/tier5-src/wix-spaces-whats-new/index.ts +2 -1
- package/templates/events-meetups-owner/dev/index.ts +6 -0
- package/templates/events-meetups-owner/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-event/index.ts +16 -8
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-event-form/index.ts +16 -7
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-events/index.ts +4 -2
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post/index.ts +7 -0
- package/templates/gym-fitness/config.ts +7 -0
- package/templates/gym-fitness/dev/index.ts +1115 -278
- package/templates/gym-fitness/himalaya.content.json +3 -0
- package/templates/gym-fitness/tier5-src/_shared/branded-lite-hosted.ts +1 -1
- package/templates/gym-fitness/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/gym-fitness/tier5-src/_shared/event-registration.ts +86 -0
- package/templates/gym-fitness/tier5-src/_shared/himi-restaurants.ts +2 -1
- package/templates/gym-fitness/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/gym-fitness/tier5-src/_shared/store-product-info.ts +50 -0
- package/templates/gym-fitness/tier5-src/himi-blog-post/index.ts +21 -8
- package/templates/gym-fitness/tier5-src/himi-branded-lite-category/index.ts +3 -2
- package/templates/gym-fitness/tier5-src/himi-branded-lite-notifsettings/index.ts +173 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-plans/index.ts +2 -1
- package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +12 -86
- package/templates/gym-fitness/tier5-src/himi-events-list/index.ts +47 -6
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +14 -3
- package/templates/gym-fitness/tier5-src/wix-spaces-plan-detail/index.ts +2 -1
- package/templates/gym-fitness/tier5-src/wix-spaces-whats-new/index.ts +2 -1
- package/templates/gym-fitness-owner/dev/index.ts +132 -66
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-event/index.ts +16 -8
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-event-form/index.ts +16 -7
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-events/index.ts +4 -2
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post/index.ts +7 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-product/index.ts +39 -6
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-product-form/index.ts +14 -8
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-products/index.ts +7 -4
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-service/index.ts +38 -7
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-service-form/index.ts +53 -7
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-services/index.ts +4 -2
- package/templates/nonprofit-cause/config.ts +16 -0
- package/templates/nonprofit-cause/dev/index.ts +1925 -396
- package/templates/nonprofit-cause/himalaya.content.json +6 -0
- package/templates/nonprofit-cause/tier5-src/_shared/branded-lite-hosted.ts +1 -1
- package/templates/nonprofit-cause/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/nonprofit-cause/tier5-src/_shared/event-registration.ts +86 -0
- package/templates/nonprofit-cause/tier5-src/_shared/himi-restaurants.ts +2 -1
- package/templates/nonprofit-cause/tier5-src/himi-blog-post/index.ts +21 -8
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-feed/index.ts +4 -3
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group-about/index.ts +243 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-notifsettings/index.ts +173 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-plans/index.ts +2 -1
- package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +12 -86
- package/templates/nonprofit-cause/tier5-src/himi-events-list/index.ts +47 -6
- package/templates/nonprofit-cause/tier5-src/wix-spaces-plan-detail/index.ts +2 -1
- package/templates/nonprofit-cause/tier5-src/wix-spaces-whats-new/index.ts +2 -1
- package/templates/nonprofit-cause-owner/dev/index.ts +85 -65
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-rich-guard.ts +27 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-event/index.ts +16 -8
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-event-form/index.ts +16 -7
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-events/index.ts +4 -2
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post/index.ts +7 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-service/index.ts +38 -7
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-service-form/index.ts +53 -7
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-services/index.ts +4 -2
- package/templates/owner-lite/dev/index.ts +132 -66
- package/templates/owner-lite/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/owner-lite/tier5-src/himi-owner-lite-event/index.ts +16 -8
- package/templates/owner-lite/tier5-src/himi-owner-lite-event-form/index.ts +16 -7
- package/templates/owner-lite/tier5-src/himi-owner-lite-events/index.ts +4 -2
- package/templates/owner-lite/tier5-src/himi-owner-lite-post/index.ts +7 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-product/index.ts +39 -6
- package/templates/owner-lite/tier5-src/himi-owner-lite-product-form/index.ts +14 -8
- package/templates/owner-lite/tier5-src/himi-owner-lite-products/index.ts +7 -4
- package/templates/owner-lite/tier5-src/himi-owner-lite-service/index.ts +38 -7
- package/templates/owner-lite/tier5-src/himi-owner-lite-service-form/index.ts +53 -7
- package/templates/owner-lite/tier5-src/himi-owner-lite-services/index.ts +4 -2
- package/templates/podcast-creator/config.ts +7 -0
- package/templates/podcast-creator/dev/index.ts +1051 -158
- package/templates/podcast-creator/himalaya.content.json +3 -0
- package/templates/podcast-creator/tier5-src/_shared/branded-lite-hosted.ts +1 -1
- package/templates/podcast-creator/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/podcast-creator/tier5-src/_shared/event-registration.ts +86 -0
- package/templates/podcast-creator/tier5-src/_shared/himi-restaurants.ts +2 -1
- package/templates/podcast-creator/tier5-src/himi-blog-post/index.ts +21 -8
- package/templates/podcast-creator/tier5-src/himi-branded-lite-feed/index.ts +4 -3
- package/templates/podcast-creator/tier5-src/himi-branded-lite-notifsettings/index.ts +173 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-plans/index.ts +2 -1
- package/templates/podcast-creator/tier5-src/himi-branded-lite-podcasts/index.ts +2 -1
- package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +12 -86
- package/templates/podcast-creator/tier5-src/himi-events-list/index.ts +47 -6
- package/templates/podcast-creator/tier5-src/wix-spaces-plan-detail/index.ts +2 -1
- package/templates/podcast-creator/tier5-src/wix-spaces-whats-new/index.ts +2 -1
- package/templates/podcast-creator-owner/dev/index.ts +53 -1
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-event/index.ts +16 -8
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-event-form/index.ts +16 -7
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-events/index.ts +4 -2
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post/index.ts +7 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-product/index.ts +39 -6
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-product-form/index.ts +14 -8
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-products/index.ts +7 -4
- package/templates/portfolio-creative/config.ts +7 -0
- package/templates/portfolio-creative/dev/index.ts +1305 -468
- package/templates/portfolio-creative/himalaya.content.json +3 -0
- package/templates/portfolio-creative/tier5-src/_shared/branded-lite-hosted.ts +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/portfolio-creative/tier5-src/_shared/event-registration.ts +86 -0
- package/templates/portfolio-creative/tier5-src/_shared/himi-restaurants.ts +2 -1
- package/templates/portfolio-creative/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/portfolio-creative/tier5-src/_shared/store-product-info.ts +50 -0
- package/templates/portfolio-creative/tier5-src/himi-blog-post/index.ts +21 -8
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-category/index.ts +3 -2
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-notifsettings/index.ts +173 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-portfolio/index.ts +2 -1
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-portfolio-project/index.ts +3 -2
- package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +12 -86
- package/templates/portfolio-creative/tier5-src/himi-events-list/index.ts +47 -6
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +14 -3
- package/templates/portfolio-creative/tier5-src/wix-spaces-whats-new/index.ts +2 -1
- package/templates/portfolio-creative-owner/dev/index.ts +129 -66
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post/index.ts +7 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-product/index.ts +39 -6
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-product-form/index.ts +14 -8
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-products/index.ts +7 -4
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-service/index.ts +38 -7
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-service-form/index.ts +53 -7
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-services/index.ts +4 -2
- package/templates/restaurant/config.ts +7 -0
- package/templates/restaurant/dev/index.ts +1051 -158
- package/templates/restaurant/himalaya.content.json +3 -0
- package/templates/restaurant/tier5-src/_shared/branded-lite-hosted.ts +1 -1
- package/templates/restaurant/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/restaurant/tier5-src/_shared/event-registration.ts +86 -0
- package/templates/restaurant/tier5-src/_shared/himi-restaurants.ts +2 -1
- package/templates/restaurant/tier5-src/himi-blog-post/index.ts +21 -8
- package/templates/restaurant/tier5-src/himi-branded-lite-notifsettings/index.ts +173 -0
- package/templates/restaurant/tier5-src/himi-events-detail/index.ts +12 -86
- package/templates/restaurant/tier5-src/himi-events-list/index.ts +47 -6
- package/templates/restaurant/tier5-src/wix-spaces-whats-new/index.ts +2 -1
- package/templates/restaurant-owner/dev/index.ts +132 -66
- package/templates/restaurant-owner/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-event/index.ts +16 -8
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-event-form/index.ts +16 -7
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-events/index.ts +4 -2
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-post/index.ts +7 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-product/index.ts +39 -6
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-product-form/index.ts +14 -8
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-products/index.ts +7 -4
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-service/index.ts +38 -7
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-service-form/index.ts +53 -7
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-services/index.ts +4 -2
- package/templates/retail-store/config.ts +7 -0
- package/templates/retail-store/dev/index.ts +597 -191
- package/templates/retail-store/himalaya.content.json +3 -0
- package/templates/retail-store/tier5-src/_shared/branded-lite-hosted.ts +1 -1
- package/templates/retail-store/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/retail-store/tier5-src/_shared/himi-restaurants.ts +2 -1
- package/templates/retail-store/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/retail-store/tier5-src/_shared/store-product-info.ts +50 -0
- package/templates/retail-store/tier5-src/himi-blog-post/index.ts +21 -8
- package/templates/retail-store/tier5-src/himi-branded-lite-category/index.ts +3 -2
- package/templates/retail-store/tier5-src/himi-branded-lite-notifsettings/index.ts +173 -0
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +13 -3
- package/templates/retail-store/tier5-src/wix-spaces-whats-new/index.ts +2 -1
- package/templates/retail-store-owner/dev/index.ts +50 -1
- package/templates/retail-store-owner/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-post/index.ts +7 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-product/index.ts +39 -6
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-product-form/index.ts +14 -8
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-products/index.ts +7 -4
- package/templates/yoga-studio/config.ts +7 -0
- package/templates/yoga-studio/dev/index.ts +1107 -110
- package/templates/yoga-studio/himalaya.content.json +3 -0
- package/templates/yoga-studio/tier5-src/_shared/branded-lite-hosted.ts +1 -1
- package/templates/yoga-studio/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/yoga-studio/tier5-src/_shared/event-registration.ts +86 -0
- package/templates/yoga-studio/tier5-src/_shared/himi-restaurants.ts +2 -1
- package/templates/yoga-studio/tier5-src/himi-blog-post/index.ts +21 -8
- package/templates/yoga-studio/tier5-src/himi-branded-lite-notifsettings/index.ts +173 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-plans/index.ts +2 -1
- package/templates/yoga-studio/tier5-src/himi-branded-lite-program/facts.ts +52 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +21 -11
- package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +12 -86
- package/templates/yoga-studio/tier5-src/himi-events-list/index.ts +47 -6
- package/templates/yoga-studio/tier5-src/wix-spaces-plan-detail/index.ts +2 -1
- package/templates/yoga-studio/tier5-src/wix-spaces-whats-new/index.ts +2 -1
- package/templates/yoga-studio-owner/dev/index.ts +85 -65
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-contract.ts +19 -3
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-rich-guard.ts +27 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-event/index.ts +16 -8
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-event-form/index.ts +16 -7
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-events/index.ts +4 -2
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post/index.ts +7 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-service/index.ts +38 -7
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-service-form/index.ts +53 -7
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-services/index.ts +4 -2
|
@@ -186,6 +186,11 @@ export interface DerivedAppMeta {
|
|
|
186
186
|
/** `provisioning.json` `installedVerticals` — the site's verticals, which decide which Wix
|
|
187
187
|
* notification destinations a derived route table covers. Read from disk at load time. */
|
|
188
188
|
installedVerticals?: string[];
|
|
189
|
+
/** `provisioning.json` `siteId` when it is a real metaSiteId (`himi site create
|
|
190
|
+
* --write-provisioning` / `himi site analyze --apply` write one; the dev placeholder
|
|
191
|
+
* `development-site` is not). Resolves a frog `mobileAppId` template such as Branded Lite's
|
|
192
|
+
* `brandedLite_{msid}`: the binary is bound by its Headless clientId and holds no msid. */
|
|
193
|
+
provisionedMsid?: string;
|
|
189
194
|
/** Forwarded from AppConfig.control for the OTA app-config channel. */
|
|
190
195
|
control?: import("@wix/himalaya/core").AppControl;
|
|
191
196
|
/** Forwarded from AppConfig.appLinkHosts for the OTA app-config channel. */
|
|
@@ -287,8 +292,6 @@ export interface DerivedAppMeta {
|
|
|
287
292
|
/** Android App-Links identity for /.well-known/assetlinks.json. */
|
|
288
293
|
androidAssetLinks?: import("@wix/himalaya/core").AndroidAssetLinks;
|
|
289
294
|
}
|
|
290
|
-
/**
|
|
291
|
-
|
|
292
|
-
* read here because this module is types-only by design — the readers live in loader.ts and
|
|
293
|
-
* provisioning-facts.ts, which already touch the filesystem. */
|
|
295
|
+
/** A Wix metaSiteId is a UUID; anything else in `provisioning.json` is a placeholder. */
|
|
296
|
+
export declare function isMetaSiteId(v: unknown): v is string;
|
|
294
297
|
export declare function deriveAppMeta(name: string, m: AppDevModule, platforms?: Record<string, boolean>, provisioning?: import("./provisioning-facts.js").ProvisioningFacts): DerivedAppMeta;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/bindings.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Every sigil the platform understands, without the leading `$`. */
|
|
2
|
-
export declare const BINDING_SIGILS: readonly ["service", "flag", "item", "t"];
|
|
2
|
+
export declare const BINDING_SIGILS: readonly ["service", "flag", "item", "t", "app"];
|
|
3
3
|
export type BindingSigil = (typeof BINDING_SIGILS)[number];
|
|
4
4
|
/**
|
|
5
5
|
* Matches any binding expression by its leading sigil.
|
|
@@ -12,11 +12,12 @@ export type BindingSigil = (typeof BINDING_SIGILS)[number];
|
|
|
12
12
|
* are long enough for that collision to be implausible; one letter is not, and the
|
|
13
13
|
* token grammar is always `$t:<key>` anyway.
|
|
14
14
|
*
|
|
15
|
-
* RFC 0074's `$app:`
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* RFC 0074's `$app:` joined with S7 (#4640), the last runtime resolver arm: iOS/Android
|
|
16
|
+
* learned it in S3/S5 and the web renderer resolves it now, so every surface treats it as a
|
|
17
|
+
* binding at once. It needs its COLON for the same reason `t` does — the grammar is always
|
|
18
|
+
* `$app:<svc>.<path>`, and `\b` after `app` would capture a literal `"$app store"` and blank
|
|
19
|
+
* it. React Native deliberately has no `$app:` resolver (RFC 0074 §12): there the binding
|
|
20
|
+
* fails open to the field's literal sibling, exactly like an unbooted worker.
|
|
20
21
|
*/
|
|
21
22
|
export declare const BINDING_SIGIL_RE: RegExp;
|
|
22
23
|
/** Is this value a binding rather than a literal? */
|
|
@@ -6,6 +6,8 @@ export declare function getDraftPost(postId: string, options?: WixCallOptions):
|
|
|
6
6
|
* list projection (no body), so the body-bearing fields live here on the read
|
|
7
7
|
* shape `getPost` returns once the body fieldsets are requested. */
|
|
8
8
|
export interface WixPostWithContent extends WixPost {
|
|
9
|
+
/** Legacy Comments resource ID. Present when INTERNAL_ID was requested. */
|
|
10
|
+
internalId?: string;
|
|
9
11
|
/** Ricos rich-content body (opaque JSON). Present only when RICH_CONTENT was requested. */
|
|
10
12
|
richContent?: WixRichContent;
|
|
11
13
|
/** Plain-text rendering of the body. Present only when CONTENT_TEXT was requested. */
|
|
@@ -29,7 +29,9 @@ type BlogCommentLike = {
|
|
|
29
29
|
/** A created or listed comment as the blog screen's row. Accepts the curated and the auto-tier
|
|
30
30
|
* (`comments.createComment`) response shapes alike — both are the same REST wire object. */
|
|
31
31
|
export declare function blogCommentRow(comment: BlogCommentLike | undefined): WixBlogCommentRow;
|
|
32
|
+
/** `postId` is Blog v3 `post.internalId` (request INTERNAL_ID), not its navigation UUID. */
|
|
32
33
|
export declare function createBlogComment(postId: string, text: string): Promise<WixBlogCommentRow>;
|
|
34
|
+
/** First Comments page for Blog v3 `post.internalId`, not its navigation UUID. */
|
|
33
35
|
export declare function listBlogComments(postId: string): Promise<WixBlogCommentRow[]>;
|
|
34
36
|
/** The appId Wix Groups registers as its comments provider. Same value as
|
|
35
37
|
* GROUPS_APP_ID/GROUPS_APP_DEF_ID used elsewhere in this repo (social-feed's
|
|
@@ -126,6 +126,9 @@ export interface WixQueryEventsOptions {
|
|
|
126
126
|
limit?: number;
|
|
127
127
|
/** Page offset. */
|
|
128
128
|
offset?: number;
|
|
129
|
+
/** Extra Events v3 fieldsets to read with each row (see {@link WixEventFieldset}), as
|
|
130
|
+
* {@link getEvent} takes. Omitted → the default fieldset, and the request is unchanged. */
|
|
131
|
+
fields?: WixEventFieldset[];
|
|
129
132
|
/** Status filter (e.g. `["UPCOMING"]`), matched exactly against each row's `eventStatus`.
|
|
130
133
|
* Omitted → all statuses returned; a value no row carries selects nothing.
|
|
131
134
|
*
|
|
@@ -16,6 +16,21 @@ export declare function queryGroups(req?: WixGroupsQueryRequest, opts?: WixCallO
|
|
|
16
16
|
* public group.
|
|
17
17
|
*/
|
|
18
18
|
export declare function getGroup(id: string, opts?: WixCallOptions): Promise<WixGroup>;
|
|
19
|
+
export interface WixGroupRule {
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface WixListGroupRulesResponse {
|
|
24
|
+
rules?: WixGroupRule[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* List a group's community rules — GET /social-groups/v2/rules/{groupId}.
|
|
28
|
+
*
|
|
29
|
+
* @scope visitor — a Visitor read of a public group returned 200 with `{ rules: [] }`
|
|
30
|
+
* (2026-11-05). Whether a private/secret group's rules are visible to a non-member
|
|
31
|
+
* is unconfirmed — needsLiveProbe. A group with no rules answers an empty `rules`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function listRules(groupId: string, opts?: WixCallOptions): Promise<WixListGroupRulesResponse>;
|
|
19
34
|
export interface WixGroupCoverImage {
|
|
20
35
|
/** A previously-uploaded Wix Media file id (from site-media generate-upload-url + PUT). */
|
|
21
36
|
mediaId?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type WixCallOptions } from "./index.js";
|
|
1
2
|
export interface LoyaltyOverview {
|
|
2
3
|
balance?: number;
|
|
3
4
|
earned?: number;
|
|
@@ -41,3 +42,15 @@ export interface LoyaltyDashboardResponse {
|
|
|
41
42
|
/** Loyalty BFF dashboard — program status + points overview + customers page.
|
|
42
43
|
* GET /v1/loyalty-dashboard?limit=N. User-instance authed (auto-attached). */
|
|
43
44
|
export declare function getLoyaltyBffDashboard(limit?: number): Promise<LoyaltyDashboardResponse>;
|
|
45
|
+
/** Read the authenticated member's own Loyalty account; no customer ID is accepted.
|
|
46
|
+
* Source contract: loyalty-v1.getCurrentMemberAccount. Anonymous visitors are refused.
|
|
47
|
+
* A signed-in customer recording is still required for migration acceptance.
|
|
48
|
+
* @scope member
|
|
49
|
+
*/
|
|
50
|
+
export declare function getCurrentMemberLoyaltyAccount(readOptions?: WixCallOptions): Promise<{
|
|
51
|
+
account?: {
|
|
52
|
+
points?: {
|
|
53
|
+
balance?: number;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}>;
|
|
@@ -34,6 +34,11 @@ export interface WixPaging {
|
|
|
34
34
|
export interface WixMembersQuery {
|
|
35
35
|
filter?: Record<string, unknown>;
|
|
36
36
|
paging?: WixPaging;
|
|
37
|
+
/** REST Query's wire name is `sorting`; `sort` remains for existing callers. */
|
|
38
|
+
sorting?: Array<{
|
|
39
|
+
fieldName: string;
|
|
40
|
+
order?: "ASC" | "DESC";
|
|
41
|
+
}>;
|
|
37
42
|
sort?: unknown[];
|
|
38
43
|
}
|
|
39
44
|
export interface WixMemberImage {
|
|
@@ -77,10 +82,16 @@ export interface WixMembersMetadata {
|
|
|
77
82
|
count?: number;
|
|
78
83
|
offset?: number;
|
|
79
84
|
total?: number;
|
|
85
|
+
tooManyToCount?: boolean;
|
|
80
86
|
}
|
|
81
87
|
export interface WixQueryMembersRequest {
|
|
82
88
|
query?: WixMembersQuery;
|
|
83
89
|
fieldsets?: string[];
|
|
90
|
+
/** Branded directory search uses these public member fields, on the server. */
|
|
91
|
+
search?: {
|
|
92
|
+
expression: string;
|
|
93
|
+
fields?: string[];
|
|
94
|
+
};
|
|
84
95
|
}
|
|
85
96
|
export interface WixQueryMembersResponse {
|
|
86
97
|
members: WixMember[];
|
|
@@ -177,8 +188,11 @@ export interface WixActivityCounter {
|
|
|
177
188
|
/** The app the counters belong to (match against MEMBERS_FOLLOWERS_APP_ID). */
|
|
178
189
|
appId?: string;
|
|
179
190
|
memberId?: string;
|
|
180
|
-
/**
|
|
181
|
-
counters?:
|
|
191
|
+
/** Branded's REST wire shape is a keyed array. Keep the older map shape readable too. */
|
|
192
|
+
counters?: Array<{
|
|
193
|
+
key?: string;
|
|
194
|
+
count?: number;
|
|
195
|
+
}> | Record<string, {
|
|
182
196
|
count?: number;
|
|
183
197
|
}>;
|
|
184
198
|
}
|
|
@@ -198,8 +212,9 @@ export interface WixMyConnectionsResponse {
|
|
|
198
212
|
connectedMembers?: WixMemberConnection[];
|
|
199
213
|
}
|
|
200
214
|
/** Followers / following totals for a member — POST
|
|
201
|
-
* /members/v1/activity-counters/query.
|
|
202
|
-
*
|
|
215
|
+
* /members/v1/activity-counters/query. Requires explicit nonnegative safe integer
|
|
216
|
+
* totals for this member's Followers-app entry. Missing/invalid totals reject,
|
|
217
|
+
* as do permission failures; callers should hide unavailable counts, never invent zero. */
|
|
203
218
|
export declare function getFollowCounts(memberId: string, options?: WixCallOptions): Promise<WixFollowCounts>;
|
|
204
219
|
/** Whether the signed-in member follows `targetId` — POST
|
|
205
220
|
* /members/v3/followers/my/connections. Returns false on any miss. May 403 →
|
|
@@ -8378,8 +8378,8 @@ function isComponentAllowedForFamily(key, family) {
|
|
|
8378
8378
|
}
|
|
8379
8379
|
|
|
8380
8380
|
// ../../core/ts/src/bindings.ts
|
|
8381
|
-
var BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
8382
|
-
var COLON_SIGILS = /* @__PURE__ */ new Set(["t"]);
|
|
8381
|
+
var BINDING_SIGILS = ["service", "flag", "item", "t", "app"];
|
|
8382
|
+
var COLON_SIGILS = /* @__PURE__ */ new Set(["t", "app"]);
|
|
8383
8383
|
var BINDING_SIGIL_RE = new RegExp(
|
|
8384
8384
|
`^\\$(?:${BINDING_SIGILS.filter((s) => !COLON_SIGILS.has(s)).join("|")})\\b|^\\$(?:${[...COLON_SIGILS].join("|")}):`
|
|
8385
8385
|
);
|
|
@@ -6950,8 +6950,8 @@ var WIDGET_VOCABULARY = {
|
|
|
6950
6950
|
var WIDGET_COMPONENTS = new Set(Object.keys(WIDGET_VOCABULARY));
|
|
6951
6951
|
|
|
6952
6952
|
// ../../core/ts/src/bindings.ts
|
|
6953
|
-
var BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
6954
|
-
var COLON_SIGILS = /* @__PURE__ */ new Set(["t"]);
|
|
6953
|
+
var BINDING_SIGILS = ["service", "flag", "item", "t", "app"];
|
|
6954
|
+
var COLON_SIGILS = /* @__PURE__ */ new Set(["t", "app"]);
|
|
6955
6955
|
var BINDING_SIGIL_RE = new RegExp(
|
|
6956
6956
|
`^\\$(?:${BINDING_SIGILS.filter((s) => !COLON_SIGILS.has(s)).join("|")})\\b|^\\$(?:${[...COLON_SIGILS].join("|")}):`
|
|
6957
6957
|
);
|
|
@@ -9353,6 +9353,10 @@ function isFunctionsOnlyConfig(config) {
|
|
|
9353
9353
|
function uiConfig(config) {
|
|
9354
9354
|
return config ?? {};
|
|
9355
9355
|
}
|
|
9356
|
+
var META_SITE_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
9357
|
+
function isMetaSiteId(v) {
|
|
9358
|
+
return typeof v === "string" && META_SITE_ID.test(v);
|
|
9359
|
+
}
|
|
9356
9360
|
function deriveAppMeta(name, m, platforms = {}, provisioning = {}) {
|
|
9357
9361
|
const config = m.config;
|
|
9358
9362
|
return {
|
|
@@ -9367,6 +9371,7 @@ function deriveAppMeta(name, m, platforms = {}, provisioning = {}) {
|
|
|
9367
9371
|
push: servedPush(config.push),
|
|
9368
9372
|
...config.push?.screens ? { pushScreens: config.push.screens } : {},
|
|
9369
9373
|
...provisioning.installedVerticals ? { installedVerticals: provisioning.installedVerticals } : {},
|
|
9374
|
+
...isMetaSiteId(provisioning.siteId) ? { provisionedMsid: provisioning.siteId } : {},
|
|
9370
9375
|
control: config.control,
|
|
9371
9376
|
appLinkHosts: config.appLinkHosts,
|
|
9372
9377
|
permissionCopy: config.permissionCopy,
|
|
@@ -9486,6 +9491,7 @@ export {
|
|
|
9486
9491
|
iconButton,
|
|
9487
9492
|
image,
|
|
9488
9493
|
isFunctionsOnlyConfig,
|
|
9494
|
+
isMetaSiteId,
|
|
9489
9495
|
label,
|
|
9490
9496
|
labeledContent,
|
|
9491
9497
|
lazyList,
|
|
@@ -80,6 +80,9 @@ async function listBlogComments(postId) {
|
|
|
80
80
|
"GET",
|
|
81
81
|
`/comments/v1/comments/list-by-resource?${query}`
|
|
82
82
|
);
|
|
83
|
+
if (!Array.isArray(response?.comments) && !(response?.comments == null && response?.pagingMetadata?.count === 0)) {
|
|
84
|
+
throw new Error("Blog comments response has no comment page");
|
|
85
|
+
}
|
|
83
86
|
const rows = (response.comments ?? []).map((comment) => ({
|
|
84
87
|
id: comment.id ?? "comment",
|
|
85
88
|
authorName: commentAuthor(comment),
|
|
@@ -230,7 +230,9 @@ function normalizeEventAt(e, now) {
|
|
|
230
230
|
id,
|
|
231
231
|
title,
|
|
232
232
|
day: date && !Number.isNaN(date.getTime()) ? String(date.getDate()) : title.slice(0, 1).toUpperCase(),
|
|
233
|
-
|
|
233
|
+
// From the fixed table, not `toLocaleString`: QuickJS (the watch engine) has no ECMA-402 and
|
|
234
|
+
// answers that call with the whole "11/10/2030, 12:00:00 PM" string.
|
|
235
|
+
month: date && !Number.isNaN(date.getTime()) ? MONTHS_SHORT[date.getMonth()].toUpperCase() : "",
|
|
234
236
|
dateLine: eventWhen(e, now),
|
|
235
237
|
// "Past" for a finished event, "" otherwise — the shared collection row prints it in the
|
|
236
238
|
// meta line, so an event from last month no longer reads as current.
|
|
@@ -300,7 +302,7 @@ function eventStartMs(e) {
|
|
|
300
302
|
async function queryEvents(opts = {}, readOptions) {
|
|
301
303
|
const limit = opts.limit ?? opts.query?.paging?.limit ?? 50;
|
|
302
304
|
const offset = opts.offset ?? opts.query?.paging?.offset ?? 0;
|
|
303
|
-
const res = await wixCall("POST", "/events/v3/events/query", { query: { ...opts.query, paging: { limit, offset } } }, readOptions);
|
|
305
|
+
const res = await wixCall("POST", "/events/v3/events/query", { query: { ...opts.query, paging: { limit, offset } }, ...opts.fields?.length ? { fields: opts.fields } : {} }, readOptions);
|
|
304
306
|
let events = (res.events ?? []).map(decodeEvent);
|
|
305
307
|
if (opts.statuses) {
|
|
306
308
|
const wanted = new Set(opts.statuses);
|
|
@@ -6,6 +6,10 @@ function getGroup(id, opts) {
|
|
|
6
6
|
if (!id) throw new Error("getGroup: id is required");
|
|
7
7
|
return wixCall("GET", `/social-groups-proxy/groups/v2/groups/${encodeURIComponent(id)}`, void 0, opts);
|
|
8
8
|
}
|
|
9
|
+
function listRules(groupId, opts) {
|
|
10
|
+
if (!groupId) throw new Error("listRules: groupId is required");
|
|
11
|
+
return wixCall("GET", `/social-groups/v2/rules/${encodeURIComponent(groupId)}`, void 0, opts);
|
|
12
|
+
}
|
|
9
13
|
function createGroup(group) {
|
|
10
14
|
return wixCall("POST", "/social-groups-proxy/groups/v2/groups", { group });
|
|
11
15
|
}
|
|
@@ -102,6 +106,7 @@ export {
|
|
|
102
106
|
joinGroup,
|
|
103
107
|
leaveGroup,
|
|
104
108
|
listJoinGroupRequests,
|
|
109
|
+
listRules,
|
|
105
110
|
queryGroups,
|
|
106
111
|
queryMembers,
|
|
107
112
|
rejectJoinGroupRequests,
|
|
@@ -3,6 +3,9 @@ var LOYALTY_BFF = "https://apps.wix.com/loyalty/mobile-api/v1";
|
|
|
3
3
|
function getLoyaltyBffDashboard(limit = 25) {
|
|
4
4
|
return wixCall("GET", `${LOYALTY_BFF}/loyalty-dashboard?limit=${encodeURIComponent(String(limit))}`);
|
|
5
5
|
}
|
|
6
|
+
function getCurrentMemberLoyaltyAccount(readOptions) {
|
|
7
|
+
return wixCall("GET", "/loyalty-accounts/v1/accounts/my-account", void 0, readOptions);
|
|
8
|
+
}
|
|
6
9
|
|
|
7
10
|
// ../../stdlib/wix-sdk/loyalty/src/index.ts
|
|
8
11
|
function wixCall(method, path, body, readOptions) {
|
|
@@ -40,6 +43,7 @@ function listLoyaltyEarningRules(readOptions) {
|
|
|
40
43
|
return wixCall("GET", "/_api/loyalty-earning-rules/v1/earning-rules/rules", void 0, readOptions);
|
|
41
44
|
}
|
|
42
45
|
export {
|
|
46
|
+
getCurrentMemberLoyaltyAccount,
|
|
43
47
|
getLoyaltyBffDashboard,
|
|
44
48
|
getLoyaltyProgram,
|
|
45
49
|
listLoyaltyEarningRules,
|
|
@@ -84,10 +84,17 @@ async function getFollowCounts(memberId, options) {
|
|
|
84
84
|
{ query: { filter: { memberId: { $in: [memberId] } } } },
|
|
85
85
|
options
|
|
86
86
|
);
|
|
87
|
-
const entry = (res.activityCounters ?? []).find((c) => c.appId === MEMBERS_FOLLOWERS_APP_ID);
|
|
87
|
+
const entry = (res.activityCounters ?? []).find((c) => c.appId === MEMBERS_FOLLOWERS_APP_ID && c.memberId === memberId);
|
|
88
|
+
const counters = entry?.counters;
|
|
89
|
+
const value = (key) => Array.isArray(counters) ? counters.find((counter) => counter?.key === key)?.count : counters?.[key]?.count;
|
|
90
|
+
const followers = value("followerCount");
|
|
91
|
+
const following = value("followingCount");
|
|
92
|
+
if (typeof followers !== "number" || !Number.isSafeInteger(followers) || followers < 0 || typeof following !== "number" || !Number.isSafeInteger(following) || following < 0) {
|
|
93
|
+
throw new Error("getFollowCounts: explicit member totals are unavailable");
|
|
94
|
+
}
|
|
88
95
|
return {
|
|
89
|
-
followers
|
|
90
|
-
following
|
|
96
|
+
followers,
|
|
97
|
+
following
|
|
91
98
|
};
|
|
92
99
|
}
|
|
93
100
|
async function isFollowingMember(targetId) {
|