@wix/himalaya-cli 0.1278.0 → 0.1280.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 (41) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +33 -0
  2. package/dist/cli.mjs +52 -2
  3. package/guides/component-reference.json +3 -2
  4. package/guides/component-reference.md +28 -1
  5. package/package.json +4 -3
  6. package/templates/beauty-salon/config.ts +2 -1
  7. package/templates/beauty-salon/dev/index.ts +2 -1
  8. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +12 -4
  9. package/templates/branded-lite/config.ts +13 -2
  10. package/templates/branded-lite/dev/index.ts +520 -170
  11. package/templates/branded-lite/tier5-src/_shared/vod.ts +71 -0
  12. package/templates/branded-lite/tier5-src/himi-branded-lite-video/index.ts +98 -0
  13. package/templates/branded-lite/tier5-src/himi-branded-lite-videos/index.ts +11 -20
  14. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +12 -4
  15. package/templates/community-club/config.ts +2 -1
  16. package/templates/community-club/dev/index.ts +2 -1
  17. package/templates/community-club/tier5-src/himi-store-account/index.ts +12 -4
  18. package/templates/events-meetups/config.ts +2 -1
  19. package/templates/events-meetups/dev/index.ts +2 -1
  20. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +12 -4
  21. package/templates/gym-fitness/config.ts +2 -1
  22. package/templates/gym-fitness/dev/index.ts +2 -1
  23. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +12 -4
  24. package/templates/nonprofit-cause/config.ts +2 -1
  25. package/templates/nonprofit-cause/dev/index.ts +2 -1
  26. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +12 -4
  27. package/templates/podcast-creator/config.ts +2 -1
  28. package/templates/podcast-creator/dev/index.ts +2 -1
  29. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +12 -4
  30. package/templates/portfolio-creative/config.ts +2 -1
  31. package/templates/portfolio-creative/dev/index.ts +2 -1
  32. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +12 -4
  33. package/templates/restaurant/config.ts +2 -1
  34. package/templates/restaurant/dev/index.ts +2 -1
  35. package/templates/restaurant/tier5-src/himi-store-account/index.ts +12 -4
  36. package/templates/retail-store/config.ts +2 -1
  37. package/templates/retail-store/dev/index.ts +2 -1
  38. package/templates/retail-store/tier5-src/himi-store-account/index.ts +12 -4
  39. package/templates/yoga-studio/config.ts +2 -1
  40. package/templates/yoga-studio/dev/index.ts +2 -1
  41. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +12 -4
@@ -19,6 +19,7 @@ interface AuthRouteInput {
19
19
  contextName?: string;
20
20
  returnScreenId?: string;
21
21
  returnId?: string;
22
+ returnChannelId?: string;
22
23
  }
23
24
 
24
25
  // The screen's boot input survives refresh; consuming it must survive too.
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
37
38
  }
38
39
 
39
40
  /** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
40
- function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
41
+ function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
41
42
  const route = routeInputConsumed ? {} : routeInput();
42
43
  return {
43
44
  authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
44
45
  authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
45
46
  returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
46
47
  returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
48
+ returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
47
49
  };
48
50
  }
49
51
 
50
52
  /** Where a successful sign-in returns to, or null. Never Account itself — that would
51
53
  * only push a second copy of the screen the member is already on. */
52
- function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
54
+ function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
53
55
  if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
54
- return s.returnId ? { screenId: s.returnScreenId, args: { id: s.returnId } } : { screenId: s.returnScreenId };
56
+ return s.returnId || s.returnChannelId ? {
57
+ screenId: s.returnScreenId,
58
+ args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
59
+ } : { screenId: s.returnScreenId };
55
60
  }
56
61
 
57
62
  /** Resume the member-only screen that sent the visitor here, once. The return path is
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
61
66
  const target = resumeTarget(next);
62
67
  if (!next.isMember || !target) return next;
63
68
  routeInputConsumed = true;
64
- return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
69
+ return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
65
70
  }
66
71
 
67
72
  // Actions are not serialized: two quick Sign in taps both run against the pre-tap
@@ -165,6 +170,7 @@ interface S {
165
170
  authContextName: string;
166
171
  returnScreenId: string;
167
172
  returnId: string;
173
+ returnChannelId: string;
168
174
  /** Show Continue when an already-signed-in member opens Account with a return path.
169
175
  * A sign-in made here resumes on its own (resumeAfterAuth). */
