@wix/himalaya-cli 0.1645.0 → 0.1647.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 (122) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/extensions.d.ts +21 -3
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +5 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-blog.mjs +8 -3
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +5 -0
  5. package/dist/cli.mjs +1396 -994
  6. package/guides/himi-test.md +1 -1
  7. package/guides/one-app-to-himi-app.md +26 -12
  8. package/guides/sdk-reference.json +33 -1
  9. package/package.json +2 -2
  10. package/templates/beauty-salon/config.ts +1 -1
  11. package/templates/beauty-salon/dev/index.ts +2773 -2969
  12. package/templates/beauty-salon/tier5-src/_shared/collection-contract.ts +0 -1
  13. package/templates/beauty-salon/tier5-src/_shared/himi-blog-post-row.ts +210 -0
  14. package/templates/beauty-salon/tier5-src/_shared/himi-blog-saved.ts +0 -10
  15. package/templates/beauty-salon/tier5-src/himi-blog-feed/index.ts +220 -95
  16. package/templates/beauty-salon/tier5-src/himi-blog-post/index.ts +436 -140
  17. package/templates/beauty-salon/tier5-src/himi-blog-saved/index.ts +97 -39
  18. package/templates/beauty-salon-owner/tier5-src/_shared/collection-contract.ts +0 -1
  19. package/templates/branded-lite/config.ts +1 -1
  20. package/templates/branded-lite/dev/index.ts +2741 -2937
  21. package/templates/branded-lite/l10n/en.json +12 -12
  22. package/templates/branded-lite/tier5-src/_shared/collection-contract.ts +0 -1
  23. package/templates/branded-lite/tier5-src/_shared/himi-blog-post-row.ts +210 -0
  24. package/templates/branded-lite/tier5-src/_shared/himi-blog-saved.ts +0 -10
  25. package/templates/branded-lite/tier5-src/himi-blog-feed/index.ts +220 -95
  26. package/templates/branded-lite/tier5-src/himi-blog-post/index.ts +436 -140
  27. package/templates/branded-lite/tier5-src/himi-blog-saved/index.ts +97 -39
  28. package/templates/community-club/config.ts +1 -1
  29. package/templates/community-club/dev/index.ts +2799 -2995
  30. package/templates/community-club/tier5-src/_shared/collection-contract.ts +0 -1
  31. package/templates/community-club/tier5-src/_shared/himi-blog-post-row.ts +210 -0
  32. package/templates/community-club/tier5-src/_shared/himi-blog-saved.ts +0 -10
  33. package/templates/community-club/tier5-src/himi-blog-feed/index.ts +220 -95
  34. package/templates/community-club/tier5-src/himi-blog-post/index.ts +436 -140
  35. package/templates/community-club/tier5-src/himi-blog-saved/index.ts +97 -39
  36. package/templates/community-club-owner/tier5-src/_shared/collection-contract.ts +0 -1
  37. package/templates/conference/tier5-src/_shared/collection-contract.ts +0 -1
  38. package/templates/events-meetups/config.ts +1 -1
  39. package/templates/events-meetups/dev/index.ts +2859 -3055
  40. package/templates/events-meetups/tier5-src/_shared/collection-contract.ts +0 -1
  41. package/templates/events-meetups/tier5-src/_shared/himi-blog-post-row.ts +210 -0
  42. package/templates/events-meetups/tier5-src/_shared/himi-blog-saved.ts +0 -10
  43. package/templates/events-meetups/tier5-src/himi-blog-feed/index.ts +220 -95
  44. package/templates/events-meetups/tier5-src/himi-blog-post/index.ts +436 -140
  45. package/templates/events-meetups/tier5-src/himi-blog-saved/index.ts +97 -39
  46. package/templates/events-meetups-owner/tier5-src/_shared/collection-contract.ts +0 -1
  47. package/templates/gym-fitness/config.ts +1 -1
  48. package/templates/gym-fitness/dev/index.ts +2733 -2929
  49. package/templates/gym-fitness/tier5-src/_shared/collection-contract.ts +0 -1
  50. package/templates/gym-fitness/tier5-src/_shared/himi-blog-post-row.ts +210 -0
  51. package/templates/gym-fitness/tier5-src/_shared/himi-blog-saved.ts +0 -10
  52. package/templates/gym-fitness/tier5-src/himi-blog-feed/index.ts +220 -95
  53. package/templates/gym-fitness/tier5-src/himi-blog-post/index.ts +436 -140
  54. package/templates/gym-fitness/tier5-src/himi-blog-saved/index.ts +97 -39
  55. package/templates/gym-fitness-owner/tier5-src/_shared/collection-contract.ts +0 -1
  56. package/templates/nonprofit-cause/config.ts +1 -1
  57. package/templates/nonprofit-cause/dev/index.ts +2813 -3009
  58. package/templates/nonprofit-cause/tier5-src/_shared/collection-contract.ts +0 -1
  59. package/templates/nonprofit-cause/tier5-src/_shared/himi-blog-post-row.ts +210 -0
  60. package/templates/nonprofit-cause/tier5-src/_shared/himi-blog-saved.ts +0 -10
  61. package/templates/nonprofit-cause/tier5-src/himi-blog-feed/index.ts +220 -95
  62. package/templates/nonprofit-cause/tier5-src/himi-blog-post/index.ts +436 -140
  63. package/templates/nonprofit-cause/tier5-src/himi-blog-saved/index.ts +97 -39
  64. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-contract.ts +0 -1
  65. package/templates/owner-lite/tier5-src/_shared/collection-contract.ts +0 -1
  66. package/templates/podcast-creator/config.ts +1 -1
  67. package/templates/podcast-creator/dev/index.ts +2862 -3058
  68. package/templates/podcast-creator/tier5-src/_shared/collection-contract.ts +0 -1
  69. package/templates/podcast-creator/tier5-src/_shared/himi-blog-post-row.ts +210 -0
  70. package/templates/podcast-creator/tier5-src/_shared/himi-blog-saved.ts +0 -10
  71. package/templates/podcast-creator/tier5-src/himi-blog-feed/index.ts +220 -95
  72. package/templates/podcast-creator/tier5-src/himi-blog-post/index.ts +436 -140
  73. package/templates/podcast-creator/tier5-src/himi-blog-saved/index.ts +97 -39
  74. package/templates/podcast-creator-owner/tier5-src/_shared/collection-contract.ts +0 -1
  75. package/templates/portfolio-creative/config.ts +1 -1
  76. package/templates/portfolio-creative/dev/index.ts +2803 -2999
  77. package/templates/portfolio-creative/tier5-src/_shared/collection-contract.ts +0 -1
  78. package/templates/portfolio-creative/tier5-src/_shared/himi-blog-post-row.ts +210 -0
  79. package/templates/portfolio-creative/tier5-src/_shared/himi-blog-saved.ts +0 -10
  80. package/templates/portfolio-creative/tier5-src/himi-blog-feed/index.ts +220 -95
  81. package/templates/portfolio-creative/tier5-src/himi-blog-post/index.ts +436 -140
  82. package/templates/portfolio-creative/tier5-src/himi-blog-saved/index.ts +97 -39
  83. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-contract.ts +0 -1
  84. package/templates/restaurant/config.ts +1 -1
  85. package/templates/restaurant/dev/index.ts +2845 -3041
  86. package/templates/restaurant/tier5-src/_shared/collection-contract.ts +0 -1
  87. package/templates/restaurant/tier5-src/_shared/himi-blog-post-row.ts +210 -0
  88. package/templates/restaurant/tier5-src/_shared/himi-blog-saved.ts +0 -10
  89. package/templates/restaurant/tier5-src/himi-blog-feed/index.ts +220 -95
  90. package/templates/restaurant/tier5-src/himi-blog-post/index.ts +436 -140
  91. package/templates/restaurant/tier5-src/himi-blog-saved/index.ts +97 -39
  92. package/templates/restaurant-owner/tier5-src/_shared/collection-contract.ts +0 -1
  93. package/templates/retail-store/config.ts +1 -1
  94. package/templates/retail-store/dev/index.ts +2809 -3005
  95. package/templates/retail-store/tier5-src/_shared/collection-contract.ts +0 -1
  96. package/templates/retail-store/tier5-src/_shared/himi-blog-post-row.ts +210 -0
  97. package/templates/retail-store/tier5-src/_shared/himi-blog-saved.ts +0 -10
  98. package/templates/retail-store/tier5-src/himi-blog-feed/index.ts +220 -95
  99. package/templates/retail-store/tier5-src/himi-blog-post/index.ts +436 -140
  100. package/templates/retail-store/tier5-src/himi-blog-saved/index.ts +97 -39
  101. package/templates/retail-store-owner/tier5-src/_shared/collection-contract.ts +0 -1
  102. package/templates/salon-spa/tier5-src/_shared/collection-contract.ts +0 -1
  103. package/templates/yoga-studio/config.ts +1 -1
  104. package/templates/yoga-studio/dev/index.ts +2752 -2948
  105. package/templates/yoga-studio/tier5-src/_shared/collection-contract.ts +0 -1
  106. package/templates/yoga-studio/tier5-src/_shared/himi-blog-post-row.ts +210 -0
  107. package/templates/yoga-studio/tier5-src/_shared/himi-blog-saved.ts +0 -10
  108. package/templates/yoga-studio/tier5-src/himi-blog-feed/index.ts +220 -95
  109. package/templates/yoga-studio/tier5-src/himi-blog-post/index.ts +436 -140
  110. package/templates/yoga-studio/tier5-src/himi-blog-saved/index.ts +97 -39
  111. package/templates/yoga-studio-owner/tier5-src/_shared/collection-contract.ts +0 -1
  112. package/templates/beauty-salon/tier5-src/_shared/himi-blog-collection.ts +0 -7
  113. package/templates/branded-lite/tier5-src/_shared/himi-blog-collection.ts +0 -7
  114. package/templates/community-club/tier5-src/_shared/himi-blog-collection.ts +0 -7
  115. package/templates/events-meetups/tier5-src/_shared/himi-blog-collection.ts +0 -7
  116. package/templates/gym-fitness/tier5-src/_shared/himi-blog-collection.ts +0 -7
  117. package/templates/nonprofit-cause/tier5-src/_shared/himi-blog-collection.ts +0 -7
  118. package/templates/podcast-creator/tier5-src/_shared/himi-blog-collection.ts +0 -7
  119. package/templates/portfolio-creative/tier5-src/_shared/himi-blog-collection.ts +0 -7
  120. package/templates/restaurant/tier5-src/_shared/himi-blog-collection.ts +0 -7
  121. package/templates/retail-store/tier5-src/_shared/himi-blog-collection.ts +0 -7
  122. package/templates/yoga-studio/tier5-src/_shared/himi-blog-collection.ts +0 -7
