File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import type {
1515} from '@forgerock/journey-client/types' ;
1616
1717import { interpolate } from '$core/_utilities/i18n.utilities' ;
18- import type { PolicyParams } from '@forgerock/javascript-sdk/src/auth/interfaces' ;
1918
2019/** *********************************************
2120 * INTERFACES AND TYPES
@@ -27,7 +26,8 @@ export interface Policy {
2726 params : Record < string , unknown > ;
2827}
2928export interface FailedPolicy {
30- params : Partial < PolicyParams > | undefined ;
29+ // TODO: PolicyParams must be re-exported by journey-client from forgerock/sdk-types, until then we derive the type like below
30+ params : PolicyRequirement [ 'params' ] ;
3131 policyRequirement : string ;
3232 restructured : RestructuredParam [ ] ;
3333}
Original file line number Diff line number Diff line change 99
1010import { expect } from 'storybook/test' ;
1111import { callbackType } from '@forgerock/journey-client' ;
12- import { FRDevice } from '@forgerock/javascript-sdk ' ;
12+ import { Device } from '@forgerock/journey-client/device ' ;
1313import { createJourneyStep } from '$journey/_utilities/step.mock' ;
1414import { deviceProfileMockNoMessage , deviceProfileMockMessage } from './device-profile.mock' ;
1515import DeviceProfile from './device-profile.story.svelte' ;
@@ -49,7 +49,7 @@ export const Interaction = {
4949 } ,
5050 play : async ( { canvasElement } ) => {
5151 const canvas = within ( canvasElement ) ;
52- const device = new FRDevice ( { } ) ;
52+ const device = new Device ( { } ) ;
5353 const cb = stepWithMessage . getCallbackOfType ( callbackType . DeviceProfileCallback ) ;
5454
5555 const msg = canvas . getByText ( 'This is a message' ) ;
Original file line number Diff line number Diff line change 88 -->
99
1010<script lang =" ts" >
11- import { Config } from ' @forgerock/javascript-sdk' ;
1211 import type { DeviceProfileCallback } from ' @forgerock/journey-client/types' ;
1312
1413 import Centered from ' $components/primitives/box/centered.svelte' ;
2120 export let callbackMetadata: Maybe <CallbackMetadata >;
2221 export let selfSubmitFunction: () => void ;
2322
24- // Now required due to logger utility
25- Config .set ({ serverConfig: { baseUrl: ' https://example.com/am/' } });
26-
2723 let mergedCallbackMetadata = {
2824 derived: {
2925 canForceUserInputOptionality: false ,
Original file line number Diff line number Diff line change 88 -->
99
1010<script lang =" ts" >
11- import { FRDevice } from ' @forgerock/javascript-sdk ' ;
11+ import { Device } from ' @forgerock/journey-client/device ' ;
1212 import type { DeviceProfileCallback } from ' @forgerock/journey-client/types' ;
13+
1314 import Spinner from ' $components/primitives/spinner/spinner.svelte' ;
1415 import Text from ' $components/primitives/text/text.svelte' ;
1516 import type {
2324 export let callbackMetadata: Maybe <CallbackMetadata > = null ;
2425 export let stepMetadata: Maybe <StepMetadata > = null ;
2526 export let selfSubmitFunction: SelfSubmitFunction ;
26- const device = new FRDevice ({});
27+ const device = new Device ({});
2728 let deviceMessage = (callback as DeviceProfileCallback ).getMessage ();
2829 async function initializeProfile() {
2930 const location = callback ?.isLocationRequired () ?? false ;
Original file line number Diff line number Diff line change 88 -->
99
1010<script lang =" ts" >
11- import { Config } from ' @forgerock/javascript-sdk' ;
1211 import type { JourneyStep } from ' @forgerock/journey-client/types' ;
1312 import type { z } from ' zod' ;
1413
3433 export let step: JourneyStep ;
3534 export let style: z .infer <typeof partialStyleSchema >;
3635
37- // Now required due to logger utility
38- Config .set ({ serverConfig: { baseUrl: ' https://example.com/am/' } });
39-
4036 let stageName;
4137 let stageJson;
4238
You can’t perform that action at this time.
0 commit comments