170
176
  hasReturnPath: boolean;
@@ -364,6 +370,7 @@ const svc = defineService<S, {
364
370
  authContextName: "",
365
371
  returnScreenId: "",
366
372
  returnId: "",
373
+ returnChannelId: "",
367
374
  hasReturnPath: false,
368
375
  noReturnPath: true,
369
376
  returnCta: "Continue",
@@ -475,6 +482,7 @@ const svc = defineService<S, {
475
482
  authContextName: "",
476
483
  returnScreenId: "",
477
484
  returnId: "",
485
+ returnChannelId: "",
478
486
  };
479
487
  return derive(cleared);
480
488
  },
@@ -217,7 +217,8 @@ export default defineApp({
217
217
  "intent",
218
218
  "contextName",
219
219
  "returnScreenId",
220
- "returnId"
220
+ "returnId",
221
+ "returnChannelId"
221
222
  ],
222
223
  "parentScreenId": "",
223
224
  "tabId": "profile"
@@ -2903,7 +2903,8 @@ const SCREENS = runtimeSetting({
2903
2903
  "actionId": "himi.open",
2904
2904
  "params": {
2905
2905
  "screenId": "$service:himiStoreAccount.returnScreenId",
2906
- "id": "$service:himiStoreAccount.returnId"
2906
+ "id": "$service:himiStoreAccount.returnId",
2907
+ "channelId": "$service:himiStoreAccount.returnChannelId"
2907
2908
  }
2908
2909
  }
2909
2910
  }
@@ -19,6 +19,7 @@ interface AuthRouteInput {
19
19
  contextName?: string;
20
20
  returnScreenId?: string;
21
21
  returnId?: string;
22
+ returnChannelId?: string;
22
23
  }
23
24
 
24
25
  // The screen's boot input survives refresh; consuming it must survive too.
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
37
38
  }
38
39
 
39
40
  /** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
40
- function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
41
+ function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
41
42
  const route = routeInputConsumed ? {} : routeInput();
42
43
  return {
43
44
  authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
44
45
  authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
45
46
  returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
46
47
  returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
48
+ returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
47
49
  };
48
50
  }
49
51
 
50
52
  /** Where a successful sign-in returns to, or null. Never Account itself — that would
51
53
  * only push a second copy of the screen the member is already on. */
52
- function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
54
+ function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
53
55
  if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
54
- return s.returnId ? { screenId: s.returnScreenId, args: { id: s.returnId } } : { screenId: s.returnScreenId };
56
+ return s.returnId || s.returnChannelId ? {
57
+ screenId: s.returnScreenId,
58
+ args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
59
+ } : { screenId: s.returnScreenId };
55
60
  }
56
61
 
57
62
  /** Resume the member-only screen that sent the visitor here, once. The return path is
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
61
66
  const target = resumeTarget(next);
62
67
  if (!next.isMember || !target) return next;
63
68
  routeInputConsumed = true;
64
- return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
69
+ return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
65
70
  }
66
71
 
67
72
  // Actions are not serialized: two quick Sign in taps both run against the pre-tap
@@ -165,6 +170,7 @@ interface S {
165
170
  authContextName: string;
166
171
  returnScreenId: string;
167
172
  returnId: string;
173
+ returnChannelId: string;
168
174
  /** Show Continue when an already-signed-in member opens Account with a return path.
169
175
  * A sign-in made here resumes on its own (resumeAfterAuth). */
170
176
  hasReturnPath: boolean;
@@ -364,6 +370,7 @@ const svc = defineService<S, {
364
370
  authContextName: "",
365
371
  returnScreenId: "",
366
372
  returnId: "",
373
+ returnChannelId: "",
367
374
  hasReturnPath: false,
368
375
  noReturnPath: true,
369
376
  returnCta: "Continue",
@@ -475,6 +482,7 @@ const svc = defineService<S, {
475
482
  authContextName: "",
476
483
  returnScreenId: "",
477
484
  returnId: "",
485
+ returnChannelId: "",
478
486
  };
479
487
  return derive(cleared);
480
488
  },
