@wix/himalaya-cli 0.1378.0 → 0.1380.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/app-info/src/index.d.ts +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/extensions.d.ts +113 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/app-info.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +77 -0
- package/dist/cli.mjs +23 -24
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/importable-sdks.md +1 -1
- package/guides/sdk-reference.json +128 -2
- package/guides/wix-api-usage.md +2 -0
- package/package.json +2 -2
- package/templates/beauty-salon/config.ts +23 -0
- package/templates/beauty-salon/dev/index.ts +2611 -1
- package/templates/beauty-salon/himalaya.content.json +9 -0
- package/templates/beauty-salon/tier5-src/_shared/branded-lite-hosted.ts +3 -0
- package/templates/beauty-salon/tier5-src/_shared/member-access.ts +14 -0
- package/templates/beauty-salon/tier5-src/_shared/member-account-routes.ts +43 -0
- package/templates/beauty-salon/tier5-src/_shared/member-address.ts +129 -0
- package/templates/beauty-salon/tier5-src/_shared/saved-card.ts +20 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-address/index.ts +223 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-addresses/index.ts +202 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-wallet/index.ts +217 -0
- package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +17 -0
- package/templates/beauty-salon-owner/dev/index.ts +5 -27
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +99 -40
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-widget-oauth.ts +42 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-widget-view.ts +6 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +12 -1
- package/templates/branded-lite/config.ts +23 -0
- package/templates/branded-lite/dev/index.ts +2614 -2
- package/templates/branded-lite/himalaya.content.json +9 -0
- package/templates/branded-lite/tier5-src/_shared/branded-lite-hosted.ts +3 -0
- package/templates/branded-lite/tier5-src/_shared/member-access.ts +14 -0
- package/templates/branded-lite/tier5-src/_shared/member-account-routes.ts +43 -0
- package/templates/branded-lite/tier5-src/_shared/member-address.ts +129 -0
- package/templates/branded-lite/tier5-src/_shared/saved-card.ts +20 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-address/index.ts +223 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-addresses/index.ts +202 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-wallet/index.ts +217 -0
- package/templates/branded-lite/tier5-src/himi-store-account/index.ts +17 -0
- package/templates/community-club/dev/index.ts +3 -1
- package/templates/community-club/tier5-src/_shared/branded-lite-hosted.ts +3 -0
- package/templates/community-club/tier5-src/_shared/member-access.ts +14 -0
- package/templates/community-club/tier5-src/_shared/member-account-routes.ts +43 -0
- package/templates/community-club/tier5-src/himi-store-account/index.ts +17 -0
- package/templates/community-club-owner/dev/index.ts +5 -27
- package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +99 -40
- package/templates/community-club-owner/tier5-src/_shared/aria-widget-oauth.ts +42 -0
- package/templates/community-club-owner/tier5-src/_shared/aria-widget-view.ts +6 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +12 -1
- package/templates/events-meetups/dev/index.ts +3 -1
- package/templates/events-meetups/tier5-src/_shared/branded-lite-hosted.ts +3 -0
- package/templates/events-meetups/tier5-src/_shared/member-access.ts +14 -0
- package/templates/events-meetups/tier5-src/_shared/member-account-routes.ts +43 -0
- package/templates/events-meetups/tier5-src/himi-store-account/index.ts +17 -0
- package/templates/events-meetups-owner/dev/index.ts +5 -27
- package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +99 -40
- package/templates/events-meetups-owner/tier5-src/_shared/aria-widget-oauth.ts +42 -0
- package/templates/events-meetups-owner/tier5-src/_shared/aria-widget-view.ts +6 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +12 -1
- package/templates/gym-fitness/config.ts +23 -0
- package/templates/gym-fitness/dev/index.ts +2611 -1
- package/templates/gym-fitness/himalaya.content.json +9 -0
- package/templates/gym-fitness/tier5-src/_shared/branded-lite-hosted.ts +3 -0
- package/templates/gym-fitness/tier5-src/_shared/member-access.ts +14 -0
- package/templates/gym-fitness/tier5-src/_shared/member-account-routes.ts +43 -0
- package/templates/gym-fitness/tier5-src/_shared/member-address.ts +129 -0
- package/templates/gym-fitness/tier5-src/_shared/saved-card.ts +20 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-address/index.ts +223 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-addresses/index.ts +202 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-wallet/index.ts +217 -0
- package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +17 -0
- package/templates/gym-fitness-owner/dev/index.ts +5 -27
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +99 -40
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-widget-oauth.ts +42 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-widget-view.ts +6 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +12 -1
- package/templates/nonprofit-cause/config.ts +7 -0
- package/templates/nonprofit-cause/dev/index.ts +762 -1
- package/templates/nonprofit-cause/himalaya.content.json +3 -0
- package/templates/nonprofit-cause/tier5-src/_shared/branded-lite-hosted.ts +3 -0
- package/templates/nonprofit-cause/tier5-src/_shared/member-access.ts +14 -0
- package/templates/nonprofit-cause/tier5-src/_shared/member-account-routes.ts +43 -0
- package/templates/nonprofit-cause/tier5-src/_shared/saved-card.ts +20 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-wallet/index.ts +217 -0
- package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +17 -0
- package/templates/nonprofit-cause-owner/dev/index.ts +5 -27
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +99 -40
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-widget-oauth.ts +42 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-widget-view.ts +6 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +12 -1
- package/templates/owner-lite/dev/index.ts +5 -27
- package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +99 -40
- package/templates/owner-lite/tier5-src/_shared/aria-widget-oauth.ts +42 -0
- package/templates/owner-lite/tier5-src/_shared/aria-widget-view.ts +6 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +12 -1
- package/templates/podcast-creator/config.ts +7 -0
- package/templates/podcast-creator/dev/index.ts +762 -1
- package/templates/podcast-creator/himalaya.content.json +3 -0
- package/templates/podcast-creator/tier5-src/_shared/branded-lite-hosted.ts +3 -0
- package/templates/podcast-creator/tier5-src/_shared/member-access.ts +14 -0
- package/templates/podcast-creator/tier5-src/_shared/member-account-routes.ts +43 -0
- package/templates/podcast-creator/tier5-src/_shared/saved-card.ts +20 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-wallet/index.ts +217 -0
- package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +17 -0
- package/templates/podcast-creator-owner/dev/index.ts +5 -27
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +99 -40
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-widget-oauth.ts +42 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-widget-view.ts +6 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +12 -1
- package/templates/portfolio-creative/config.ts +23 -0
- package/templates/portfolio-creative/dev/index.ts +2611 -1
- package/templates/portfolio-creative/himalaya.content.json +9 -0
- package/templates/portfolio-creative/tier5-src/_shared/branded-lite-hosted.ts +3 -0
- package/templates/portfolio-creative/tier5-src/_shared/member-access.ts +14 -0
- package/templates/portfolio-creative/tier5-src/_shared/member-account-routes.ts +43 -0
- package/templates/portfolio-creative/tier5-src/_shared/member-address.ts +129 -0
- package/templates/portfolio-creative/tier5-src/_shared/saved-card.ts +20 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-address/index.ts +223 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-addresses/index.ts +202 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-wallet/index.ts +217 -0
- package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +17 -0
- package/templates/portfolio-creative-owner/dev/index.ts +5 -27
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +99 -40
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-widget-oauth.ts +42 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-widget-view.ts +6 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +12 -1
- package/templates/restaurant/config.ts +23 -0
- package/templates/restaurant/dev/index.ts +2611 -1
- package/templates/restaurant/himalaya.content.json +9 -0
- package/templates/restaurant/tier5-src/_shared/branded-lite-hosted.ts +3 -0
- package/templates/restaurant/tier5-src/_shared/member-access.ts +14 -0
- package/templates/restaurant/tier5-src/_shared/member-account-routes.ts +43 -0
- package/templates/restaurant/tier5-src/_shared/member-address.ts +129 -0
- package/templates/restaurant/tier5-src/_shared/saved-card.ts +20 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-address/index.ts +223 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-addresses/index.ts +202 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-wallet/index.ts +217 -0
- package/templates/restaurant/tier5-src/himi-store-account/index.ts +17 -0
- package/templates/restaurant-owner/dev/index.ts +5 -27
- package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +99 -40
- package/templates/restaurant-owner/tier5-src/_shared/aria-widget-oauth.ts +42 -0
- package/templates/restaurant-owner/tier5-src/_shared/aria-widget-view.ts +6 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +12 -1
- package/templates/retail-store/config.ts +23 -0
- package/templates/retail-store/dev/index.ts +2611 -1
- package/templates/retail-store/himalaya.content.json +9 -0
- package/templates/retail-store/tier5-src/_shared/branded-lite-hosted.ts +3 -0
- package/templates/retail-store/tier5-src/_shared/member-access.ts +14 -0
- package/templates/retail-store/tier5-src/_shared/member-account-routes.ts +43 -0
- package/templates/retail-store/tier5-src/_shared/member-address.ts +129 -0
- package/templates/retail-store/tier5-src/_shared/saved-card.ts +20 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-address/index.ts +223 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-addresses/index.ts +202 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-wallet/index.ts +217 -0
- package/templates/retail-store/tier5-src/himi-store-account/index.ts +17 -0
- package/templates/retail-store-owner/dev/index.ts +5 -27
- package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +99 -40
- package/templates/retail-store-owner/tier5-src/_shared/aria-widget-oauth.ts +42 -0
- package/templates/retail-store-owner/tier5-src/_shared/aria-widget-view.ts +6 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +12 -1
- package/templates/yoga-studio/config.ts +7 -0
- package/templates/yoga-studio/dev/index.ts +762 -1
- package/templates/yoga-studio/himalaya.content.json +3 -0
- package/templates/yoga-studio/tier5-src/_shared/branded-lite-hosted.ts +3 -0
- package/templates/yoga-studio/tier5-src/_shared/member-access.ts +14 -0
- package/templates/yoga-studio/tier5-src/_shared/member-account-routes.ts +43 -0
- package/templates/yoga-studio/tier5-src/_shared/saved-card.ts +20 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-wallet/index.ts +217 -0
- package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +17 -0
- package/templates/yoga-studio-owner/dev/index.ts +5 -27
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +99 -40
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-widget-oauth.ts +42 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-widget-view.ts +6 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +12 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Disclose, WidgetView } from "./aria-widget-view.js";
|
|
2
|
+
import { isWebUrl } from "./aria-widget-model.js";
|
|
3
|
+
|
|
4
|
+
export interface OAuthCopy {
|
|
5
|
+
title: string; body: string; pending: string; authorize: string; decline: string;
|
|
6
|
+
done: string; authorized: string; declined: string; openFailed: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const DEFAULT_OAUTH_COPY: OAuthCopy = {
|
|
10
|
+
title: "Connect an account", body: "Authorize access to continue this task.",
|
|
11
|
+
pending: "Finish authorization in your browser, then return and choose Done.",
|
|
12
|
+
authorize: "Authorize", decline: "Decline", done: "Done",
|
|
13
|
+
authorized: "Authorized", declined: "Declined",
|
|
14
|
+
openFailed: "Couldn't open authorization. Try again or decline.",
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// These instructions are wire content from the native Aria client, not copy.
|
|
18
|
+
export const OAUTH_AUTHORIZED_NOTE = "The user completed the OAuth authorization flow. Please retry the previous tool call.";
|
|
19
|
+
export const OAUTH_DECLINED_NOTE = "The user declined OAuth authorization. Do not retry the tool.";
|
|
20
|
+
|
|
21
|
+
/** A browser-open result is not an OAuth callback. Only the owner's subsequent
|
|
22
|
+
* Done action sends completion. The destination is disclosed by the same helper
|
|
23
|
+
* as every other widget URL; no guessed server callback is invoked. */
|
|
24
|
+
export function oauthView(
|
|
25
|
+
view: WidgetView, rawUrl: string, disclose: Disclose,
|
|
26
|
+
copy: OAuthCopy = DEFAULT_OAUTH_COPY, phase: "pending" | "authorizing" = "pending",
|
|
27
|
+
): WidgetView {
|
|
28
|
+
const url = isWebUrl(rawUrl.trim()) ? rawUrl.trim() : "";
|
|
29
|
+
const authorizing = phase === "authorizing" && !!url;
|
|
30
|
+
return {
|
|
31
|
+
...view, notice: "", noticeHidden: true, hidden: false, oauthPhase: authorizing ? "authorizing" : "pending",
|
|
32
|
+
oauthAuthorizationUrl: url,
|
|
33
|
+
title: copy.title, titleHidden: !copy.title,
|
|
34
|
+
text: authorizing ? copy.pending : copy.body, textHidden: false,
|
|
35
|
+
primaryLabel: authorizing ? copy.done : disclose({ label: copy.authorize, url }),
|
|
36
|
+
primaryUrl: authorizing ? "" : url,
|
|
37
|
+
primaryHidden: !url, primaryDisabled: false, primaryEnabled: true,
|
|
38
|
+
primaryRespondText: authorizing ? `${copy.authorized}\n<HIDDEN>${OAUTH_AUTHORIZED_NOTE}</HIDDEN>` : "",
|
|
39
|
+
secondaryLabel: copy.decline, secondaryHidden: false, secondaryUrl: "",
|
|
40
|
+
secondaryRespondText: `${copy.declined}\n<HIDDEN>${OAUTH_DECLINED_NOTE}</HIDDEN>`,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import type { NormalizedWidget, WidgetKind, WidgetOption } from "./aria-widget-model.js";
|
|
16
16
|
import { SELECTED_TOKEN, VALUES_TOKEN, isWebUrl, stripMarkdown } from "./aria-widget-model.js";
|
|
17
|
+
import { oauthView } from "./aria-widget-oauth.js";
|
|
17
18
|
import { composeGenericCard } from "./aria-generic-widget.js";
|
|
18
19
|
import { normalizeWidget } from "./aria-widget-kinds.js";
|
|
19
20
|
import { scanEnvelopes, widgetsOfParts } from "./aria-widgets.js";
|
|
@@ -127,6 +128,8 @@ export interface WidgetStep {
|
|
|
127
128
|
/** The active widget, as the screen reads it. */
|
|
128
129
|
export interface WidgetView {
|
|
129
130
|
kind: WidgetCase;
|
|
131
|
+
oauthPhase?: "pending" | "authorizing";
|
|
132
|
+
oauthAuthorizationUrl?: string;
|
|
130
133
|
/** Transcript row that owns this widget; prevents state carrying into a later
|
|
131
134
|
* identical-looking ask. */
|
|
132
135
|
sourceMessageId?: string;
|
|
@@ -1021,6 +1024,9 @@ export function viewOf(
|
|
|
1021
1024
|
// A questionnaire is shown one question at a time; its on-screen fields are
|
|
1022
1025
|
// derived, never stored, so they start from the same function every later
|
|
1023
1026
|
// change goes through. The worker re-derives with its own copy.
|
|
1027
|
+
if (w.kind === "OAUTH_REQUIRED") {
|
|
1028
|
+
return oauthView(view, typeof extra.authorizationUrl === "string" ? extra.authorizationUrl : "", disclose);
|
|
1029
|
+
}
|
|
1024
1030
|
return w.kind === "QUESTIONNAIRE"
|
|
1025
1031
|
? questionnaireSynced(view, 0, DEFAULT_QUESTIONNAIRE_COPY, false)
|
|
1026
1032
|
: view;
|
|
@@ -248,6 +248,17 @@ const core = createAriaChat({
|
|
|
248
248
|
// sentence around it is localized.
|
|
249
249
|
mentionItemsFailed: (category: string) =>
|
|
250
250
|
copyTemplate("ownerAria.mention.itemsFailed", "Couldn't load {category}.", { category }),
|
|
251
|
+
oauth: {
|
|
252
|
+
title: () => copyParam("ownerAria.oauth.title", "Connect an account"),
|
|
253
|
+
body: () => copyParam("ownerAria.oauth.body", "Authorize access to continue this task."),
|
|
254
|
+
pending: () => copyParam("ownerAria.oauth.pending", "Finish authorization in your browser, then return and choose Done."),
|
|
255
|
+
authorize: () => copyParam("ownerAria.oauth.authorize", "Authorize"),
|
|
256
|
+
decline: () => copyParam("ownerAria.oauth.decline", "Decline"),
|
|
257
|
+
done: () => copyParam("ownerAria.oauth.done", "Done"),
|
|
258
|
+
authorized: () => copyParam("ownerAria.oauth.authorized", "Authorized"),
|
|
259
|
+
declined: () => copyParam("ownerAria.oauth.declined", "Declined"),
|
|
260
|
+
openFailed: () => copyParam("ownerAria.oauth.openFailed", "Couldn't open authorization. Try again or decline."),
|
|
261
|
+
},
|
|
251
262
|
widgetItemsFailed: () => copyParam("ownerAria.widget.itemsFailed", "Couldn't load these items."),
|
|
252
263
|
widgetItemsUnavailable: () => copyParam("ownerAria.widget.itemsUnavailable", "Items aren't available here."),
|
|
253
264
|
attachUploading: () => copyParam("ownerAria.attach.uploading", "Uploading…"),
|
|
@@ -432,7 +443,7 @@ const svc = defineService<AriaChatState, {
|
|
|
432
443
|
// moved on must not commit its pre-await snapshot over the new one.
|
|
433
444
|
copyMessage: (s: AriaChatState, arg?: AriaActionArg) => Promise<AriaChatState | undefined>;
|
|
434
445
|
regenerate: (s: AriaChatState) => Promise<AriaChatState>;
|
|
435
|
-
widgetPrimary: (s: AriaChatState) => Promise<AriaChatState>;
|
|
446
|
+
widgetPrimary: (s: AriaChatState) => Promise<AriaChatState | undefined>;
|
|
436
447
|
widgetSecondary: (s: AriaChatState) => Promise<AriaChatState>;
|
|
437
448
|
widgetToggle: (s: AriaChatState, arg?: AriaActionArg) => AriaChatState;
|
|
438
449
|
widgetSelectOne: (s: AriaChatState, arg?: AriaActionArg) => AriaChatState;
|
|
@@ -93,6 +93,13 @@ export default defineApp({
|
|
|
93
93
|
"parentScreenId": "himi_account",
|
|
94
94
|
"tabId": "profile"
|
|
95
95
|
},
|
|
96
|
+
{
|
|
97
|
+
"screenId": "himi_wallet",
|
|
98
|
+
"isPublic": false,
|
|
99
|
+
"paramKeys": [],
|
|
100
|
+
"parentScreenId": "himi_account",
|
|
101
|
+
"tabId": "profile"
|
|
102
|
+
},
|
|
96
103
|
{
|
|
97
104
|
"screenId": "himi_plans",
|
|
98
105
|
"isPublic": true,
|