@wix/himalaya-cli 0.1576.0 → 0.1578.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/clipboard/src/index.d.ts +32 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/haptic/src/index.d.ts +69 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/ui/src/index.d.ts +19 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +6 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/loyalty/src/index.d.ts +64 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/online-programs/src/index.d.ts +87 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/clipboard.mjs +58 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/haptic.mjs +73 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/ui.mjs +5 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-loyalty.mjs +15 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-online-programs.mjs +42 -0
- package/dist/cli.mjs +7245 -6889
- package/dist/preview-assets.generated.bin +0 -0
- package/fixtures/wix-canned.json +56 -3
- package/guides/one-app-section-mappings.md +1 -1
- package/guides/one-app-to-himi-app.md +50 -1
- package/guides/qa-builds.md +14 -6
- package/guides/sdk-reference.json +249 -17
- package/guides/web-page-sdk-reference.md +2 -2
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/beauty-salon/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/beauty-salon-owner/dev/index.ts +52 -27
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post/index.ts +20 -8
- package/templates/branded-lite/config.ts +7 -0
- package/templates/branded-lite/dev/index.ts +833 -0
- package/templates/branded-lite/himalaya.content.json +3 -0
- package/templates/branded-lite/l10n/en.json +4 -2
- package/templates/branded-lite/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/branded-lite/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-member-programs/index.ts +658 -0
- package/templates/community-club/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/community-club/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/community-club-owner/dev/index.ts +52 -27
- package/templates/community-club-owner/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-post/index.ts +20 -8
- package/templates/events-meetups/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/events-meetups/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/events-meetups-owner/dev/index.ts +52 -27
- package/templates/events-meetups-owner/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post/index.ts +20 -8
- package/templates/gym-fitness/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/gym-fitness/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/gym-fitness-owner/dev/index.ts +52 -27
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post/index.ts +20 -8
- package/templates/himi-chat/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/nonprofit-cause/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/nonprofit-cause/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/nonprofit-cause-owner/dev/index.ts +52 -27
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post/index.ts +20 -8
- package/templates/owner-lite/dev/index.ts +52 -27
- package/templates/owner-lite/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-post/index.ts +20 -8
- package/templates/podcast-creator/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/podcast-creator/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/podcast-creator-owner/dev/index.ts +52 -27
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post/index.ts +20 -8
- package/templates/portfolio-creative/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/portfolio-creative/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/portfolio-creative-owner/dev/index.ts +52 -27
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post/index.ts +20 -8
- package/templates/restaurant/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/restaurant/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/restaurant-owner/dev/index.ts +52 -27
- package/templates/restaurant-owner/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-post/index.ts +20 -8
- package/templates/retail-store/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/retail-store/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/retail-store-owner/dev/index.ts +52 -27
- package/templates/retail-store-owner/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-post/index.ts +20 -8
- package/templates/yoga-studio/config.ts +7 -0
- package/templates/yoga-studio/dev/index.ts +833 -0
- package/templates/yoga-studio/himalaya.content.json +3 -0
- package/templates/yoga-studio/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/yoga-studio/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-member-programs/index.ts +658 -0
- package/templates/yoga-studio-owner/dev/index.ts +52 -27
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-load-error.ts +8 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post/index.ts +20 -8
|
@@ -23,12 +23,12 @@ var CAPABILITY_REGISTRY = {
|
|
|
23
23
|
"calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
|
|
24
24
|
"calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
|
|
25
25
|
"camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
|
|
26
|
-
"clipboard": ["hasText", "readText", "writeText"],
|
|
26
|
+
"clipboard": ["hasImage", "hasText", "readText", "writeImage", "writeText"],
|
|
27
27
|
"contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
|
|
28
28
|
"file_picker": ["pick", "pickDirectoryForExport"],
|
|
29
29
|
"files": ["list", "readText", "remove", "stat", "write"],
|
|
30
30
|
"godot": ["loadPack", "release", "send"],
|
|
31
|
-
"haptic": ["play"],
|
|
31
|
+
"haptic": ["play", "sequence", "vibrate"],
|
|
32
32
|
"health": ["availability", "getPermissionStatus", "query", "requestPermission", "saveWorkout"],
|
|
33
33
|
"himi_apps": ["canOpen", "current", "hostInfo", "open"],
|
|
34
34
|
"iap": ["appBinding", "consume", "entitlements", "finishTransaction", "getPaywallConfig", "getProducts", "getUnfinishedTransactions", "purchase", "purchaseForVerification", "restore"],
|
|
@@ -23,12 +23,12 @@ var CAPABILITY_REGISTRY = {
|
|
|
23
23
|
"calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
|
|
24
24
|
"calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
|
|
25
25
|
"camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
|
|
26
|
-
"clipboard": ["hasText", "readText", "writeText"],
|
|
26
|
+
"clipboard": ["hasImage", "hasText", "readText", "writeImage", "writeText"],
|
|
27
27
|
"contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
|
|
28
28
|
"file_picker": ["pick", "pickDirectoryForExport"],
|
|
29
29
|
"files": ["list", "readText", "remove", "stat", "write"],
|
|
30
30
|
"godot": ["loadPack", "release", "send"],
|
|
31
|
-
"haptic": ["play"],
|
|
31
|
+
"haptic": ["play", "sequence", "vibrate"],
|
|
32
32
|
"health": ["availability", "getPermissionStatus", "query", "requestPermission", "saveWorkout"],
|
|
33
33
|
"himi_apps": ["canOpen", "current", "hostInfo", "open"],
|
|
34
34
|
"iap": ["appBinding", "consume", "entitlements", "finishTransaction", "getPaywallConfig", "getProducts", "getUnfinishedTransactions", "purchase", "purchaseForVerification", "restore"],
|
|
@@ -8,12 +8,12 @@ var CAPABILITY_REGISTRY = {
|
|
|
8
8
|
"calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
|
|
9
9
|
"calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
|
|
10
10
|
"camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
|
|
11
|
-
"clipboard": ["hasText", "readText", "writeText"],
|
|
11
|
+
"clipboard": ["hasImage", "hasText", "readText", "writeImage", "writeText"],
|
|
12
12
|
"contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
|
|
13
13
|
"file_picker": ["pick", "pickDirectoryForExport"],
|
|
14
14
|
"files": ["list", "readText", "remove", "stat", "write"],
|
|
15
15
|
"godot": ["loadPack", "release", "send"],
|
|
16
|
-
"haptic": ["play"],
|
|
16
|
+
"haptic": ["play", "sequence", "vibrate"],
|
|
17
17
|
"health": ["availability", "getPermissionStatus", "query", "requestPermission", "saveWorkout"],
|
|
18
18
|
"himi_apps": ["canOpen", "current", "hostInfo", "open"],
|
|
19
19
|
"iap": ["appBinding", "consume", "entitlements", "finishTransaction", "getPaywallConfig", "getProducts", "getUnfinishedTransactions", "purchase", "purchaseForVerification", "restore"],
|
|
@@ -23,12 +23,12 @@ var CAPABILITY_REGISTRY = {
|
|
|
23
23
|
"calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
|
|
24
24
|
"calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
|
|
25
25
|
"camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
|
|
26
|
-
"clipboard": ["hasText", "readText", "writeText"],
|
|
26
|
+
"clipboard": ["hasImage", "hasText", "readText", "writeImage", "writeText"],
|
|
27
27
|
"contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
|
|
28
28
|
"file_picker": ["pick", "pickDirectoryForExport"],
|
|
29
29
|
"files": ["list", "readText", "remove", "stat", "write"],
|
|
30
30
|
"godot": ["loadPack", "release", "send"],
|
|
31
|
-
"haptic": ["play"],
|
|
31
|
+
"haptic": ["play", "sequence", "vibrate"],
|
|
32
32
|
"health": ["availability", "getPermissionStatus", "query", "requestPermission", "saveWorkout"],
|
|
33
33
|
"himi_apps": ["canOpen", "current", "hostInfo", "open"],
|
|
34
34
|
"iap": ["appBinding", "consume", "entitlements", "finishTransaction", "getPaywallConfig", "getProducts", "getUnfinishedTransactions", "purchase", "purchaseForVerification", "restore"],
|
|
@@ -20,6 +20,11 @@ async function alert(options) {
|
|
|
20
20
|
if (options.confirmLabel) params.confirmLabel = options.confirmLabel;
|
|
21
21
|
if (options.cancelLabel) params.cancelLabel = options.cancelLabel;
|
|
22
22
|
if (options.destructive) params.destructive = true;
|
|
23
|
+
if (options.confirm) {
|
|
24
|
+
const { label, actionId, args } = options.confirm;
|
|
25
|
+
params.confirm = JSON.stringify(args === void 0 ? { label, actionId } : { label, actionId, args });
|
|
26
|
+
params.confirmLabel = label;
|
|
27
|
+
}
|
|
23
28
|
const r = await dispatch("capability.ui.alert", params);
|
|
24
29
|
return { confirmed: r?.confirmed === true || r?.confirmed === "true" };
|
|
25
30
|
}
|
|
@@ -20,17 +20,29 @@ function wixCall(method, path, body, readOptions) {
|
|
|
20
20
|
return readOptions?.site ? api.call(method, path, body, { "wix-site-id": readOptions.site }) : api.call(method, path, body);
|
|
21
21
|
}
|
|
22
22
|
function getLoyaltyProgram(readOptions) {
|
|
23
|
-
return wixCall("GET", "/loyalty/v1/program", void 0, readOptions);
|
|
23
|
+
return wixCall("GET", "/loyalty-programs/v1/program", void 0, readOptions);
|
|
24
|
+
}
|
|
25
|
+
function withLegacyRewardCost(reward) {
|
|
26
|
+
if (reward.requiredPoints !== void 0) return reward;
|
|
27
|
+
const configs = reward.discountAmount?.configsByTier ?? reward.couponReward?.fixedAmount?.configsByTier ?? reward.couponReward?.percentage?.configsByTier ?? reward.couponReward?.freeShipping?.configsByTier;
|
|
28
|
+
const base = configs?.filter((config) => !config.tierId);
|
|
29
|
+
if (base?.length !== 1) return reward;
|
|
30
|
+
const cost = base[0].costInPoints;
|
|
31
|
+
return typeof cost === "number" && Number.isFinite(cost) && cost >= 0 ? { ...reward, requiredPoints: cost } : reward;
|
|
24
32
|
}
|
|
25
33
|
function listLoyaltyRewards(readOptions) {
|
|
26
|
-
return wixCall("GET", "/loyalty/v1/rewards", void 0, readOptions);
|
|
34
|
+
return wixCall("GET", "/loyalty-rewards/v1/rewards", void 0, readOptions).then((response) => response.rewards ? { ...response, rewards: response.rewards.map(withLegacyRewardCost) } : response);
|
|
27
35
|
}
|
|
28
36
|
function listLoyaltyTiers(readOptions) {
|
|
29
|
-
return wixCall("GET", "/loyalty/v1/tiers", void 0, readOptions);
|
|
37
|
+
return wixCall("GET", "/loyalty-tiers/v1/tiers", void 0, readOptions);
|
|
38
|
+
}
|
|
39
|
+
function listLoyaltyEarningRules(readOptions) {
|
|
40
|
+
return wixCall("GET", "/_api/loyalty-earning-rules/v1/earning-rules/rules", void 0, readOptions);
|
|
30
41
|
}
|
|
31
42
|
export {
|
|
32
43
|
getLoyaltyBffDashboard,
|
|
33
44
|
getLoyaltyProgram,
|
|
45
|
+
listLoyaltyEarningRules,
|
|
34
46
|
listLoyaltyRewards,
|
|
35
47
|
listLoyaltyTiers,
|
|
36
48
|
wixCall
|
|
@@ -81,10 +81,52 @@ function payableIdOf(participant) {
|
|
|
81
81
|
const pending = participant?.paymentPendingOptions;
|
|
82
82
|
return pending?.purchaseFlowId || pending?.snapshotId || pending?.orderId || "";
|
|
83
83
|
}
|
|
84
|
+
var MEMBER_ENROLLMENT_STATUSES = {
|
|
85
|
+
joined: "JOINED",
|
|
86
|
+
suspended: "SUSPENDED",
|
|
87
|
+
unknown: "UNKNOWN_ENROLLMENT_STATUS"
|
|
88
|
+
};
|
|
89
|
+
var MEMBER_FINISHED_PROGRESS_STATUSES = ["COMPLETED", "FAILED"];
|
|
90
|
+
function queryMemberParticipants(opts) {
|
|
91
|
+
if (!opts?.memberId) throw new Error("queryMemberParticipants: memberId is required");
|
|
92
|
+
const limit = opts.limit ?? 100;
|
|
93
|
+
const query = opts.cursor ? { cursorPaging: { limit, cursor: opts.cursor } } : {
|
|
94
|
+
filter: {
|
|
95
|
+
memberId: opts.memberId,
|
|
96
|
+
$or: [
|
|
97
|
+
{ enrollmentStatus: { $in: [MEMBER_ENROLLMENT_STATUSES.joined, MEMBER_ENROLLMENT_STATUSES.suspended] } },
|
|
98
|
+
{ enrollmentStatus: MEMBER_ENROLLMENT_STATUSES.unknown, progressStatus: { $in: [...MEMBER_FINISHED_PROGRESS_STATUSES] } }
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
cursorPaging: { limit }
|
|
102
|
+
};
|
|
103
|
+
return wixCall("POST", "/online-programs/v3/participants/query", { query, fields: ["PROGRESS"] });
|
|
104
|
+
}
|
|
105
|
+
function getParticipationStats(programIds) {
|
|
106
|
+
const ids = [...new Set((programIds ?? []).filter((id) => typeof id === "string" && id))];
|
|
107
|
+
if (!ids.length) return Promise.resolve({ participationStats: [] });
|
|
108
|
+
return wixCall("POST", "/online-programs/v3/participants/stats", { programIds: ids });
|
|
109
|
+
}
|
|
110
|
+
function getCurrentJoinApplication(programId) {
|
|
111
|
+
if (!programId) throw new Error("getCurrentJoinApplication: programId is required");
|
|
112
|
+
return wixCall(
|
|
113
|
+
"GET",
|
|
114
|
+
`/online-programs/participants/v3/join-applications/current/${encodeURIComponent(programId)}`
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
function listProgramCategories() {
|
|
118
|
+
return wixCall("GET", "/_api/program-categories-service/v3/categories");
|
|
119
|
+
}
|
|
84
120
|
export {
|
|
121
|
+
MEMBER_ENROLLMENT_STATUSES,
|
|
122
|
+
MEMBER_FINISHED_PROGRESS_STATUSES,
|
|
123
|
+
getCurrentJoinApplication,
|
|
124
|
+
getParticipationStats,
|
|
85
125
|
getProgram,
|
|
86
126
|
joinProgram,
|
|
127
|
+
listProgramCategories,
|
|
87
128
|
payableIdOf,
|
|
129
|
+
queryMemberParticipants,
|
|
88
130
|
queryParticipants,
|
|
89
131
|
queryPrograms,
|
|
90
132
|
searchMemberParticipation
|