@@ -240,7 +240,8 @@ export default defineApp({
240
240
  "intent",
241
241
  "contextName",
242
242
  "returnScreenId",
243
- "returnId"
243
+ "returnId",
244
+ "returnChannelId"
244
245
  ],
245
246
  "parentScreenId": "",
246
247
  "tabId": "profile"
@@ -2861,7 +2861,8 @@ const SCREENS = runtimeSetting({
2861
2861
  "actionId": "himi.open",
2862
2862
  "params": {
2863
2863
  "screenId": "$service:himiStoreAccount.returnScreenId",
2864
- "id": "$service:himiStoreAccount.returnId"
2864
+ "id": "$service:himiStoreAccount.returnId",
2865
+ "channelId": "$service:himiStoreAccount.returnChannelId"
2865
2866
  }
2866
2867
  }
2867
2868
  }
@@ -19,6 +19,7 @@ interface AuthRouteInput {
19
19
  contextName?: string;
20
20
  returnScreenId?: string;
21
21
  returnId?: string;
22
+ returnChannelId?: string;
22
23
  }
23
24
 
24
25
  // The screen's boot input survives refresh; consuming it must survive too.
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
37
38
  }
38
39
 
39
40
  /** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
40
- function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
41
+ function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
41
42
  const route = routeInputConsumed ? {} : routeInput();
42
43
  return {
43
44
  authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
44
45
  authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
45
46
  returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
46
47
  returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
48
+ returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
47
49
  };
48
50
  }
49
51
 
50
52
  /** Where a successful sign-in returns to, or null. Never Account itself — that would
51
53
  * only push a second copy of the screen the member is already on. */
52
- function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
54
+ function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
53
55
  if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
54
- return s.returnId ? { screenId: s.returnScreenId, args: { id: s.returnId } } : { screenId: s.returnScreenId };
56
+ return s.returnId || s.returnChannelId ? {
57
+ screenId: s.returnScreenId,
58
+ args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
59
+ } : { screenId: s.returnScreenId };
55
60
  }
56
61
 
57
62
  /** Resume the member-only screen that sent the visitor here, once. The return path is
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
61
66
  const target = resumeTarget(next);
62
67
  if (!next.isMember || !target) return next;
63
68
  routeInputConsumed = true;
64
- return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
69
+ return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
65
70
  }
66
71
 
67
72
  // Actions are not serialized: two quick Sign in taps both run against the pre-tap
@@ -165,6 +170,7 @@ interface S {
165
170
  authContextName: string;
166
171
  returnScreenId: string;
167
172
  returnId: string;
173
+ returnChannelId: string;
168
174
  /** Show Continue when an already-signed-in member opens Account with a return path.
169
175
  * A sign-in made here resumes on its own (resumeAfterAuth). */
170
176
  hasReturnPath: boolean;
@@ -364,6 +370,7 @@ const svc = defineService<S, {
364
370
  authContextName: "",
365
371
  returnScreenId: "",
366
372
  returnId: "",
373
+ returnChannelId: "",
367
374
  hasReturnPath: false,
368
375
  noReturnPath: true,
369
376
  returnCta: "Continue",
@@ -475,6 +482,7 @@ const svc = defineService<S, {
475
482
  authContextName: "",
476
483
  returnScreenId: "",
477
484
  returnId: "",
485
+ returnChannelId: "",
478
486
  };
479
487
  return derive(cleared);
480
488
  },
@@ -201,7 +201,8 @@ export default defineApp({
201
201
  "intent",
202
202
  "contextName",
203
203
  "returnScreenId",
204
- "returnId"
204
+ "returnId",
205
+ "returnChannelId"
205
206
  ],
206
207
  "parentScreenId": "",
207
208
  "tabId": "profile"
@@ -2829,7 +2829,8 @@ const SCREENS = runtimeSetting({
2829
2829
  "actionId": "himi.open",
2830
2830
  "params": {
2831
2831
  "screenId": "$service:himiStoreAccount.returnScreenId",
2832
- "id": "$service:himiStoreAccount.returnId"
2832
+ "id": "$service:himiStoreAccount.returnId",
2833
+ "channelId": "$service:himiStoreAccount.returnChannelId"
2833
2834
  }
2834
2835
  }
2835
2836
  }
@@ -19,6 +19,7 @@ interface AuthRouteInput {
19
19
  contextName?: string;
20
20
  returnScreenId?: string;
21
21
  returnId?: string;
22
+ returnChannelId?: string;
22
23
  }
23
24
 
24
25
  // The screen's boot input survives refresh; consuming it must survive too.
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
37
38
  }
38
39
 