@@ -38,9 +38,9 @@ export interface WixGetPostRequest {
38
38
  *
39
39
  * On network / backend rejection we still fall back to a queryPosts
40
40
  * filter-by-id — a graceful degrade to the LIST projection (no body) that keeps
41
- * blog detail + saved screens rendering instead of erroring out. `queryPosts`'s
42
- * request type has no `fieldsets` field, so that fallback path cannot carry the
43
- * body. Detail readers can opt into `preserveAccessErrors` to keep HTTP 401/403
41
+ * blog detail + saved screens rendering instead of erroring out. That list read
42
+ * cannot carry the body; it forwards only a requested METRICS / URL fieldset,
43
+ * so counts and the post link survive the fallback. Detail readers can opt into `preserveAccessErrors` to keep HTTP 401/403
44
44
  * refusals instead of a public metadata fallback; default callers are unchanged.
45
45
  *
46
46
  * When that fallback ALSO finds nothing — a deleted post, or one this visitor
@@ -119,3 +119,21 @@ export interface WixQueryDraftPostsResponse {
119
119
  export declare function queryDraftPosts(req?: WixQueryDraftPostsRequest, opts?: WixCallOptions): Promise<WixQueryDraftPostsResponse>;
120
120
  /** Cancel a post's schedule — PATCH /draft-posts/{id} {action:"UPDATE_CANCEL_SCHEDULE"}. */
121
121
  export declare function cancelScheduleDraftPost(postId: string): Promise<WixUpdateDraftPostResponse>;
122
+ export interface WixBlogTag {
123
+ id: string;
124
+ label?: string;
125
+ slug?: string;
126
+ publishedPostCount?: number;
127
+ }
128
+ export interface WixQueryTagsResponse {
129
+ tags: WixBlogTag[];
130
+ }
131
+ /** Query blog tags — POST /blog/v3/tags/query.
132
+ * @scope visitor — public tag labels; a visitor token reads them. */
133
+ export declare function queryTags(req?: {
134
+ filter?: Record<string, unknown>;
135
+ paging?: {
136
+ limit?: number;
137
+ offset?: number;
138
+ };
139
+ }, opts?: WixCallOptions): Promise<WixQueryTagsResponse>;
@@ -135,6 +135,11 @@ export interface WixListCurrentMemberBlockingResponse {
135
135
  /** List site members — POST /members/v1/members/query. Pass `{ query: { paging: { limit, offset? } } }`
136
136
  * (offset paging). Do not pass `cursorPaging` — that is a different Wix envelope and is not on this type. */
137
137
  export declare function queryMembers(req?: WixQueryMembersRequest, readOptions?: WixCallOptions): Promise<WixQueryMembersResponse>;
138
+ /** A member's PUBLIC profile (nickname, photo) by id — GET /members/v1/members/{id}?fieldsets=PUBLIC.
139
+ * Readable by a visitor even where the member directory (`queryMembers`) is private.
140
+ * Verified live 2026-11-08 with a visitor token on the amit1 demo site (200).
141
+ * @scope visitor — public profile fields only. */
142
+ export declare function getPublicMember(id: string, options?: WixCallOptions): Promise<WixGetMemberResponse>;
138
143
  /** Fetch a single member by id — GET /members/v1/members/{id}?fieldsets=FULL. */
139
144
  export declare function getMember(id: string, options?: WixCallOptions): Promise<WixGetMemberResponse>;
140
145
  /** Fetch the currently authenticated member — member-scoped, unlike the owner roster query.
@@ -17,7 +17,8 @@ function getPost(postId, req = {}, readOptions) {
17
17
  ).catch(async (cause) => {
18
18
  if (readOptions?.preserveAccessErrors && /^HTTP\s*(?:401|403)\b/i.test(String(cause?.message ?? cause))) throw cause;
19
19
  if (readOptions?.cache || readOptions?.onCacheResult) throw cause;
20
- const resp = await queryPosts({ query: { filter: { id: postId } } }, readOptions);
20
+ const listFieldsets = fieldsets.filter((f) => f === "METRICS" || f === "URL");
21
+ const resp = await queryPosts({ query: { filter: { id: postId } }, ...listFieldsets.length ? { fieldsets: listFieldsets } : {} }, readOptions);
21
22
  const post = resp.posts?.[0];
22
23
  if (!post) {
23
24
  const err = new Error(`Blog post not found: ${postId}`);
@@ -53,11 +54,11 @@ function revertDraftPost(postId) {
53
54
  }
54
55
  function likePost(postId) {
55
56
  if (!postId) throw new Error("likePost: postId is required");
56
- return wixCall("POST", `/blog/v3/posts/${encodeURIComponent(postId)}/like`, {});
57
+ return wixCall("POST", `/blog/v3/posts/${encodeURIComponent(postId)}/like`, { fieldsets: ["METRICS"] });
57
58
  }
58
59
  function unlikePost(postId) {
59
60
  if (!postId) throw new Error("unlikePost: postId is required");
60
- return wixCall("POST", `/blog/v3/posts/${encodeURIComponent(postId)}/unlike`, {});
61
+ return wixCall("POST", `/blog/v3/posts/${encodeURIComponent(postId)}/unlike`, { fieldsets: ["METRICS"] });
61
62
  }
62
63
  function queryDraftPosts(req = {}, opts) {
63
64
  return wixCall("POST", `${DRAFTS}/query`, req, opts);
@@ -65,6 +66,9 @@ function queryDraftPosts(req = {}, opts) {
65
66
  function cancelScheduleDraftPost(postId) {
66
67
  return updateDraftPost(postId, {}, "UPDATE_CANCEL_SCHEDULE");
67
68
  }
69
+ function queryTags(req = {}, opts) {
70
+ return wixCall("POST", "/blog/v3/tags/query", { query: req }, opts);
71
+ }
68
72
 
69
73
  // ../../stdlib/wix-sdk/blog-v3/src/index.ts
70
74
  function wixCallHeaders(opts) {
@@ -119,6 +123,7 @@ export {
119
123
  queryCategories,
120
124
  queryDraftPosts,
121
125
  queryPosts,
126
+ queryTags,
122
127
  revertDraftPost,
123
128
  scheduleDraftPost,
124
129
  unlikePost,
@@ -18,6 +18,10 @@ function wixCall(method, path, body, readOptions) {
18
18
  function queryMembers(req = {}, readOptions) {
19
19
  return wixCall("POST", "/members/v1/members/query", req, readOptions);
20
20
  }
21
+ function getPublicMember(id, options) {
22
+ if (!id) throw new Error("getPublicMember: id is required");
23
+ return wixCall("GET", `/members/v1/members/${encodeURIComponent(id)}?fieldsets=PUBLIC`, void 0, options);
24
+ }
21
25
  function getMember(id, options) {
22
26
  if (!id) throw new Error("getMember: id is required");
23
27
  return wixCall("GET", `/members/v1/members/${encodeURIComponent(id)}?fieldsets=FULL`, void 0, options);
@@ -143,6 +147,7 @@ export {
143
147
  getFollowCounts,
144
148
  getMember,
145
149
  getMyMember,
150
+ getPublicMember,
146
151
  isFollowingMember,
147
152
  joinCommunity,
148
153
  leaveCommunity,