@wix/himalaya-cli 0.1589.0 → 0.1591.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/sdk/wix-platform/src/index.d.ts +9 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +9 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +9 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-platform.mjs +2 -0
- package/dist/cli.mjs +90 -48
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/one-app-to-himi-app.md +18 -4
- package/guides/sdk-reference.json +14 -2
- package/guides/tier-5-add-a-screen.md +48 -0
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/beauty-salon/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/beauty-salon/tier5-src/_shared/himi-bookings.ts +54 -13
- package/templates/beauty-salon/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/beauty-salon/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/beauty-salon/tier5-src/_shared/restaurant-ordering.ts +1 -1
- package/templates/beauty-salon/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/beauty-salon/tier5-src/himi-booking-services/index.ts +8 -3
- package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +1 -1
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/beauty-salon/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/beauty-salon-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/beauty-salon-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/branded-lite/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/branded-lite/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/branded-lite/tier5-src/_shared/himi-bookings.ts +54 -13
- package/templates/branded-lite/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/branded-lite/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/branded-lite/tier5-src/_shared/restaurant-ordering.ts +1 -1
- package/templates/branded-lite/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/branded-lite/tier5-src/himi-booking-services/index.ts +8 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-group/index.ts +9 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-group-about/index.ts +2 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-groups/index.ts +6 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-loyalty/index.ts +3 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-my-groups/index.ts +2 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/branded-lite/tier5-src/wix-spaces-member-detail/index.ts +5 -1
- package/templates/brandy/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/brandy/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/community-club/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/community-club/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/community-club/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/community-club/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/community-club/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/community-club/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/community-club/tier5-src/himi-branded-lite-group/index.ts +9 -3
- package/templates/community-club/tier5-src/himi-branded-lite-group-about/index.ts +2 -1
- package/templates/community-club/tier5-src/himi-branded-lite-groups/index.ts +6 -2
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/community-club/tier5-src/himi-branded-lite-my-groups/index.ts +2 -1
- package/templates/community-club/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/community-club-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/community-club-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/events-meetups/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/events-meetups/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/events-meetups/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/events-meetups/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/events-meetups/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/events-meetups/tier5-src/himi-branded-lite-group/index.ts +9 -3
- package/templates/events-meetups/tier5-src/himi-branded-lite-group-about/index.ts +2 -1
- package/templates/events-meetups/tier5-src/himi-branded-lite-groups/index.ts +6 -2
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/events-meetups/tier5-src/himi-branded-lite-my-groups/index.ts +2 -1
- package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/events-meetups-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/events-meetups-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/gym-fitness/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/gym-fitness/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/gym-fitness/tier5-src/_shared/himi-bookings.ts +54 -13
- package/templates/gym-fitness/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/gym-fitness/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/gym-fitness/tier5-src/_shared/restaurant-ordering.ts +1 -1
- package/templates/gym-fitness/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/gym-fitness/tier5-src/himi-booking-services/index.ts +8 -3
- package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +1 -1
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/gym-fitness/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/gym-fitness-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/gym-fitness-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/himi-chat/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/himi-chat/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/nonprofit-cause/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/nonprofit-cause/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/nonprofit-cause/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/nonprofit-cause/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/nonprofit-cause/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group/index.ts +9 -3
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group-about/index.ts +2 -1
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-groups/index.ts +6 -2
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-my-groups/index.ts +2 -1
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/nonprofit-cause-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/nonprofit-cause-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/owner-lite/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/owner-lite/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/podcast-creator/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/podcast-creator/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/podcast-creator/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/podcast-creator/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/podcast-creator/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/podcast-creator/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/podcast-creator-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/podcast-creator-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/portfolio-creative/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/portfolio-creative/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/portfolio-creative/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/portfolio-creative/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/portfolio-creative/tier5-src/_shared/restaurant-ordering.ts +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +1 -1
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/portfolio-creative-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/portfolio-creative-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/restaurant/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/restaurant/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/restaurant/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/restaurant/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/restaurant/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/restaurant/tier5-src/_shared/restaurant-ordering.ts +1 -1
- package/templates/restaurant/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/restaurant/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/restaurant-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/restaurant-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/retail-store/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/retail-store/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/retail-store/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/retail-store/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/retail-store/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/retail-store/tier5-src/_shared/restaurant-ordering.ts +1 -1
- package/templates/retail-store/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +1 -1
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/retail-store-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/retail-store-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/yoga-studio/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/yoga-studio/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/yoga-studio/tier5-src/_shared/himi-bookings.ts +54 -13
- package/templates/yoga-studio/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/yoga-studio/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/yoga-studio/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/yoga-studio/tier5-src/himi-booking-services/index.ts +8 -3
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/yoga-studio/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +1 -1
- package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/yoga-studio-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/yoga-studio-owner/tier5-src/_shared/himi-copy.ts +10 -2
|
@@ -87,6 +87,15 @@ export interface WixIdentity {
|
|
|
87
87
|
userId: string | null;
|
|
88
88
|
email: string | null;
|
|
89
89
|
}
|
|
90
|
+
/** The reserved action a worker defines to hear sign-in, sign-out and
|
|
91
|
+
* member switch while it is alive: `actions: { [IDENTITY_CHANGE_ACTION]: (s, c: IdentityChange) => … }`.
|
|
92
|
+
* Ambient: a returned `_nav` is dropped. Bounded at 2 s, and runs before a sign-out's purge. */
|
|
93
|
+
export declare const IDENTITY_CHANGE_ACTION = "onIdentityChange";
|
|
94
|
+
/** The `onIdentityChange` argument. `userId` is null whenever `signedIn` is false. */
|
|
95
|
+
export interface IdentityChange {
|
|
96
|
+
signedIn: boolean;
|
|
97
|
+
userId: string | null;
|
|
98
|
+
}
|
|
90
99
|
export declare const auth: {
|
|
91
100
|
/** Current identity (visitor vs member vs owner) + who. */
|
|
92
101
|
getIdentity(): Promise<WixIdentity>;
|
|
@@ -200,8 +200,9 @@ export interface WixActivityCountersQueryResponse {
|
|
|
200
200
|
activityCounters?: WixActivityCounter[];
|
|
201
201
|
}
|
|
202
202
|
export interface WixFollowCounts {
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
/** `null` when Wix returned no total for this direction: unavailable, never an assumed 0. */
|
|
204
|
+
followers: number | null;
|
|
205
|
+
following: number | null;
|
|
205
206
|
}
|
|
206
207
|
export interface WixMemberConnection {
|
|
207
208
|
memberId?: string;
|
|
@@ -212,9 +213,12 @@ export interface WixMyConnectionsResponse {
|
|
|
212
213
|
connectedMembers?: WixMemberConnection[];
|
|
213
214
|
}
|
|
214
215
|
/** Followers / following totals for a member — POST
|
|
215
|
-
* /members/v1/activity-counters/query.
|
|
216
|
-
*
|
|
217
|
-
*
|
|
216
|
+
* /members/v1/activity-counters/query. Wix keeps ONE counter per direction and creates it on the
|
|
217
|
+
* first change (live, amit1: a followed member's entry holds only `followerCount`, the follower's
|
|
218
|
+
* only `followingCount`), so each direction is reported on its own: an explicit nonnegative safe
|
|
219
|
+
* integer, or `null` when Wix returned none. A counter that is present but malformed makes the
|
|
220
|
+
* whole answer untrusted and rejects, as does an entry with neither counter or a permission
|
|
221
|
+
* failure. Callers hide an unavailable counter; a missing one is never shown as zero. */
|
|
218
222
|
export declare function getFollowCounts(memberId: string, options?: WixCallOptions): Promise<WixFollowCounts>;
|
|
219
223
|
/** Whether the signed-in member follows `targetId` — POST
|
|
220
224
|
* /members/v3/followers/my/connections. Returns false on any miss. May 403 →
|
|
@@ -87,15 +87,16 @@ async function getFollowCounts(memberId, options) {
|
|
|
87
87
|
const entry = (res.activityCounters ?? []).find((c) => c.appId === MEMBERS_FOLLOWERS_APP_ID && c.memberId === memberId);
|
|
88
88
|
const counters = entry?.counters;
|
|
89
89
|
const value = (key) => Array.isArray(counters) ? counters.find((counter) => counter?.key === key)?.count : counters?.[key]?.count;
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
throw new Error("getFollowCounts:
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
followers,
|
|
97
|
-
following
|
|
90
|
+
const total = (key) => {
|
|
91
|
+
const count = value(key);
|
|
92
|
+
if (count === void 0 || count === null) return null;
|
|
93
|
+
if (typeof count !== "number" || !Number.isSafeInteger(count) || count < 0) throw new Error("getFollowCounts: a member total is malformed");
|
|
94
|
+
return count;
|
|
98
95
|
};
|
|
96
|
+
const followers = total("followerCount");
|
|
97
|
+
const following = total("followingCount");
|
|
98
|
+
if (followers === null && following === null) throw new Error("getFollowCounts: explicit member totals are unavailable");
|
|
99
|
+
return { followers, following };
|
|
99
100
|
}
|
|
100
101
|
async function isFollowingMember(targetId) {
|
|
101
102
|
if (!targetId) throw new Error("isFollowingMember: targetId is required");
|
|
@@ -216,6 +216,7 @@ var session = {
|
|
|
216
216
|
return { present: r?.present ?? false, msid: r?.msid ?? null };
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
|
+
var IDENTITY_CHANGE_ACTION = "onIdentityChange";
|
|
219
220
|
var AUTH_REFUSAL_CODES = /* @__PURE__ */ new Set(["cancelled", "sign_in_in_progress", "sign_in_unavailable"]);
|
|
220
221
|
async function authTransition(method, params) {
|
|
221
222
|
const r = await call2(method, params).catch((e) => {
|
|
@@ -418,6 +419,7 @@ var monitoring = {
|
|
|
418
419
|
};
|
|
419
420
|
var version = 2;
|
|
420
421
|
export {
|
|
422
|
+
IDENTITY_CHANGE_ACTION,
|
|
421
423
|
auth,
|
|
422
424
|
bi,
|
|
423
425
|
deeplink,
|