39
40
  /** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
40
- function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
41
+ function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
41
42
  const route = routeInputConsumed ? {} : routeInput();
42
43
  return {
43
44
  authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
44
45
  authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
45
46
  returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
46
47
  returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
48
+ returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
47
49
  };
48
50
  }
49
51
 
50
52
  /** Where a successful sign-in returns to, or null. Never Account itself — that would
51
53
  * only push a second copy of the screen the member is already on. */
52
- function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
54
+ function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
53
55
  if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
54
- return s.returnId ? { screenId: s.returnScreenId, args: { id: s.returnId } } : { screenId: s.returnScreenId };
56
+ return s.returnId || s.returnChannelId ? {
57
+ screenId: s.returnScreenId,
58
+ args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
59
+ } : { screenId: s.returnScreenId };
55
60
  }
56
61
 
57
62
  /** Resume the member-only screen that sent the visitor here, once. The return path is
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
61
66
  const target = resumeTarget(next);
62
67
  if (!next.isMember || !target) return next;
63
68
  routeInputConsumed = true;
64
- return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
69
+ return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
65
70
  }
66
71
 
67
72
  // Actions are not serialized: two quick Sign in taps both run against the pre-tap
@@ -165,6 +170,7 @@ interface S {
165
170
  authContextName: string;
166
171
  returnScreenId: string;
167
172
  returnId: string;
173
+ returnChannelId: string;
168
174
  /** Show Continue when an already-signed-in member opens Account with a return path.
169
175
  * A sign-in made here resumes on its own (resumeAfterAuth). */
170
176
  hasReturnPath: boolean;
@@ -364,6 +370,7 @@ const svc = defineService<S, {
364
370
  authContextName: "",
365
371
  returnScreenId: "",
366
372
  returnId: "",
373
+ returnChannelId: "",
367
374
  hasReturnPath: false,
368
375
  noReturnPath: true,
369
376
  returnCta: "Continue",
@@ -475,6 +482,7 @@ const svc = defineService<S, {
475
482
  authContextName: "",
476
483
  returnScreenId: "",
477
484
  returnId: "",
485
+ returnChannelId: "",
478
486
  };
479
487
  return derive(cleared);
480
488
  },
@@ -192,7 +192,8 @@ export default defineApp({
192
192
  "intent",
193
193
  "contextName",
194
194
  "returnScreenId",
195
- "returnId"
195
+ "returnId",
196
+ "returnChannelId"
196
197
  ],
197
198
  "parentScreenId": "",
198
199
  "tabId": "profile"
@@ -2307,7 +2307,8 @@ const SCREENS = runtimeSetting({
2307
2307
  "actionId": "himi.open",
2308
2308
  "params": {
2309
2309
  "screenId": "$service:himiStoreAccount.returnScreenId",
2310
- "id": "$service:himiStoreAccount.returnId"
2310
+ "id": "$service:himiStoreAccount.returnId",
2311
+ "channelId": "$service:himiStoreAccount.returnChannelId"
2311
2312
  }
2312
2313
  }
2313
2314
  }
@@ -19,6 +19,7 @@ interface AuthRouteInput {
19
19
  contextName?: string;
20
20
  returnScreenId?: string;
21
21
  returnId?: string;
22
+ returnChannelId?: string;
22
23
  }
23
24
 
24
25
  // The screen's boot input survives refresh; consuming it must survive too.
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
37
38
  }
38
39
 
39
40
  /** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
40
- function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
41
+ function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
41
42
  const route = routeInputConsumed ? {} : routeInput();
42
43
  return {
43
44
  authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
44
45
  authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
45
46
  returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
46
47
  returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
48
+ returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
47
49
  };
48
50
  }
49
51
 
50
52
  /** Where a successful sign-in returns to, or null. Never Account itself — that would
51
53
  * only push a second copy of the screen the member is already on. */
52
- function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
54
+ function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
53
55
  if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
54
- return s.returnId ? { screenId: s.returnScreenId, args: { id: s.returnId } } : { screenId: s.returnScreenId };
56
+ return s.returnId || s.returnChannelId ? {
57
+ screenId: s.returnScreenId,
58
+ args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
59
+ } : { screenId: s.returnScreenId };
55
60
  }
56
61
 
