@wix/himalaya-cli 0.1572.0 → 0.1573.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.
Files changed (65) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +2 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/checkout/src/index.d.ts +4 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/apple-iap-contract.d.ts +1 -1
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/commerce-contract.d.ts +2 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +1 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/one-app-page.d.ts +61 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/social-feed/src/index.d.ts +34 -9
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/checkout.mjs +28 -3
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +2 -1
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +573 -73
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-social-feed.mjs +24 -1
  12. package/dist/cli.mjs +123 -43
  13. package/dist/preview-assets.generated.bin +0 -0
  14. package/guides/one-app-to-himi-app.md +54 -0
  15. package/guides/sdk-reference.json +28 -4
  16. package/guides/webview-page-sdk.md +68 -3
  17. package/package.json +2 -2
  18. package/templates/beauty-salon/tier5-src/_shared/iap-worker.ts +2 -0
  19. package/templates/beauty-salon/tier5-src/_shared/payment-setup.ts +6 -0
  20. package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +5 -2
  21. package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +5 -2
  22. package/templates/beauty-salon/tier5-src/himi-branded-lite-plans/index.ts +5 -2
  23. package/templates/branded-lite/tier5-src/_shared/iap-worker.ts +2 -0
  24. package/templates/branded-lite/tier5-src/_shared/payment-setup.ts +6 -0
  25. package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +5 -2
  26. package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +5 -2
  27. package/templates/branded-lite/tier5-src/himi-branded-lite-plans/index.ts +5 -2
  28. package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +5 -2
  29. package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +9 -4
  30. package/templates/community-club/tier5-src/_shared/iap-worker.ts +2 -0
  31. package/templates/community-club/tier5-src/_shared/payment-setup.ts +6 -0
  32. package/templates/community-club/tier5-src/himi-events-detail/index.ts +9 -4
  33. package/templates/events-meetups/tier5-src/_shared/iap-worker.ts +2 -0
  34. package/templates/events-meetups/tier5-src/_shared/payment-setup.ts +6 -0
  35. package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +9 -4
  36. package/templates/gym-fitness/tier5-src/_shared/iap-worker.ts +2 -0
  37. package/templates/gym-fitness/tier5-src/_shared/payment-setup.ts +6 -0
  38. package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +5 -2
  39. package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +5 -2
  40. package/templates/gym-fitness/tier5-src/himi-branded-lite-plans/index.ts +5 -2
  41. package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +9 -4
  42. package/templates/nonprofit-cause/tier5-src/_shared/iap-worker.ts +2 -0
  43. package/templates/nonprofit-cause/tier5-src/_shared/payment-setup.ts +6 -0
  44. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-plans/index.ts +5 -2
  45. package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +9 -4
  46. package/templates/podcast-creator/tier5-src/_shared/iap-worker.ts +2 -0
  47. package/templates/podcast-creator/tier5-src/_shared/payment-setup.ts +6 -0
  48. package/templates/podcast-creator/tier5-src/himi-branded-lite-plans/index.ts +5 -2
  49. package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +9 -4
  50. package/templates/portfolio-creative/tier5-src/_shared/iap-worker.ts +2 -0
  51. package/templates/portfolio-creative/tier5-src/_shared/payment-setup.ts +6 -0
  52. package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +5 -2
  53. package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +9 -4
  54. package/templates/restaurant/tier5-src/_shared/iap-worker.ts +2 -0
  55. package/templates/restaurant/tier5-src/_shared/payment-setup.ts +6 -0
  56. package/templates/restaurant/tier5-src/himi-events-detail/index.ts +9 -4
  57. package/templates/retail-store/tier5-src/_shared/iap-worker.ts +2 -0
  58. package/templates/retail-store/tier5-src/_shared/payment-setup.ts +6 -0
  59. package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +5 -2
  60. package/templates/yoga-studio/tier5-src/_shared/iap-worker.ts +2 -0
  61. package/templates/yoga-studio/tier5-src/_shared/payment-setup.ts +6 -0
  62. package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +5 -2
  63. package/templates/yoga-studio/tier5-src/himi-branded-lite-plans/index.ts +5 -2
  64. package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +5 -2
  65. package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +9 -4
@@ -18,11 +18,33 @@ function wixCall(method, path, body, readOptions) {
18
18
  var FEED_BASE = "https://social.wix.com/api/v1/feed";
19
19
  var FEED_SERVERLESS = "https://social.wix.com/serverless/mobile/feed";
20
20
  var GROUPS_APP_DEF_ID = "148c2287-c669-d849-d153-463c7486a694";
21
+ function feedQuery(fields) {
22
+ return Object.entries(fields).filter(([, value]) => value !== void 0).map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`).join("&");
23
+ }
21
24
  function listFeedItems(groupId, limit = 20, options) {
22
25
  if (!groupId) throw new Error("listFeedItems: groupId is required");
23
- const qs = `containerId=${encodeURIComponent(groupId)}&appDefId=${GROUPS_APP_DEF_ID}&limit=${limit}&feedType=all&contentType=DRAFTJS`;
26
+ const qs = feedQuery({
27
+ containerId: groupId,
28
+ appDefId: GROUPS_APP_DEF_ID,
29
+ limit,
30
+ feedType: "all",
31
+ contentType: "DRAFTJS",
32
+ topicId: options?.topicId,
33
+ cursor: options?.cursor,
34
+ invalidatePermissionsCache: options?.invalidatePermissionsCache
35
+ });
24
36
  return wixCall("GET", `${FEED_SERVERLESS}/v4/feedPosts/?${qs}`, void 0, options);
25
37
  }
38
+ function listCentralFeedItems(limit = 20, options) {
39
+ const qs = feedQuery({
40
+ limit,
41
+ cursor: options?.cursor,
42
+ invalidatePermissionsCache: options?.invalidatePermissionsCache,
43
+ withSuggestedPosts: options?.withSuggestedPosts,
44
+ contentType: options?.contentType
45
+ });
46
+ return wixCall("GET", `${FEED_SERVERLESS}/v4/centralFeedPosts?${qs}`, void 0, options);
47
+ }
26
48
  function createFeedItem(groupId, content) {
27
49
  if (!groupId) throw new Error("createFeedItem: groupId is required");
28
50
  return wixCall("POST", `${FEED_BASE}/items`, {
@@ -55,6 +77,7 @@ function unreactFeedItem(feedItemId, groupId, reactionCode = DEFAULT_REACTION) {
55
77
  export {
56
78
  DEFAULT_REACTION,
57
79
  createFeedItem,
80
+ listCentralFeedItems,
58
81
  listFeedItems,
59
82
  reactToFeedItem,
60
83
  unreactFeedItem