57
62
  /** Resume the member-only screen that sent the visitor here, once. The return path is
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
61
66
  const target = resumeTarget(next);
62
67
  if (!next.isMember || !target) return next;
63
68
  routeInputConsumed = true;
64
- return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
69
+ return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
65
70
  }
66
71
 
67
72
  // Actions are not serialized: two quick Sign in taps both run against the pre-tap
@@ -165,6 +170,7 @@ interface S {
165
170
  authContextName: string;
166
171
  returnScreenId: string;
167
172
  returnId: string;
173
+ returnChannelId: string;
168
174
  /** Show Continue when an already-signed-in member opens Account with a return path.
169
175
  * A sign-in made here resumes on its own (resumeAfterAuth). */
170
176
  hasReturnPath: boolean;
@@ -364,6 +370,7 @@ const svc = defineService<S, {
364
370
  authContextName: "",
365
371
  returnScreenId: "",
366
372
  returnId: "",
373
+ returnChannelId: "",
367
374
  hasReturnPath: false,
368
375
  noReturnPath: true,
369
376
  returnCta: "Continue",
@@ -475,6 +482,7 @@ const svc = defineService<S, {
475
482
  authContextName: "",
476
483
  returnScreenId: "",
477
484
  returnId: "",
485
+ returnChannelId: "",
478
486
  };
479
487
  return derive(cleared);
480
488
  },
@@ -242,7 +242,8 @@ export default defineApp({
242
242
  "intent",
243
243
  "contextName",
244
244
  "returnScreenId",
245
- "returnId"
245
+ "returnId",
246
+ "returnChannelId"
246
247
  ],
247
248
  "parentScreenId": "",
248
249
  "tabId": "profile"
@@ -3326,7 +3326,8 @@ const SCREENS = runtimeSetting({
3326
3326
  "actionId": "himi.open",
3327
3327
  "params": {
3328
3328
  "screenId": "$service:himiStoreAccount.returnScreenId",
3329
- "id": "$service:himiStoreAccount.returnId"
3329
+ "id": "$service:himiStoreAccount.returnId",
3330
+ "channelId": "$service:himiStoreAccount.returnChannelId"
3330
3331
  }
3331
3332
  }
3332
3333
  }
@@ -19,6 +19,7 @@ interface AuthRouteInput {
19
19
  contextName?: string;
20
20
  returnScreenId?: string;
21
21
  returnId?: string;
22
+ returnChannelId?: string;
22
23
  }
23
24
 
24
25
  // The screen's boot input survives refresh; consuming it must survive too.
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
37
38
  }
38
39
 
39
40
  /** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
40
- function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
41
+ function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
41
42
  const route = routeInputConsumed ? {} : routeInput();
42
43
  return {
43
44
  authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
44
45
  authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
45
46
  returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
46
47
  returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
48
+ returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
47
49
  };
48
50
  }
49
51
 
50
52
  /** Where a successful sign-in returns to, or null. Never Account itself — that would
51
53
  * only push a second copy of the screen the member is already on. */
52
- function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
54
+ function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
53
55
  if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
54
- return s.returnId ? { screenId: s.returnScreenId, args: { id: s.returnId } } : { screenId: s.returnScreenId };
56
+ return s.returnId || s.returnChannelId ? {
57
+ screenId: s.returnScreenId,
58
+ args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
59
+ } : { screenId: s.returnScreenId };
55
60
  }
56
61
 
57
62
  /** Resume the member-only screen that sent the visitor here, once. The return path is
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
61
66
  const target = resumeTarget(next);
62
67
  if (!next.isMember || !target) return next;
63
68
  routeInputConsumed = true;
64
- return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
69
+ return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
65
70
  }
66
71
 
67
72
  // Actions are not serialized: two quick Sign in taps both run against the pre-tap
@@ -165,6 +170,7 @@ interface S {
165
170
  authContextName: string;
166
171
  returnScreenId: string;
167
172
  returnId: string;
173
+ returnChannelId: string;
168
174
  /** Show Continue when an already-signed-in member opens Account with a return path.
169
175
  * A sign-in made here resumes on its own (resumeAfterAuth). */
170
176
  hasReturnPath: boolean;
@@ -364,6 +370,7 @@ const svc = defineService<S, {
364
370
  authContextName: "",
365
371
  returnScreenId: "",
366
372
  returnId: "",
373
+ returnChannelId: "",
367
374
  hasReturnPath: false,
368
375
  noReturnPath: true,
369
376
  returnCta: "Continue",
@@ -475,6 +482,7 @@ const svc = defineService<S, {
475
482
  authContextName: "",
476
483
  returnScreenId: "",
477
484
  returnId: "",
485
+ returnChannelId: "",
478
486
  };
479
487
  return derive(cleared);
480
488
  },