@ledgerhq/device-management-kit 0.0.0-develop-20260312001221 → 0.0.0-develop-20260313001318
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/lib/cjs/package.json +1 -1
- package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +1 -1
- package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +2 -2
- package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js.map +1 -1
- package/lib/cjs/src/api/index.js +1 -1
- package/lib/cjs/src/api/index.js.map +2 -2
- package/lib/esm/package.json +1 -1
- package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +1 -1
- package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +2 -2
- package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js.map +1 -1
- package/lib/esm/src/api/index.js +1 -1
- package/lib/esm/src/api/index.js.map +3 -3
- package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts +1 -0
- package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts.map +1 -1
- package/lib/types/src/api/index.d.ts +1 -1
- package/lib/types/src/api/index.d.ts.map +1 -1
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +2 -2
package/lib/cjs/package.json
CHANGED
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"watch:builds": "pnpm ldmk-tool watch --entryPoints index.ts,src/**/*.ts --tsconfig tsconfig.prod.json",
|
|
65
65
|
"watch:types": "concurrently \"tsc --watch -p tsconfig.prod.json\" \"tsc-alias --watch -p tsconfig.prod.json\""
|
|
66
66
|
},
|
|
67
|
-
"version": "0.0.0-develop-
|
|
67
|
+
"version": "0.0.0-develop-20260313001318"
|
|
68
68
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
"use strict";var l=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var f=(p,t)=>{for(var a in t)l(p,a,{get:t[a],enumerable:!0})},y=(p,t,a,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of g(t))!E.call(p,r)&&r!==a&&l(p,r,{get:()=>t[r],enumerable:!(c=x(t,r))||c.enumerable});return p};var W=p=>y(l({},"__esModule",{value:!0}),p);var k={};f(k,{OpenAppWithDependenciesDeviceAction:()=>V});module.exports=W(k);var s=require("purify-ts"),n=require("xstate"),o=require("../../../device-action/model/UserInteractionRequired"),d=require("../../../device-action/os/Const"),m=require("../../../device-action/os/Errors"),A=require("../../../device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction"),h=require("../../../device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction"),D=require("../../../device-action/os/OpenAppDeviceAction/OpenAppDeviceAction"),v=require("../../../device-action/xstate-utils/XStateDeviceAction"),O=require("./types");class V extends v.XStateDeviceAction{makeStateMachine(t){const a=this.input.unlockTimeout??d.DEFAULT_UNLOCK_TIMEOUT_MS,c=new A.GetDeviceMetadataDeviceAction({input:{unlockTimeout:a,useSecureChannel:!0,forceUpdate:!1}}).makeStateMachine(t),r=new h.InstallOrUpdateAppsDeviceAction({input:{unlockTimeout:a,applications:[...this.input.dependencies,this.input.application],allowMissingApplication:this.input.allowMissingApplication??!1}}).makeStateMachine(t),I=new D.OpenAppDeviceAction({input:{unlockTimeout:a,appName:this.input.application.name}}).makeStateMachine(t);return(0,n.setup)({types:{input:{unlockTimeout:a},context:{},output:{}},actors:{getMetadata:c,installApps:r,openApp:I},guards:{hasError:({context:e})=>e._internalState.error!==null},actions:{assignErrorFromEvent:(0,n.assign)({_internalState:e=>({...e.context._internalState,error:e.event.error})})}}).createMachine({id:"OpenAppWithDependenciesDeviceAction",initial:"DeviceReady",context:e=>({input:{application:e.input.application,dependencies:e.input.dependencies,requireLatestFirmware:e.input.requireLatestFirmware,unlockTimeout:e.input.unlockTimeout},intermediateValue:{requiredUserInteraction:o.UserInteractionRequired.None,step:O.openAppWithDependenciesDAStateStep.GET_DEVICE_METADATA,installPlan:null},_internalState:{error:null,deviceMetadata:null,installResult:null}}),states:{DeviceReady:{always:[{target:"GetDeviceMetadata"}]},GetDeviceMetadata:{exit:(0,n.assign)({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:o.UserInteractionRequired.None})}),invoke:{id:"getMetadata",src:"getMetadata",input:e=>({unlockTimeout:e.context.input.unlockTimeout,useSecureChannel:!0,forceUpdate:!1}),onSnapshot:{actions:(0,n.assign)({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:e.event.snapshot.context.intermediateValue.requiredUserInteraction,deviceId:e.event.snapshot.context.intermediateValue.deviceId??e.context.intermediateValue.deviceId})})},onDone:{target:"GetDeviceMetadataCheck",actions:(0,n.assign)({_internalState:e=>e.event.output.caseOf({Right:i=>e.context.input.requireLatestFirmware&&i.firmwareUpdateContext.availableUpdate!==void 0?{...e.context._internalState,error:new m.UnsupportedFirmwareDAError("Firmware is not the latest version")}:{...e.context._internalState,deviceMetadata:i},Left:i=>({...e.context._internalState,error:i})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GetDeviceMetadataCheck:{always:[{target:"Error",guard:"hasError"},{target:"InstallDependencies"}]},InstallDependencies:{exit:(0,n.assign)({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:o.UserInteractionRequired.None})}),invoke:{src:"installApps",input:e=>({unlockTimeout:e.context.input.unlockTimeout,applications:[...e.context.input.dependencies,e.context.input.application],allowMissingApplication:this.input.allowMissingApplication??!1}),onSnapshot:{actions:(0,n.assign)({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:e.event.snapshot.context.intermediateValue.requiredUserInteraction,installPlan:e.event.snapshot.context.intermediateValue.installPlan,deviceId:e.event.snapshot.context.intermediateValue.deviceId??e.context.intermediateValue.deviceId})})},onDone:{target:"InstallDependenciesCheck",actions:(0,n.assign)({_internalState:e=>e.event.output.caseOf({Right:i=>({...e.context._internalState,installResult:i}),Left:i=>({...e.context._internalState,error:i})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},InstallDependenciesCheck:{always:[{guard:"hasError",target:"Error"},{target:"OpenApp"}]},OpenApp:{exit:(0,n.assign)({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:o.UserInteractionRequired.None})}),invoke:{src:"openApp",input:e=>({unlockTimeout:e.context.input.unlockTimeout,appName:e.context.input.application.name}),onSnapshot:{actions:(0,n.assign)({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:e.event.snapshot.context.intermediateValue.requiredUserInteraction,installPlan:null})})},onDone:{target:"OpenAppCheck",actions:(0,n.assign)({_internalState:e=>e.event.output.caseOf({Right:()=>e.context._internalState,Left:i=>({...e.context._internalState,error:i})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},OpenAppCheck:{always:[{guard:"hasError",target:"Error"},{target:"Success"}]},Success:{type:"final"},Error:{type:"final"}},output:e=>{const{context:i}=e,{error:u,deviceMetadata:M,installResult:S}=i._internalState;return u?(0,s.Left)(u):(0,s.Right)({deviceMetadata:M,installResult:S})}})}}0&&(module.exports={OpenAppWithDependenciesDeviceAction});
|
|
2
2
|
//# sourceMappingURL=OpenAppWithDependenciesDeviceAction.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.ts"],
|
|
4
|
-
"sourcesContent": ["import { Left, Right } from \"purify-ts\";\nimport { assign, setup } from \"xstate\";\n\nimport { type InternalApi } from \"@api/device-action/DeviceAction\";\nimport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nimport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nimport { UnsupportedFirmwareDAError } from \"@api/device-action/os/Errors\";\nimport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nimport type { GetDeviceMetadataDAOutput } from \"@api/device-action/os/GetDeviceMetadata/types\";\nimport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nimport type { InstallOrUpdateAppsDAOutput } from \"@api/device-action/os/InstallOrUpdateApps/types\";\nimport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nimport { type StateMachineTypes } from \"@api/device-action/xstate-utils/StateMachineTypes\";\nimport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\n\nimport {\n type OpenAppWithDependenciesDAError,\n type OpenAppWithDependenciesDAInput,\n type OpenAppWithDependenciesDAIntermediateValue,\n type OpenAppWithDependenciesDAOutput,\n openAppWithDependenciesDAStateStep,\n} from \"./types\";\n\ntype OpenAppWithDependenciesMachineInternalState = {\n readonly error: OpenAppWithDependenciesDAError | null;\n readonly deviceMetadata: GetDeviceMetadataDAOutput | null;\n readonly installResult: InstallOrUpdateAppsDAOutput | null;\n};\n\nexport class OpenAppWithDependenciesDeviceAction extends XStateDeviceAction<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAInput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue,\n OpenAppWithDependenciesMachineInternalState\n> {\n makeStateMachine(\n internalApi: InternalApi,\n ): DeviceActionStateMachine<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAInput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue,\n OpenAppWithDependenciesMachineInternalState\n > {\n type types = StateMachineTypes<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAInput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue,\n OpenAppWithDependenciesMachineInternalState\n >;\n\n const unlockTimeout = this.input.unlockTimeout ?? DEFAULT_UNLOCK_TIMEOUT_MS;\n\n const getMetadataMachine = new GetDeviceMetadataDeviceAction({\n input: {\n unlockTimeout,\n useSecureChannel: true,\n forceUpdate: false,\n },\n }).makeStateMachine(internalApi);\n\n const installAppsMachine = new InstallOrUpdateAppsDeviceAction({\n input: {\n unlockTimeout,\n applications: [...this.input.dependencies, this.input.application],\n allowMissingApplication: false,\n },\n }).makeStateMachine(internalApi);\n\n const openAppMachine = new OpenAppDeviceAction({\n input: {\n unlockTimeout,\n appName: this.input.application.name,\n },\n }).makeStateMachine(internalApi);\n\n return setup({\n types: {\n input: {\n unlockTimeout,\n } as types[\"input\"],\n context: {} as types[\"context\"],\n output: {} as types[\"output\"],\n },\n actors: {\n getMetadata: getMetadataMachine,\n installApps: installAppsMachine,\n openApp: openAppMachine,\n },\n guards: {\n hasError: ({ context }) => context._internalState.error !== null,\n },\n actions: {\n assignErrorFromEvent: assign({\n _internalState: (_) => ({\n ..._.context._internalState,\n error: _.event[\"error\"], // NOTE: it should never happen, the error is not typed anymore here\n }),\n }),\n },\n }).createMachine({\n id: \"OpenAppWithDependenciesDeviceAction\",\n initial: \"DeviceReady\",\n context: (_) => {\n return {\n input: {\n application: _.input.application,\n dependencies: _.input.dependencies,\n requireLatestFirmware: _.input.requireLatestFirmware,\n unlockTimeout: _.input.unlockTimeout,\n },\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.None,\n step: openAppWithDependenciesDAStateStep.GET_DEVICE_METADATA,\n installPlan: null,\n },\n _internalState: {\n error: null,\n deviceMetadata: null,\n installResult: null,\n },\n };\n },\n states: {\n DeviceReady: {\n always: [\n {\n target: \"GetDeviceMetadata\",\n },\n ],\n },\n GetDeviceMetadata: {\n exit: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction: UserInteractionRequired.None,\n }),\n }),\n invoke: {\n id: \"getMetadata\",\n src: \"getMetadata\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n useSecureChannel: true,\n forceUpdate: false,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n deviceId:\n _.event.snapshot.context.intermediateValue.deviceId ??\n _.context.intermediateValue.deviceId,\n }),\n }),\n },\n onDone: {\n target: \"GetDeviceMetadataCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<OpenAppWithDependenciesMachineInternalState>(\n {\n Right: (data) => {\n if (\n _.context.input.requireLatestFirmware &&\n data.firmwareUpdateContext.availableUpdate !==\n undefined\n ) {\n return {\n ..._.context._internalState,\n error: new UnsupportedFirmwareDAError(\n \"Firmware is not the latest version\",\n ),\n };\n } else {\n return {\n ..._.context._internalState,\n deviceMetadata: data,\n };\n }\n },\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n },\n ),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n GetDeviceMetadataCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n {\n target: \"InstallDependencies\",\n },\n ],\n },\n InstallDependencies: {\n exit: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction: UserInteractionRequired.None,\n }),\n }),\n invoke: {\n src: \"installApps\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n applications: [\n ..._.context.input.dependencies,\n _.context.input.application,\n ],\n allowMissingApplication: false,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n installPlan:\n _.event.snapshot.context.intermediateValue.installPlan,\n deviceId:\n _.event.snapshot.context.intermediateValue.deviceId ??\n _.context.intermediateValue.deviceId,\n }),\n }),\n },\n onDone: {\n target: \"InstallDependenciesCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<OpenAppWithDependenciesMachineInternalState>(\n {\n Right: (data) => ({\n ..._.context._internalState,\n installResult: data,\n }),\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n },\n ),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n InstallDependenciesCheck: {\n always: [\n {\n guard: \"hasError\",\n target: \"Error\",\n },\n {\n target: \"OpenApp\",\n },\n ],\n },\n OpenApp: {\n exit: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction: UserInteractionRequired.None,\n }),\n }),\n invoke: {\n src: \"openApp\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n appName: _.context.input.application.name,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n installPlan: null,\n }),\n }),\n },\n onDone: {\n target: \"OpenAppCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<OpenAppWithDependenciesMachineInternalState>(\n {\n Right: () => _.context._internalState,\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n },\n ),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n OpenAppCheck: {\n always: [\n {\n guard: \"hasError\",\n target: \"Error\",\n },\n {\n target: \"Success\",\n },\n ],\n },\n Success: {\n type: \"final\",\n },\n Error: {\n type: \"final\",\n },\n },\n output: (args) => {\n const { context } = args;\n const { error, deviceMetadata, installResult } = context._internalState;\n if (error) {\n return Left(error);\n }\n return Right({\n deviceMetadata: deviceMetadata!,\n installResult: installResult!,\n });\n },\n });\n }\n}\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA4B,qBAC5BC,EAA8B,kBAG9BC,EAAwC,4DACxCC,EAA0C,uCAC1CC,EAA2C,wCAC3CC,EAA8C,iFAE9CC,EAAgD,qFAEhDC,EAAoC,yEAEpCC,EAGO,8DAEPC,EAMO,mBAQA,MAAMX,UAA4C,oBAMvD,CACA,iBACEY,EAOA,CASA,MAAMC,EAAgB,KAAK,MAAM,eAAiB,4BAE5CC,EAAqB,IAAI,gCAA8B,CAC3D,MAAO,CACL,cAAAD,EACA,iBAAkB,GAClB,YAAa,EACf,CACF,CAAC,EAAE,iBAAiBD,CAAW,EAEzBG,EAAqB,IAAI,kCAAgC,CAC7D,MAAO,CACL,cAAAF,EACA,aAAc,CAAC,GAAG,KAAK,MAAM,aAAc,KAAK,MAAM,WAAW,EACjE,wBAAyB,
|
|
4
|
+
"sourcesContent": ["import { Left, Right } from \"purify-ts\";\nimport { assign, setup } from \"xstate\";\n\nimport { type InternalApi } from \"@api/device-action/DeviceAction\";\nimport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nimport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nimport { UnsupportedFirmwareDAError } from \"@api/device-action/os/Errors\";\nimport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nimport type { GetDeviceMetadataDAOutput } from \"@api/device-action/os/GetDeviceMetadata/types\";\nimport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nimport type { InstallOrUpdateAppsDAOutput } from \"@api/device-action/os/InstallOrUpdateApps/types\";\nimport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nimport { type StateMachineTypes } from \"@api/device-action/xstate-utils/StateMachineTypes\";\nimport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\n\nimport {\n type OpenAppWithDependenciesDAError,\n type OpenAppWithDependenciesDAInput,\n type OpenAppWithDependenciesDAIntermediateValue,\n type OpenAppWithDependenciesDAOutput,\n openAppWithDependenciesDAStateStep,\n} from \"./types\";\n\ntype OpenAppWithDependenciesMachineInternalState = {\n readonly error: OpenAppWithDependenciesDAError | null;\n readonly deviceMetadata: GetDeviceMetadataDAOutput | null;\n readonly installResult: InstallOrUpdateAppsDAOutput | null;\n};\n\nexport class OpenAppWithDependenciesDeviceAction extends XStateDeviceAction<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAInput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue,\n OpenAppWithDependenciesMachineInternalState\n> {\n makeStateMachine(\n internalApi: InternalApi,\n ): DeviceActionStateMachine<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAInput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue,\n OpenAppWithDependenciesMachineInternalState\n > {\n type types = StateMachineTypes<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAInput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue,\n OpenAppWithDependenciesMachineInternalState\n >;\n\n const unlockTimeout = this.input.unlockTimeout ?? DEFAULT_UNLOCK_TIMEOUT_MS;\n\n const getMetadataMachine = new GetDeviceMetadataDeviceAction({\n input: {\n unlockTimeout,\n useSecureChannel: true,\n forceUpdate: false,\n },\n }).makeStateMachine(internalApi);\n\n const installAppsMachine = new InstallOrUpdateAppsDeviceAction({\n input: {\n unlockTimeout,\n applications: [...this.input.dependencies, this.input.application],\n allowMissingApplication: this.input.allowMissingApplication ?? false,\n },\n }).makeStateMachine(internalApi);\n\n const openAppMachine = new OpenAppDeviceAction({\n input: {\n unlockTimeout,\n appName: this.input.application.name,\n },\n }).makeStateMachine(internalApi);\n\n return setup({\n types: {\n input: {\n unlockTimeout,\n } as types[\"input\"],\n context: {} as types[\"context\"],\n output: {} as types[\"output\"],\n },\n actors: {\n getMetadata: getMetadataMachine,\n installApps: installAppsMachine,\n openApp: openAppMachine,\n },\n guards: {\n hasError: ({ context }) => context._internalState.error !== null,\n },\n actions: {\n assignErrorFromEvent: assign({\n _internalState: (_) => ({\n ..._.context._internalState,\n error: _.event[\"error\"], // NOTE: it should never happen, the error is not typed anymore here\n }),\n }),\n },\n }).createMachine({\n id: \"OpenAppWithDependenciesDeviceAction\",\n initial: \"DeviceReady\",\n context: (_) => {\n return {\n input: {\n application: _.input.application,\n dependencies: _.input.dependencies,\n requireLatestFirmware: _.input.requireLatestFirmware,\n unlockTimeout: _.input.unlockTimeout,\n },\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.None,\n step: openAppWithDependenciesDAStateStep.GET_DEVICE_METADATA,\n installPlan: null,\n },\n _internalState: {\n error: null,\n deviceMetadata: null,\n installResult: null,\n },\n };\n },\n states: {\n DeviceReady: {\n always: [\n {\n target: \"GetDeviceMetadata\",\n },\n ],\n },\n GetDeviceMetadata: {\n exit: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction: UserInteractionRequired.None,\n }),\n }),\n invoke: {\n id: \"getMetadata\",\n src: \"getMetadata\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n useSecureChannel: true,\n forceUpdate: false,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n deviceId:\n _.event.snapshot.context.intermediateValue.deviceId ??\n _.context.intermediateValue.deviceId,\n }),\n }),\n },\n onDone: {\n target: \"GetDeviceMetadataCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<OpenAppWithDependenciesMachineInternalState>(\n {\n Right: (data) => {\n if (\n _.context.input.requireLatestFirmware &&\n data.firmwareUpdateContext.availableUpdate !==\n undefined\n ) {\n return {\n ..._.context._internalState,\n error: new UnsupportedFirmwareDAError(\n \"Firmware is not the latest version\",\n ),\n };\n } else {\n return {\n ..._.context._internalState,\n deviceMetadata: data,\n };\n }\n },\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n },\n ),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n GetDeviceMetadataCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n {\n target: \"InstallDependencies\",\n },\n ],\n },\n InstallDependencies: {\n exit: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction: UserInteractionRequired.None,\n }),\n }),\n invoke: {\n src: \"installApps\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n applications: [\n ..._.context.input.dependencies,\n _.context.input.application,\n ],\n allowMissingApplication:\n this.input.allowMissingApplication ?? false,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n installPlan:\n _.event.snapshot.context.intermediateValue.installPlan,\n deviceId:\n _.event.snapshot.context.intermediateValue.deviceId ??\n _.context.intermediateValue.deviceId,\n }),\n }),\n },\n onDone: {\n target: \"InstallDependenciesCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<OpenAppWithDependenciesMachineInternalState>(\n {\n Right: (data) => ({\n ..._.context._internalState,\n installResult: data,\n }),\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n },\n ),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n InstallDependenciesCheck: {\n always: [\n {\n guard: \"hasError\",\n target: \"Error\",\n },\n {\n target: \"OpenApp\",\n },\n ],\n },\n OpenApp: {\n exit: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction: UserInteractionRequired.None,\n }),\n }),\n invoke: {\n src: \"openApp\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n appName: _.context.input.application.name,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n installPlan: null,\n }),\n }),\n },\n onDone: {\n target: \"OpenAppCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<OpenAppWithDependenciesMachineInternalState>(\n {\n Right: () => _.context._internalState,\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n },\n ),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n OpenAppCheck: {\n always: [\n {\n guard: \"hasError\",\n target: \"Error\",\n },\n {\n target: \"Success\",\n },\n ],\n },\n Success: {\n type: \"final\",\n },\n Error: {\n type: \"final\",\n },\n },\n output: (args) => {\n const { context } = args;\n const { error, deviceMetadata, installResult } = context._internalState;\n if (error) {\n return Left(error);\n }\n return Right({\n deviceMetadata: deviceMetadata!,\n installResult: installResult!,\n });\n },\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["OpenAppWithDependenciesDeviceAction_exports", "__export", "OpenAppWithDependenciesDeviceAction", "__toCommonJS", "import_purify_ts", "import_xstate", "import_UserInteractionRequired", "import_Const", "import_Errors", "import_GetDeviceMetadataDeviceAction", "import_InstallOrUpdateAppsDeviceAction", "import_OpenAppDeviceAction", "import_XStateDeviceAction", "import_types", "internalApi", "unlockTimeout", "getMetadataMachine", "installAppsMachine", "openAppMachine", "context", "_", "data", "error", "args", "deviceMetadata", "installResult"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/api/device-action/os/OpenAppWithDependencies/types.ts"],
|
|
4
|
-
"sourcesContent": ["import type { CommandErrorResult } from \"@api/command/model/CommandResult\";\nimport type { DeviceActionState } from \"@api/device-action/model/DeviceActionState\";\nimport type {\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nimport type {\n GetDeviceMetadataDAOutput,\n GetDeviceMetadataDARequiredInteraction,\n} from \"@api/device-action/os/GetDeviceMetadata/types\";\nimport type { GetDeviceStatusDAInput } from \"@api/device-action/os/GetDeviceStatus/types\";\nimport type {\n ApplicationDependency,\n InstallOrUpdateAppsDAError,\n InstallOrUpdateAppsDAOutput,\n InstallOrUpdateAppsDARequiredInteraction,\n InstallPlan,\n} from \"@api/device-action/os/InstallOrUpdateApps/types\";\nimport type {\n OpenAppDAError,\n OpenAppDARequiredInteraction,\n} from \"@api/device-action/os/OpenAppDeviceAction/types\";\n\nexport const openAppWithDependenciesDAStateStep = Object.freeze({\n GET_DEVICE_METADATA: \"os.openAppWithDependencies.steps.getDeviceMetadata\",\n INSTALL_OR_UPDATE_APPS:\n \"os.openAppWithDependencies.steps.installOrUpdateApps\",\n OPEN_APP: \"os.openAppWithDependencies.steps.openApp\",\n} as const);\n\nexport type OpenAppWithDependenciesDAStateStep =\n (typeof openAppWithDependenciesDAStateStep)[keyof typeof openAppWithDependenciesDAStateStep];\n\nexport type OpenAppWithDependenciesDAOutput = {\n deviceMetadata: GetDeviceMetadataDAOutput;\n installResult: InstallOrUpdateAppsDAOutput;\n};\n\nexport type OpenAppWithDependenciesDAInput = GetDeviceStatusDAInput & {\n readonly application: ApplicationDependency;\n readonly dependencies: ApplicationDependency[];\n readonly requireLatestFirmware?: boolean;\n};\n\nexport type OpenAppWithDependenciesDAError =\n | InstallOrUpdateAppsDAError\n | OpenAppDAError\n | UnknownDAError\n | UnsupportedFirmwareDAError\n | CommandErrorResult[\"error\"];\n\nexport type OpenAppWithDependenciesDARequiredInteraction =\n | GetDeviceMetadataDARequiredInteraction\n | InstallOrUpdateAppsDARequiredInteraction\n | OpenAppDARequiredInteraction;\n\nexport type OpenAppWithDependenciesDAIntermediateValue = {\n requiredUserInteraction: OpenAppWithDependenciesDARequiredInteraction;\n installPlan: InstallPlan | null;\n deviceId?: Uint8Array;\n step: OpenAppWithDependenciesDAStateStep;\n};\n\nexport type OpenAppWithDependenciesDAState = DeviceActionState<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue\n>;\n"],
|
|
4
|
+
"sourcesContent": ["import type { CommandErrorResult } from \"@api/command/model/CommandResult\";\nimport type { DeviceActionState } from \"@api/device-action/model/DeviceActionState\";\nimport type {\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nimport type {\n GetDeviceMetadataDAOutput,\n GetDeviceMetadataDARequiredInteraction,\n} from \"@api/device-action/os/GetDeviceMetadata/types\";\nimport type { GetDeviceStatusDAInput } from \"@api/device-action/os/GetDeviceStatus/types\";\nimport type {\n ApplicationDependency,\n InstallOrUpdateAppsDAError,\n InstallOrUpdateAppsDAOutput,\n InstallOrUpdateAppsDARequiredInteraction,\n InstallPlan,\n} from \"@api/device-action/os/InstallOrUpdateApps/types\";\nimport type {\n OpenAppDAError,\n OpenAppDARequiredInteraction,\n} from \"@api/device-action/os/OpenAppDeviceAction/types\";\n\nexport const openAppWithDependenciesDAStateStep = Object.freeze({\n GET_DEVICE_METADATA: \"os.openAppWithDependencies.steps.getDeviceMetadata\",\n INSTALL_OR_UPDATE_APPS:\n \"os.openAppWithDependencies.steps.installOrUpdateApps\",\n OPEN_APP: \"os.openAppWithDependencies.steps.openApp\",\n} as const);\n\nexport type OpenAppWithDependenciesDAStateStep =\n (typeof openAppWithDependenciesDAStateStep)[keyof typeof openAppWithDependenciesDAStateStep];\n\nexport type OpenAppWithDependenciesDAOutput = {\n deviceMetadata: GetDeviceMetadataDAOutput;\n installResult: InstallOrUpdateAppsDAOutput;\n};\n\nexport type OpenAppWithDependenciesDAInput = GetDeviceStatusDAInput & {\n readonly application: ApplicationDependency;\n readonly dependencies: ApplicationDependency[];\n readonly requireLatestFirmware?: boolean;\n readonly allowMissingApplication?: boolean;\n};\n\nexport type OpenAppWithDependenciesDAError =\n | InstallOrUpdateAppsDAError\n | OpenAppDAError\n | UnknownDAError\n | UnsupportedFirmwareDAError\n | CommandErrorResult[\"error\"];\n\nexport type OpenAppWithDependenciesDARequiredInteraction =\n | GetDeviceMetadataDARequiredInteraction\n | InstallOrUpdateAppsDARequiredInteraction\n | OpenAppDARequiredInteraction;\n\nexport type OpenAppWithDependenciesDAIntermediateValue = {\n requiredUserInteraction: OpenAppWithDependenciesDARequiredInteraction;\n installPlan: InstallPlan | null;\n deviceId?: Uint8Array;\n step: OpenAppWithDependenciesDAStateStep;\n};\n\nexport type OpenAppWithDependenciesDAState = DeviceActionState<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue\n>;\n"],
|
|
5
5
|
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wCAAAE,IAAA,eAAAC,EAAAH,GAuBO,MAAME,EAAqC,OAAO,OAAO,CAC9D,oBAAqB,qDACrB,uBACE,uDACF,SAAU,0CACZ,CAAU",
|
|
6
6
|
"names": ["types_exports", "__export", "openAppWithDependenciesDAStateStep", "__toCommonJS"]
|
|
7
7
|
}
|
package/lib/cjs/src/api/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var S=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var Se=Object.getOwnPropertyNames;var ye=Object.prototype.hasOwnProperty;var ge=(p,t)=>{for(var a in t)S(p,a,{get:t[a],enumerable:!0})},v=(p,t,a,y)=>{if(t&&typeof t=="object"||typeof t=="function")for(let f of Se(t))!ye.call(p,f)&&f!==a&&S(p,f,{get:()=>t[f],enumerable:!(y=ve(t,f))||y.enumerable});return p},o=(p,t,a)=>(v(p,t,"default"),a&&v(a,t,"default"));var Ce=p=>v(S({},"__esModule",{value:!0}),p);var e={};ge(e,{APDU_MAX_PAYLOAD:()=>d.APDU_MAX_PAYLOAD,Apdu:()=>g.Apdu,ApduBuilder:()=>d.ApduBuilder,ApduParser:()=>C.ApduParser,ApduResponse:()=>Q.ApduResponse,AppAlreadyInstalledDAError:()=>r.AppAlreadyInstalledDAError,ApplicationChecker:()=>le.ApplicationChecker,BatteryStatusType:()=>D.BatteryStatusType,BleDeviceInfos:()=>j.BleDeviceInfos,ByteArrayBuilder:()=>G.ByteArrayBuilder,ByteArrayParser:()=>L.ByteArrayParser,CallTaskInAppDeviceAction:()=>F.CallTaskInAppDeviceAction,CloseAppCommand:()=>E.CloseAppCommand,CommandResultFactory:()=>i.CommandResultFactory,CommandResultStatus:()=>i.CommandResultStatus,CommandUtils:()=>O.CommandUtils,ConnectedDevice:()=>xe.ConnectedDevice,ConsoleLogger:()=>ce.ConsoleLogger,DEFAULT_UNLOCK_TIMEOUT_MS:()=>_.DEFAULT_UNLOCK_TIMEOUT_MS,DefaultLogTagFormatter:()=>fe.DefaultLogTagFormatter,DeviceActionStatus:()=>U.DeviceActionStatus,DeviceConnectionStateMachine:()=>Ae.DeviceConnectionStateMachine,DeviceLockedError:()=>r.DeviceLockedError,DeviceManagementKit:()=>ne.DeviceManagementKit,DeviceManagementKitBuilder:()=>me.DeviceManagementKitBuilder,DeviceModel:()=>m.DeviceModel,DeviceModelId:()=>m.DeviceModelId,DeviceNotOnboardedError:()=>r.DeviceNotOnboardedError,DeviceSessionStateType:()=>Z.DeviceSessionStateType,DeviceStatus:()=>M.DeviceStatus,FramerUtils:()=>ie.FramerUtils,GLOBAL_ERRORS:()=>n.GLOBAL_ERRORS,GenuineCheckDeviceAction:()=>$.GenuineCheckDeviceAction,GetAppAndVersionCommand:()=>B.GetAppAndVersionCommand,GetBackgroundImageSizeCommand:()=>A.GetBackgroundImageSizeCommand,GetBackgroundImageSizeCommandError:()=>A.GetBackgroundImageSizeCommandError,GetBatteryStatusCommand:()=>D.GetBatteryStatusCommand,GetDeviceMetadataDeviceAction:()=>V.GetDeviceMetadataDeviceAction,GetDeviceStatusDeviceAction:()=>z.GetDeviceStatusDeviceAction,GetOsVersionCommand:()=>R.GetOsVersionCommand,GlobalCommandError:()=>n.GlobalCommandError,GlobalCommandErrorHandler:()=>n.GlobalCommandErrorHandler,GoToDashboardDeviceAction:()=>P.GoToDashboardDeviceAction,InstallAppDeviceAction:()=>ee.InstallAppDeviceAction,InstallOrUpdateAppsDeviceAction:()=>W.InstallOrUpdateAppsDeviceAction,InvalidGetFirmwareMetadataResponseError:()=>x.InvalidGetFirmwareMetadataResponseError,InvalidStatusWordError:()=>x.InvalidStatusWordError,LEDGER_VENDOR_ID:()=>m.LEDGER_VENDOR_ID,ListAppsCommand:()=>I.ListAppsCommand,ListAppsDeviceAction:()=>w.ListAppsDeviceAction,ListAppsWithMetadataDeviceAction:()=>H.ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction:()=>oe.ListInstalledAppsDeviceAction,LoadCertificateCommand:()=>T.LoadCertificateCommand,LogLevel:()=>se.LogLevel,OpenAppCommand:()=>b.OpenAppCommand,OpenAppDeviceAction:()=>K.OpenAppDeviceAction,OpenAppWithDependenciesDeviceAction:()=>N.OpenAppWithDependenciesDeviceAction,OutOfMemoryDAError:()=>r.OutOfMemoryDAError,RefusedByUserDAError:()=>r.RefusedByUserDAError,SecureChannelError:()=>te.SecureChannelError,SendCommandInAppDeviceAction:()=>q.SendCommandInAppDeviceAction,StaticDeviceModelDataSource:()=>Y.StaticDeviceModelDataSource,TransportConnectedDevice:()=>De.TransportConnectedDevice,TransportDeviceModel:()=>J.TransportDeviceModel,UninstallAppDeviceAction:()=>re.UninstallAppDeviceAction,UnknownDAError:()=>r.UnknownDAError,UnsupportedFirmwareDAError:()=>r.UnsupportedFirmwareDAError,UserInteractionRequired:()=>k.UserInteractionRequired,WebLogsExporterLogger:()=>de.WebLogsExporterLogger,XStateDeviceAction:()=>X.XStateDeviceAction,base64StringToBuffer:()=>s.base64StringToBuffer,bufferToBase64String:()=>s.bufferToBase64String,bufferToHexaString:()=>c.bufferToHexaString,connectedDeviceStubBuilder:()=>ue.connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder:()=>pe.defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder:()=>ae.defaultApduSenderServiceStubBuilder,formatApduReceivedLog:()=>l.formatApduReceivedLog,formatApduSentLog:()=>l.formatApduSentLog,hexaStringToBuffer:()=>c.hexaStringToBuffer,isBase64String:()=>s.isBase64String,isCommandErrorCode:()=>h.isCommandErrorCode,isHexaString:()=>c.isHexaString,isSuccessCommandResult:()=>i.isSuccessCommandResult,noopLogger:()=>u.noopLogger,noopLoggerFactory:()=>u.noopLoggerFactory});module.exports=Ce(e);var g=require("./apdu/model/Apdu"),d=require("./apdu/utils/ApduBuilder"),C=require("./apdu/utils/ApduParser");o(e,require("./apdu/utils/AppBuilderError"),module.exports);var G=require("./apdu/utils/ByteArrayBuilder"),L=require("./apdu/utils/ByteArrayParser"),x=require("./command/Errors"),i=require("./command/model/CommandResult"),E=require("./command/os/CloseAppCommand"),B=require("./command/os/GetAppAndVersionCommand"),A=require("./command/os/GetBackgroundImageSizeCommand"),D=require("./command/os/GetBatteryStatusCommand"),R=require("./command/os/GetOsVersionCommand"),I=require("./command/os/ListAppsCommand"),T=require("./command/os/LoadCertificateCommand"),b=require("./command/os/OpenAppCommand"),h=require("./command/utils/CommandErrors"),O=require("./command/utils/CommandUtils"),n=require("./command/utils/GlobalCommandError"),m=require("./device/DeviceModel"),M=require("./device/DeviceStatus"),U=require("./device-action/model/DeviceActionState"),k=require("./device-action/model/UserInteractionRequired"),F=require("./device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction"),_=require("./device-action/os/Const"),r=require("./device-action/os/Errors"),V=require("./device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction"),z=require("./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction"),P=require("./device-action/os/GoToDashboard/GoToDashboardDeviceAction"),W=require("./device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction"),w=require("./device-action/os/ListApps/ListAppsDeviceAction"),H=require("./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction"),K=require("./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction"),N=require("./device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction"),q=require("./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction"),X=require("./device-action/xstate-utils/XStateDeviceAction"),Y=require("./device-model/data/StaticDeviceModelDataSource"),j=require("./device-model/model/BleDeviceInfos"),J=require("./device-model/model/DeviceModel"),Q=require("./device-session/ApduResponse");o(e,require("./device-session/data/FramerConst"),module.exports);var Z=require("./device-session/DeviceSessionState"),$=require("./secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction"),ee=require("./secure-channel/device-action/InstallApp/InstallAppDeviceAction"),oe=require("./secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction"),re=require("./secure-channel/device-action/UninstallApp/UninstallAppDeviceAction"),te=require("../internal/secure-channel/model/Errors"),pe=require("./device-session/service/DefaultApduReceiverService.stub"),ae=require("./device-session/service/DefaultApduSenderService.stub"),ie=require("./device-session/utils/FramerUtils"),ne=require("./DeviceManagementKit"),me=require("./DeviceManagementKitBuilder");o(e,require("./Error"),module.exports);var u=require("./logger-publisher/utils/noopLoggerFactory"),se=require("./logger-subscriber/model/LogLevel"),ce=require("./logger-subscriber/service/ConsoleLogger"),fe=require("./logger-subscriber/service/DefaultLogTagFormatter"),de=require("./logger-subscriber/service/WebLogsExporterLogger"),xe=require("./transport/model/ConnectedDevice"),Ae=require("./transport/model/DeviceConnectionStateMachine");o(e,require("./transport/model/Errors"),module.exports);var De=require("./transport/model/TransportConnectedDevice"),ue=require("./transport/model/TransportConnectedDevice.stub");o(e,require("./types"),module.exports);var l=require("./utils/apduLogs"),le=require("./utils/ApplicationChecker"),s=require("./utils/Base64String"),c=require("./utils/HexaString");0&&(module.exports={APDU_MAX_PAYLOAD,Apdu,ApduBuilder,ApduParser,ApduResponse,AppAlreadyInstalledDAError,ApplicationChecker,BatteryStatusType,BleDeviceInfos,ByteArrayBuilder,ByteArrayParser,CallTaskInAppDeviceAction,CloseAppCommand,CommandResultFactory,CommandResultStatus,CommandUtils,ConnectedDevice,ConsoleLogger,DEFAULT_UNLOCK_TIMEOUT_MS,DefaultLogTagFormatter,DeviceActionStatus,DeviceConnectionStateMachine,DeviceLockedError,DeviceManagementKit,DeviceManagementKitBuilder,DeviceModel,DeviceModelId,DeviceNotOnboardedError,DeviceSessionStateType,DeviceStatus,FramerUtils,GLOBAL_ERRORS,GenuineCheckDeviceAction,GetAppAndVersionCommand,GetBackgroundImageSizeCommand,GetBackgroundImageSizeCommandError,GetBatteryStatusCommand,GetDeviceMetadataDeviceAction,GetDeviceStatusDeviceAction,GetOsVersionCommand,GlobalCommandError,GlobalCommandErrorHandler,GoToDashboardDeviceAction,InstallAppDeviceAction,InstallOrUpdateAppsDeviceAction,InvalidGetFirmwareMetadataResponseError,InvalidStatusWordError,LEDGER_VENDOR_ID,ListAppsCommand,ListAppsDeviceAction,ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction,LoadCertificateCommand,LogLevel,OpenAppCommand,OpenAppDeviceAction,OpenAppWithDependenciesDeviceAction,OutOfMemoryDAError,RefusedByUserDAError,SecureChannelError,SendCommandInAppDeviceAction,StaticDeviceModelDataSource,TransportConnectedDevice,TransportDeviceModel,UninstallAppDeviceAction,UnknownDAError,UnsupportedFirmwareDAError,UserInteractionRequired,WebLogsExporterLogger,XStateDeviceAction,base64StringToBuffer,bufferToBase64String,bufferToHexaString,connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder,formatApduReceivedLog,formatApduSentLog,hexaStringToBuffer,isBase64String,isCommandErrorCode,isHexaString,isSuccessCommandResult,noopLogger,noopLoggerFactory,...require("./apdu/utils/AppBuilderError"),...require("./device-session/data/FramerConst"),...require("./Error"),...require("./transport/model/Errors"),...require("./types")});
|
|
1
|
+
"use strict";var S=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var Se=Object.getOwnPropertyNames;var ye=Object.prototype.hasOwnProperty;var ge=(p,t)=>{for(var a in t)S(p,a,{get:t[a],enumerable:!0})},v=(p,t,a,y)=>{if(t&&typeof t=="object"||typeof t=="function")for(let d of Se(t))!ye.call(p,d)&&d!==a&&S(p,d,{get:()=>t[d],enumerable:!(y=ve(t,d))||y.enumerable});return p},o=(p,t,a)=>(v(p,t,"default"),a&&v(a,t,"default"));var Ce=p=>v(S({},"__esModule",{value:!0}),p);var e={};ge(e,{APDU_MAX_PAYLOAD:()=>x.APDU_MAX_PAYLOAD,Apdu:()=>g.Apdu,ApduBuilder:()=>x.ApduBuilder,ApduParser:()=>C.ApduParser,ApduResponse:()=>Q.ApduResponse,AppAlreadyInstalledDAError:()=>r.AppAlreadyInstalledDAError,ApplicationChecker:()=>le.ApplicationChecker,BatteryStatusType:()=>D.BatteryStatusType,BleDeviceInfos:()=>j.BleDeviceInfos,ByteArrayBuilder:()=>G.ByteArrayBuilder,ByteArrayParser:()=>L.ByteArrayParser,CallTaskInAppDeviceAction:()=>F.CallTaskInAppDeviceAction,CloseAppCommand:()=>E.CloseAppCommand,CommandResultFactory:()=>n.CommandResultFactory,CommandResultStatus:()=>n.CommandResultStatus,CommandUtils:()=>O.CommandUtils,ConnectedDevice:()=>xe.ConnectedDevice,ConsoleLogger:()=>ce.ConsoleLogger,DEFAULT_UNLOCK_TIMEOUT_MS:()=>_.DEFAULT_UNLOCK_TIMEOUT_MS,DefaultLogTagFormatter:()=>fe.DefaultLogTagFormatter,DeviceActionStatus:()=>U.DeviceActionStatus,DeviceConnectionStateMachine:()=>Ae.DeviceConnectionStateMachine,DeviceLockedError:()=>r.DeviceLockedError,DeviceManagementKit:()=>ne.DeviceManagementKit,DeviceManagementKitBuilder:()=>me.DeviceManagementKitBuilder,DeviceModel:()=>s.DeviceModel,DeviceModelId:()=>s.DeviceModelId,DeviceNotOnboardedError:()=>r.DeviceNotOnboardedError,DeviceSessionStateType:()=>Z.DeviceSessionStateType,DeviceStatus:()=>M.DeviceStatus,FramerUtils:()=>ie.FramerUtils,GLOBAL_ERRORS:()=>m.GLOBAL_ERRORS,GenuineCheckDeviceAction:()=>$.GenuineCheckDeviceAction,GetAppAndVersionCommand:()=>B.GetAppAndVersionCommand,GetBackgroundImageSizeCommand:()=>A.GetBackgroundImageSizeCommand,GetBackgroundImageSizeCommandError:()=>A.GetBackgroundImageSizeCommandError,GetBatteryStatusCommand:()=>D.GetBatteryStatusCommand,GetDeviceMetadataDeviceAction:()=>V.GetDeviceMetadataDeviceAction,GetDeviceStatusDeviceAction:()=>z.GetDeviceStatusDeviceAction,GetOsVersionCommand:()=>R.GetOsVersionCommand,GlobalCommandError:()=>m.GlobalCommandError,GlobalCommandErrorHandler:()=>m.GlobalCommandErrorHandler,GoToDashboardDeviceAction:()=>P.GoToDashboardDeviceAction,InstallAppDeviceAction:()=>ee.InstallAppDeviceAction,InstallOrUpdateAppsDeviceAction:()=>W.InstallOrUpdateAppsDeviceAction,InvalidGetFirmwareMetadataResponseError:()=>i.InvalidGetFirmwareMetadataResponseError,InvalidResponseFormatError:()=>i.InvalidResponseFormatError,InvalidStatusWordError:()=>i.InvalidStatusWordError,LEDGER_VENDOR_ID:()=>s.LEDGER_VENDOR_ID,ListAppsCommand:()=>I.ListAppsCommand,ListAppsDeviceAction:()=>w.ListAppsDeviceAction,ListAppsWithMetadataDeviceAction:()=>H.ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction:()=>oe.ListInstalledAppsDeviceAction,LoadCertificateCommand:()=>T.LoadCertificateCommand,LogLevel:()=>se.LogLevel,OpenAppCommand:()=>b.OpenAppCommand,OpenAppDeviceAction:()=>K.OpenAppDeviceAction,OpenAppWithDependenciesDeviceAction:()=>N.OpenAppWithDependenciesDeviceAction,OutOfMemoryDAError:()=>r.OutOfMemoryDAError,RefusedByUserDAError:()=>r.RefusedByUserDAError,SecureChannelError:()=>te.SecureChannelError,SendCommandInAppDeviceAction:()=>q.SendCommandInAppDeviceAction,StaticDeviceModelDataSource:()=>Y.StaticDeviceModelDataSource,TransportConnectedDevice:()=>De.TransportConnectedDevice,TransportDeviceModel:()=>J.TransportDeviceModel,UninstallAppDeviceAction:()=>re.UninstallAppDeviceAction,UnknownDAError:()=>r.UnknownDAError,UnsupportedFirmwareDAError:()=>r.UnsupportedFirmwareDAError,UserInteractionRequired:()=>k.UserInteractionRequired,WebLogsExporterLogger:()=>de.WebLogsExporterLogger,XStateDeviceAction:()=>X.XStateDeviceAction,base64StringToBuffer:()=>c.base64StringToBuffer,bufferToBase64String:()=>c.bufferToBase64String,bufferToHexaString:()=>f.bufferToHexaString,connectedDeviceStubBuilder:()=>ue.connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder:()=>pe.defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder:()=>ae.defaultApduSenderServiceStubBuilder,formatApduReceivedLog:()=>l.formatApduReceivedLog,formatApduSentLog:()=>l.formatApduSentLog,hexaStringToBuffer:()=>f.hexaStringToBuffer,isBase64String:()=>c.isBase64String,isCommandErrorCode:()=>h.isCommandErrorCode,isHexaString:()=>f.isHexaString,isSuccessCommandResult:()=>n.isSuccessCommandResult,noopLogger:()=>u.noopLogger,noopLoggerFactory:()=>u.noopLoggerFactory});module.exports=Ce(e);var g=require("./apdu/model/Apdu"),x=require("./apdu/utils/ApduBuilder"),C=require("./apdu/utils/ApduParser");o(e,require("./apdu/utils/AppBuilderError"),module.exports);var G=require("./apdu/utils/ByteArrayBuilder"),L=require("./apdu/utils/ByteArrayParser"),i=require("./command/Errors"),n=require("./command/model/CommandResult"),E=require("./command/os/CloseAppCommand"),B=require("./command/os/GetAppAndVersionCommand"),A=require("./command/os/GetBackgroundImageSizeCommand"),D=require("./command/os/GetBatteryStatusCommand"),R=require("./command/os/GetOsVersionCommand"),I=require("./command/os/ListAppsCommand"),T=require("./command/os/LoadCertificateCommand"),b=require("./command/os/OpenAppCommand"),h=require("./command/utils/CommandErrors"),O=require("./command/utils/CommandUtils"),m=require("./command/utils/GlobalCommandError"),s=require("./device/DeviceModel"),M=require("./device/DeviceStatus"),U=require("./device-action/model/DeviceActionState"),k=require("./device-action/model/UserInteractionRequired"),F=require("./device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction"),_=require("./device-action/os/Const"),r=require("./device-action/os/Errors"),V=require("./device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction"),z=require("./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction"),P=require("./device-action/os/GoToDashboard/GoToDashboardDeviceAction"),W=require("./device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction"),w=require("./device-action/os/ListApps/ListAppsDeviceAction"),H=require("./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction"),K=require("./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction"),N=require("./device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction"),q=require("./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction"),X=require("./device-action/xstate-utils/XStateDeviceAction"),Y=require("./device-model/data/StaticDeviceModelDataSource"),j=require("./device-model/model/BleDeviceInfos"),J=require("./device-model/model/DeviceModel"),Q=require("./device-session/ApduResponse");o(e,require("./device-session/data/FramerConst"),module.exports);var Z=require("./device-session/DeviceSessionState"),$=require("./secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction"),ee=require("./secure-channel/device-action/InstallApp/InstallAppDeviceAction"),oe=require("./secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction"),re=require("./secure-channel/device-action/UninstallApp/UninstallAppDeviceAction"),te=require("../internal/secure-channel/model/Errors"),pe=require("./device-session/service/DefaultApduReceiverService.stub"),ae=require("./device-session/service/DefaultApduSenderService.stub"),ie=require("./device-session/utils/FramerUtils"),ne=require("./DeviceManagementKit"),me=require("./DeviceManagementKitBuilder");o(e,require("./Error"),module.exports);var u=require("./logger-publisher/utils/noopLoggerFactory"),se=require("./logger-subscriber/model/LogLevel"),ce=require("./logger-subscriber/service/ConsoleLogger"),fe=require("./logger-subscriber/service/DefaultLogTagFormatter"),de=require("./logger-subscriber/service/WebLogsExporterLogger"),xe=require("./transport/model/ConnectedDevice"),Ae=require("./transport/model/DeviceConnectionStateMachine");o(e,require("./transport/model/Errors"),module.exports);var De=require("./transport/model/TransportConnectedDevice"),ue=require("./transport/model/TransportConnectedDevice.stub");o(e,require("./types"),module.exports);var l=require("./utils/apduLogs"),le=require("./utils/ApplicationChecker"),c=require("./utils/Base64String"),f=require("./utils/HexaString");0&&(module.exports={APDU_MAX_PAYLOAD,Apdu,ApduBuilder,ApduParser,ApduResponse,AppAlreadyInstalledDAError,ApplicationChecker,BatteryStatusType,BleDeviceInfos,ByteArrayBuilder,ByteArrayParser,CallTaskInAppDeviceAction,CloseAppCommand,CommandResultFactory,CommandResultStatus,CommandUtils,ConnectedDevice,ConsoleLogger,DEFAULT_UNLOCK_TIMEOUT_MS,DefaultLogTagFormatter,DeviceActionStatus,DeviceConnectionStateMachine,DeviceLockedError,DeviceManagementKit,DeviceManagementKitBuilder,DeviceModel,DeviceModelId,DeviceNotOnboardedError,DeviceSessionStateType,DeviceStatus,FramerUtils,GLOBAL_ERRORS,GenuineCheckDeviceAction,GetAppAndVersionCommand,GetBackgroundImageSizeCommand,GetBackgroundImageSizeCommandError,GetBatteryStatusCommand,GetDeviceMetadataDeviceAction,GetDeviceStatusDeviceAction,GetOsVersionCommand,GlobalCommandError,GlobalCommandErrorHandler,GoToDashboardDeviceAction,InstallAppDeviceAction,InstallOrUpdateAppsDeviceAction,InvalidGetFirmwareMetadataResponseError,InvalidResponseFormatError,InvalidStatusWordError,LEDGER_VENDOR_ID,ListAppsCommand,ListAppsDeviceAction,ListAppsWithMetadataDeviceAction,ListInstalledAppsDeviceAction,LoadCertificateCommand,LogLevel,OpenAppCommand,OpenAppDeviceAction,OpenAppWithDependenciesDeviceAction,OutOfMemoryDAError,RefusedByUserDAError,SecureChannelError,SendCommandInAppDeviceAction,StaticDeviceModelDataSource,TransportConnectedDevice,TransportDeviceModel,UninstallAppDeviceAction,UnknownDAError,UnsupportedFirmwareDAError,UserInteractionRequired,WebLogsExporterLogger,XStateDeviceAction,base64StringToBuffer,bufferToBase64String,bufferToHexaString,connectedDeviceStubBuilder,defaultApduReceiverServiceStubBuilder,defaultApduSenderServiceStubBuilder,formatApduReceivedLog,formatApduSentLog,hexaStringToBuffer,isBase64String,isCommandErrorCode,isHexaString,isSuccessCommandResult,noopLogger,noopLoggerFactory,...require("./apdu/utils/AppBuilderError"),...require("./device-session/data/FramerConst"),...require("./Error"),...require("./transport/model/Errors"),...require("./types")});
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/api/index.ts"],
|
|
4
|
-
"sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { type Command } from \"@api/command/Command\";\nexport {\n InvalidGetFirmwareMetadataResponseError,\n InvalidStatusWordError,\n} from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n GetBackgroundImageSizeCommand,\n GetBackgroundImageSizeCommandError,\n type GetBackgroundImageSizeCommandResult,\n type GetBackgroundImageSizeErrorCodes,\n type GetBackgroundImageSizeResponse,\n} from \"@api/command/os/GetBackgroundImageSizeCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GLOBAL_ERRORS,\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nexport {\n AppAlreadyInstalledDAError,\n DeviceLockedError,\n DeviceNotOnboardedError,\n OutOfMemoryDAError,\n RefusedByUserDAError,\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nexport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport type {\n GoToDashboardDAError,\n GoToDashboardDAInput,\n GoToDashboardDAIntermediateValue,\n GoToDashboardDAOutput,\n GoToDashboardDARequiredInteraction,\n GoToDashboardDAState,\n} from \"@api/device-action/os/GoToDashboard/types\";\nexport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { OpenAppWithDependenciesDeviceAction } from \"@api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\nexport { SecureChannelError } from \"@internal/secure-channel/model/Errors\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport {\n noopLogger,\n noopLoggerFactory,\n} from \"@api/logger-publisher/utils/noopLoggerFactory\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { DefaultLogTagFormatter } from \"@api/logger-subscriber/service/DefaultLogTagFormatter\";\nexport { type LogTagFormatter } from \"@api/logger-subscriber/service/LogTagFormatter\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport {\n DeviceConnectionStateMachine,\n type DeviceConnectionStateMachineParams,\n} from \"@api/transport/model/DeviceConnectionStateMachine\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { formatApduReceivedLog, formatApduSentLog } from \"@api/utils/apduLogs\";\nexport { ApplicationChecker } from \"@api/utils/ApplicationChecker\";\nexport {\n type AppConfig,\n type ApplicationResolver,\n type ResolvedApp,\n} from \"@api/utils/ApplicationResolver\";\nexport {\n base64StringToBuffer,\n bufferToBase64String,\n isBase64String,\n} from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
|
|
5
|
-
"mappings": "meAAA,IAAAA,EAAA,GAAAC,GAAAD,EAAA,
|
|
4
|
+
"sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { type Command } from \"@api/command/Command\";\nexport {\n InvalidGetFirmwareMetadataResponseError,\n InvalidResponseFormatError,\n InvalidStatusWordError,\n} from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n GetBackgroundImageSizeCommand,\n GetBackgroundImageSizeCommandError,\n type GetBackgroundImageSizeCommandResult,\n type GetBackgroundImageSizeErrorCodes,\n type GetBackgroundImageSizeResponse,\n} from \"@api/command/os/GetBackgroundImageSizeCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GLOBAL_ERRORS,\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nexport {\n AppAlreadyInstalledDAError,\n DeviceLockedError,\n DeviceNotOnboardedError,\n OutOfMemoryDAError,\n RefusedByUserDAError,\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nexport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport type {\n GoToDashboardDAError,\n GoToDashboardDAInput,\n GoToDashboardDAIntermediateValue,\n GoToDashboardDAOutput,\n GoToDashboardDARequiredInteraction,\n GoToDashboardDAState,\n} from \"@api/device-action/os/GoToDashboard/types\";\nexport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { OpenAppWithDependenciesDeviceAction } from \"@api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\nexport { SecureChannelError } from \"@internal/secure-channel/model/Errors\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport {\n noopLogger,\n noopLoggerFactory,\n} from \"@api/logger-publisher/utils/noopLoggerFactory\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { DefaultLogTagFormatter } from \"@api/logger-subscriber/service/DefaultLogTagFormatter\";\nexport { type LogTagFormatter } from \"@api/logger-subscriber/service/LogTagFormatter\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport {\n DeviceConnectionStateMachine,\n type DeviceConnectionStateMachineParams,\n} from \"@api/transport/model/DeviceConnectionStateMachine\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { formatApduReceivedLog, formatApduSentLog } from \"@api/utils/apduLogs\";\nexport { ApplicationChecker } from \"@api/utils/ApplicationChecker\";\nexport {\n type AppConfig,\n type ApplicationResolver,\n type ResolvedApp,\n} from \"@api/utils/ApplicationResolver\";\nexport {\n base64StringToBuffer,\n bufferToBase64String,\n isBase64String,\n} from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
|
|
5
|
+
"mappings": "meAAA,IAAAA,EAAA,GAAAC,GAAAD,EAAA,goIAAAE,GAAAF,GAEA,IAAAG,EAAqB,gCACrBC,EAA8C,uCAC9CC,EAA2B,sCAC3BC,EAAAN,EAAc,2CALd,gBAMA,IAAAO,EAAiC,4CACjCC,EAAgC,2CAEhCC,EAIO,+BACPC,EAIO,4CACPC,EAAgC,2CAChCC,EAGO,mDACPC,EAMO,yDACPC,EAKO,mDACPC,EAGO,+CACPC,EAKO,2CACPC,EAIO,kDACPC,EAGO,0CACPC,EAAmC,4CACnCC,EAA6B,2CAC7BC,EAIO,iDACPC,EAIO,mCACPC,EAA6B,oCAE7BC,EAGO,sDACPC,EAAwC,4DACxCC,EAA0C,qFAC1CC,EAA0C,uCAC1ClB,EAQO,wCACPmB,EAA8C,iFAC9CC,EAA4C,6EAC5CC,EAA0C,yEAS1CC,EAAgD,qFAChDC,EAAqC,+DACrCC,EAAiD,uFACjDC,EAAoC,yEACpCC,EAAoD,6FACpDC,EAA6C,2FAC7CC,EAGO,8DACPC,EAA4C,8DAC5CC,EAA+B,kDAC/BjB,EAAqC,+CACrCkB,EAA6B,4CAC7BlC,EAAAN,EAAc,gDA/Gd,gBAgHA,IAAAyC,EAGO,kDACPC,EAAyC,mFACzCC,GAAuC,+EACvCC,GAA8C,6FAC9CC,GAAyC,mFACzCpC,GAAmC,iDAEnCqC,GAAsD,uEACtDC,GAAoD,qEACpDC,GAA4B,iDAC5BC,GAAoC,oCACpCC,GAA2C,2CAC3C5C,EAAAN,EAAc,sBA/Hd,gBAgIA,IAAAmD,EAGO,yDACPC,GAAyB,iDACzBC,GAA8B,wDAC9BC,GAAuC,iEAEvCC,GAAsC,gEACtCC,GAAgC,gDAChCC,GAGO,6DACPnD,EAAAN,EAAc,uCA9Id,gBA+IA,IAAA0D,GAAyC,yDACzCA,GAA2C,8DAC3CpD,EAAAN,EAAc,sBAjJd,gBAkJA,IAAA2D,EAAyD,+BACzDC,GAAmC,yCAMnCC,EAIO,mCACPC,EAIO",
|
|
6
6
|
"names": ["api_exports", "__export", "__toCommonJS", "import_Apdu", "import_ApduBuilder", "import_ApduParser", "__reExport", "import_ByteArrayBuilder", "import_ByteArrayParser", "import_Errors", "import_CommandResult", "import_CloseAppCommand", "import_GetAppAndVersionCommand", "import_GetBackgroundImageSizeCommand", "import_GetBatteryStatusCommand", "import_GetOsVersionCommand", "import_ListAppsCommand", "import_LoadCertificateCommand", "import_OpenAppCommand", "import_CommandErrors", "import_CommandUtils", "import_GlobalCommandError", "import_DeviceModel", "import_DeviceStatus", "import_DeviceActionState", "import_UserInteractionRequired", "import_CallTaskInAppDeviceAction", "import_Const", "import_GetDeviceMetadataDeviceAction", "import_GetDeviceStatusDeviceAction", "import_GoToDashboardDeviceAction", "import_InstallOrUpdateAppsDeviceAction", "import_ListAppsDeviceAction", "import_ListAppsWithMetadataDeviceAction", "import_OpenAppDeviceAction", "import_OpenAppWithDependenciesDeviceAction", "import_SendCommandInAppDeviceAction", "import_XStateDeviceAction", "import_StaticDeviceModelDataSource", "import_BleDeviceInfos", "import_ApduResponse", "import_DeviceSessionState", "import_GenuineCheckDeviceAction", "import_InstallAppDeviceAction", "import_ListInstalledAppsDeviceAction", "import_UninstallAppDeviceAction", "import_DefaultApduReceiverService", "import_DefaultApduSenderService", "import_FramerUtils", "import_DeviceManagementKit", "import_DeviceManagementKitBuilder", "import_noopLoggerFactory", "import_LogLevel", "import_ConsoleLogger", "import_DefaultLogTagFormatter", "import_WebLogsExporterLogger", "import_ConnectedDevice", "import_DeviceConnectionStateMachine", "import_TransportConnectedDevice", "import_apduLogs", "import_ApplicationChecker", "import_Base64String", "import_HexaString"]
|
|
7
7
|
}
|
package/lib/esm/package.json
CHANGED
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"watch:builds": "pnpm ldmk-tool watch --entryPoints index.ts,src/**/*.ts --tsconfig tsconfig.prod.json",
|
|
65
65
|
"watch:types": "concurrently \"tsc --watch -p tsconfig.prod.json\" \"tsc-alias --watch -p tsconfig.prod.json\""
|
|
66
66
|
},
|
|
67
|
-
"version": "0.0.0-develop-
|
|
67
|
+
"version": "0.0.0-develop-20260313001318"
|
|
68
68
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Left as d,Right as m}from"purify-ts";import{assign as n,setup as A}from"xstate";import{UserInteractionRequired as a}from"../../../device-action/model/UserInteractionRequired";import{DEFAULT_UNLOCK_TIMEOUT_MS as
|
|
1
|
+
import{Left as d,Right as m}from"purify-ts";import{assign as n,setup as A}from"xstate";import{UserInteractionRequired as a}from"../../../device-action/model/UserInteractionRequired";import{DEFAULT_UNLOCK_TIMEOUT_MS as h}from"../../../device-action/os/Const";import{UnsupportedFirmwareDAError as D}from"../../../device-action/os/Errors";import{GetDeviceMetadataDeviceAction as v}from"../../../device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction";import{InstallOrUpdateAppsDeviceAction as O}from"../../../device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction";import{OpenAppDeviceAction as I}from"../../../device-action/os/OpenAppDeviceAction/OpenAppDeviceAction";import{XStateDeviceAction as M}from"../../../device-action/xstate-utils/XStateDeviceAction";import{openAppWithDependenciesDAStateStep as S}from"./types";class q extends M{makeStateMachine(p){const i=this.input.unlockTimeout??h,o=new v({input:{unlockTimeout:i,useSecureChannel:!0,forceUpdate:!1}}).makeStateMachine(p),c=new O({input:{unlockTimeout:i,applications:[...this.input.dependencies,this.input.application],allowMissingApplication:this.input.allowMissingApplication??!1}}).makeStateMachine(p),s=new I({input:{unlockTimeout:i,appName:this.input.application.name}}).makeStateMachine(p);return A({types:{input:{unlockTimeout:i},context:{},output:{}},actors:{getMetadata:o,installApps:c,openApp:s},guards:{hasError:({context:e})=>e._internalState.error!==null},actions:{assignErrorFromEvent:n({_internalState:e=>({...e.context._internalState,error:e.event.error})})}}).createMachine({id:"OpenAppWithDependenciesDeviceAction",initial:"DeviceReady",context:e=>({input:{application:e.input.application,dependencies:e.input.dependencies,requireLatestFirmware:e.input.requireLatestFirmware,unlockTimeout:e.input.unlockTimeout},intermediateValue:{requiredUserInteraction:a.None,step:S.GET_DEVICE_METADATA,installPlan:null},_internalState:{error:null,deviceMetadata:null,installResult:null}}),states:{DeviceReady:{always:[{target:"GetDeviceMetadata"}]},GetDeviceMetadata:{exit:n({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:a.None})}),invoke:{id:"getMetadata",src:"getMetadata",input:e=>({unlockTimeout:e.context.input.unlockTimeout,useSecureChannel:!0,forceUpdate:!1}),onSnapshot:{actions:n({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:e.event.snapshot.context.intermediateValue.requiredUserInteraction,deviceId:e.event.snapshot.context.intermediateValue.deviceId??e.context.intermediateValue.deviceId})})},onDone:{target:"GetDeviceMetadataCheck",actions:n({_internalState:e=>e.event.output.caseOf({Right:t=>e.context.input.requireLatestFirmware&&t.firmwareUpdateContext.availableUpdate!==void 0?{...e.context._internalState,error:new D("Firmware is not the latest version")}:{...e.context._internalState,deviceMetadata:t},Left:t=>({...e.context._internalState,error:t})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},GetDeviceMetadataCheck:{always:[{target:"Error",guard:"hasError"},{target:"InstallDependencies"}]},InstallDependencies:{exit:n({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:a.None})}),invoke:{src:"installApps",input:e=>({unlockTimeout:e.context.input.unlockTimeout,applications:[...e.context.input.dependencies,e.context.input.application],allowMissingApplication:this.input.allowMissingApplication??!1}),onSnapshot:{actions:n({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:e.event.snapshot.context.intermediateValue.requiredUserInteraction,installPlan:e.event.snapshot.context.intermediateValue.installPlan,deviceId:e.event.snapshot.context.intermediateValue.deviceId??e.context.intermediateValue.deviceId})})},onDone:{target:"InstallDependenciesCheck",actions:n({_internalState:e=>e.event.output.caseOf({Right:t=>({...e.context._internalState,installResult:t}),Left:t=>({...e.context._internalState,error:t})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},InstallDependenciesCheck:{always:[{guard:"hasError",target:"Error"},{target:"OpenApp"}]},OpenApp:{exit:n({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:a.None})}),invoke:{src:"openApp",input:e=>({unlockTimeout:e.context.input.unlockTimeout,appName:e.context.input.application.name}),onSnapshot:{actions:n({intermediateValue:e=>({...e.context.intermediateValue,requiredUserInteraction:e.event.snapshot.context.intermediateValue.requiredUserInteraction,installPlan:null})})},onDone:{target:"OpenAppCheck",actions:n({_internalState:e=>e.event.output.caseOf({Right:()=>e.context._internalState,Left:t=>({...e.context._internalState,error:t})})})},onError:{target:"Error",actions:"assignErrorFromEvent"}}},OpenAppCheck:{always:[{guard:"hasError",target:"Error"},{target:"Success"}]},Success:{type:"final"},Error:{type:"final"}},output:e=>{const{context:t}=e,{error:r,deviceMetadata:l,installResult:u}=t._internalState;return r?d(r):m({deviceMetadata:l,installResult:u})}})}}export{q as OpenAppWithDependenciesDeviceAction};
|
|
2
2
|
//# sourceMappingURL=OpenAppWithDependenciesDeviceAction.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.ts"],
|
|
4
|
-
"sourcesContent": ["import { Left, Right } from \"purify-ts\";\nimport { assign, setup } from \"xstate\";\n\nimport { type InternalApi } from \"@api/device-action/DeviceAction\";\nimport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nimport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nimport { UnsupportedFirmwareDAError } from \"@api/device-action/os/Errors\";\nimport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nimport type { GetDeviceMetadataDAOutput } from \"@api/device-action/os/GetDeviceMetadata/types\";\nimport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nimport type { InstallOrUpdateAppsDAOutput } from \"@api/device-action/os/InstallOrUpdateApps/types\";\nimport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nimport { type StateMachineTypes } from \"@api/device-action/xstate-utils/StateMachineTypes\";\nimport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\n\nimport {\n type OpenAppWithDependenciesDAError,\n type OpenAppWithDependenciesDAInput,\n type OpenAppWithDependenciesDAIntermediateValue,\n type OpenAppWithDependenciesDAOutput,\n openAppWithDependenciesDAStateStep,\n} from \"./types\";\n\ntype OpenAppWithDependenciesMachineInternalState = {\n readonly error: OpenAppWithDependenciesDAError | null;\n readonly deviceMetadata: GetDeviceMetadataDAOutput | null;\n readonly installResult: InstallOrUpdateAppsDAOutput | null;\n};\n\nexport class OpenAppWithDependenciesDeviceAction extends XStateDeviceAction<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAInput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue,\n OpenAppWithDependenciesMachineInternalState\n> {\n makeStateMachine(\n internalApi: InternalApi,\n ): DeviceActionStateMachine<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAInput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue,\n OpenAppWithDependenciesMachineInternalState\n > {\n type types = StateMachineTypes<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAInput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue,\n OpenAppWithDependenciesMachineInternalState\n >;\n\n const unlockTimeout = this.input.unlockTimeout ?? DEFAULT_UNLOCK_TIMEOUT_MS;\n\n const getMetadataMachine = new GetDeviceMetadataDeviceAction({\n input: {\n unlockTimeout,\n useSecureChannel: true,\n forceUpdate: false,\n },\n }).makeStateMachine(internalApi);\n\n const installAppsMachine = new InstallOrUpdateAppsDeviceAction({\n input: {\n unlockTimeout,\n applications: [...this.input.dependencies, this.input.application],\n allowMissingApplication: false,\n },\n }).makeStateMachine(internalApi);\n\n const openAppMachine = new OpenAppDeviceAction({\n input: {\n unlockTimeout,\n appName: this.input.application.name,\n },\n }).makeStateMachine(internalApi);\n\n return setup({\n types: {\n input: {\n unlockTimeout,\n } as types[\"input\"],\n context: {} as types[\"context\"],\n output: {} as types[\"output\"],\n },\n actors: {\n getMetadata: getMetadataMachine,\n installApps: installAppsMachine,\n openApp: openAppMachine,\n },\n guards: {\n hasError: ({ context }) => context._internalState.error !== null,\n },\n actions: {\n assignErrorFromEvent: assign({\n _internalState: (_) => ({\n ..._.context._internalState,\n error: _.event[\"error\"], // NOTE: it should never happen, the error is not typed anymore here\n }),\n }),\n },\n }).createMachine({\n id: \"OpenAppWithDependenciesDeviceAction\",\n initial: \"DeviceReady\",\n context: (_) => {\n return {\n input: {\n application: _.input.application,\n dependencies: _.input.dependencies,\n requireLatestFirmware: _.input.requireLatestFirmware,\n unlockTimeout: _.input.unlockTimeout,\n },\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.None,\n step: openAppWithDependenciesDAStateStep.GET_DEVICE_METADATA,\n installPlan: null,\n },\n _internalState: {\n error: null,\n deviceMetadata: null,\n installResult: null,\n },\n };\n },\n states: {\n DeviceReady: {\n always: [\n {\n target: \"GetDeviceMetadata\",\n },\n ],\n },\n GetDeviceMetadata: {\n exit: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction: UserInteractionRequired.None,\n }),\n }),\n invoke: {\n id: \"getMetadata\",\n src: \"getMetadata\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n useSecureChannel: true,\n forceUpdate: false,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n deviceId:\n _.event.snapshot.context.intermediateValue.deviceId ??\n _.context.intermediateValue.deviceId,\n }),\n }),\n },\n onDone: {\n target: \"GetDeviceMetadataCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<OpenAppWithDependenciesMachineInternalState>(\n {\n Right: (data) => {\n if (\n _.context.input.requireLatestFirmware &&\n data.firmwareUpdateContext.availableUpdate !==\n undefined\n ) {\n return {\n ..._.context._internalState,\n error: new UnsupportedFirmwareDAError(\n \"Firmware is not the latest version\",\n ),\n };\n } else {\n return {\n ..._.context._internalState,\n deviceMetadata: data,\n };\n }\n },\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n },\n ),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n GetDeviceMetadataCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n {\n target: \"InstallDependencies\",\n },\n ],\n },\n InstallDependencies: {\n exit: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction: UserInteractionRequired.None,\n }),\n }),\n invoke: {\n src: \"installApps\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n applications: [\n ..._.context.input.dependencies,\n _.context.input.application,\n ],\n allowMissingApplication: false,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n installPlan:\n _.event.snapshot.context.intermediateValue.installPlan,\n deviceId:\n _.event.snapshot.context.intermediateValue.deviceId ??\n _.context.intermediateValue.deviceId,\n }),\n }),\n },\n onDone: {\n target: \"InstallDependenciesCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<OpenAppWithDependenciesMachineInternalState>(\n {\n Right: (data) => ({\n ..._.context._internalState,\n installResult: data,\n }),\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n },\n ),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n InstallDependenciesCheck: {\n always: [\n {\n guard: \"hasError\",\n target: \"Error\",\n },\n {\n target: \"OpenApp\",\n },\n ],\n },\n OpenApp: {\n exit: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction: UserInteractionRequired.None,\n }),\n }),\n invoke: {\n src: \"openApp\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n appName: _.context.input.application.name,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n installPlan: null,\n }),\n }),\n },\n onDone: {\n target: \"OpenAppCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<OpenAppWithDependenciesMachineInternalState>(\n {\n Right: () => _.context._internalState,\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n },\n ),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n OpenAppCheck: {\n always: [\n {\n guard: \"hasError\",\n target: \"Error\",\n },\n {\n target: \"Success\",\n },\n ],\n },\n Success: {\n type: \"final\",\n },\n Error: {\n type: \"final\",\n },\n },\n output: (args) => {\n const { context } = args;\n const { error, deviceMetadata, installResult } = context._internalState;\n if (error) {\n return Left(error);\n }\n return Right({\n deviceMetadata: deviceMetadata!,\n installResult: installResult!,\n });\n },\n });\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,QAAAA,EAAM,SAAAC,MAAa,YAC5B,OAAS,UAAAC,EAAQ,SAAAC,MAAa,SAG9B,OAAS,2BAAAC,MAA+B,mDACxC,OAAS,6BAAAC,MAAiC,8BAC1C,OAAS,8BAAAC,MAAkC,+BAC3C,OAAS,iCAAAC,MAAqC,wEAE9C,OAAS,mCAAAC,MAAuC,4EAEhD,OAAS,uBAAAC,MAA2B,gEAEpC,OAEE,sBAAAC,MACK,qDAEP,OAKE,sCAAAC,MACK,UAQA,MAAMC,UAA4CF,CAMvD,CACA,iBACEG,EAOA,CASA,MAAMC,EAAgB,KAAK,MAAM,eAAiBT,EAE5CU,EAAqB,IAAIR,EAA8B,CAC3D,MAAO,CACL,cAAAO,EACA,iBAAkB,GAClB,YAAa,EACf,CACF,CAAC,EAAE,iBAAiBD,CAAW,EAEzBG,EAAqB,IAAIR,EAAgC,CAC7D,MAAO,CACL,cAAAM,EACA,aAAc,CAAC,GAAG,KAAK,MAAM,aAAc,KAAK,MAAM,WAAW,EACjE,wBAAyB,
|
|
4
|
+
"sourcesContent": ["import { Left, Right } from \"purify-ts\";\nimport { assign, setup } from \"xstate\";\n\nimport { type InternalApi } from \"@api/device-action/DeviceAction\";\nimport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nimport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nimport { UnsupportedFirmwareDAError } from \"@api/device-action/os/Errors\";\nimport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nimport type { GetDeviceMetadataDAOutput } from \"@api/device-action/os/GetDeviceMetadata/types\";\nimport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nimport type { InstallOrUpdateAppsDAOutput } from \"@api/device-action/os/InstallOrUpdateApps/types\";\nimport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nimport { type StateMachineTypes } from \"@api/device-action/xstate-utils/StateMachineTypes\";\nimport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\n\nimport {\n type OpenAppWithDependenciesDAError,\n type OpenAppWithDependenciesDAInput,\n type OpenAppWithDependenciesDAIntermediateValue,\n type OpenAppWithDependenciesDAOutput,\n openAppWithDependenciesDAStateStep,\n} from \"./types\";\n\ntype OpenAppWithDependenciesMachineInternalState = {\n readonly error: OpenAppWithDependenciesDAError | null;\n readonly deviceMetadata: GetDeviceMetadataDAOutput | null;\n readonly installResult: InstallOrUpdateAppsDAOutput | null;\n};\n\nexport class OpenAppWithDependenciesDeviceAction extends XStateDeviceAction<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAInput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue,\n OpenAppWithDependenciesMachineInternalState\n> {\n makeStateMachine(\n internalApi: InternalApi,\n ): DeviceActionStateMachine<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAInput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue,\n OpenAppWithDependenciesMachineInternalState\n > {\n type types = StateMachineTypes<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAInput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue,\n OpenAppWithDependenciesMachineInternalState\n >;\n\n const unlockTimeout = this.input.unlockTimeout ?? DEFAULT_UNLOCK_TIMEOUT_MS;\n\n const getMetadataMachine = new GetDeviceMetadataDeviceAction({\n input: {\n unlockTimeout,\n useSecureChannel: true,\n forceUpdate: false,\n },\n }).makeStateMachine(internalApi);\n\n const installAppsMachine = new InstallOrUpdateAppsDeviceAction({\n input: {\n unlockTimeout,\n applications: [...this.input.dependencies, this.input.application],\n allowMissingApplication: this.input.allowMissingApplication ?? false,\n },\n }).makeStateMachine(internalApi);\n\n const openAppMachine = new OpenAppDeviceAction({\n input: {\n unlockTimeout,\n appName: this.input.application.name,\n },\n }).makeStateMachine(internalApi);\n\n return setup({\n types: {\n input: {\n unlockTimeout,\n } as types[\"input\"],\n context: {} as types[\"context\"],\n output: {} as types[\"output\"],\n },\n actors: {\n getMetadata: getMetadataMachine,\n installApps: installAppsMachine,\n openApp: openAppMachine,\n },\n guards: {\n hasError: ({ context }) => context._internalState.error !== null,\n },\n actions: {\n assignErrorFromEvent: assign({\n _internalState: (_) => ({\n ..._.context._internalState,\n error: _.event[\"error\"], // NOTE: it should never happen, the error is not typed anymore here\n }),\n }),\n },\n }).createMachine({\n id: \"OpenAppWithDependenciesDeviceAction\",\n initial: \"DeviceReady\",\n context: (_) => {\n return {\n input: {\n application: _.input.application,\n dependencies: _.input.dependencies,\n requireLatestFirmware: _.input.requireLatestFirmware,\n unlockTimeout: _.input.unlockTimeout,\n },\n intermediateValue: {\n requiredUserInteraction: UserInteractionRequired.None,\n step: openAppWithDependenciesDAStateStep.GET_DEVICE_METADATA,\n installPlan: null,\n },\n _internalState: {\n error: null,\n deviceMetadata: null,\n installResult: null,\n },\n };\n },\n states: {\n DeviceReady: {\n always: [\n {\n target: \"GetDeviceMetadata\",\n },\n ],\n },\n GetDeviceMetadata: {\n exit: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction: UserInteractionRequired.None,\n }),\n }),\n invoke: {\n id: \"getMetadata\",\n src: \"getMetadata\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n useSecureChannel: true,\n forceUpdate: false,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n deviceId:\n _.event.snapshot.context.intermediateValue.deviceId ??\n _.context.intermediateValue.deviceId,\n }),\n }),\n },\n onDone: {\n target: \"GetDeviceMetadataCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<OpenAppWithDependenciesMachineInternalState>(\n {\n Right: (data) => {\n if (\n _.context.input.requireLatestFirmware &&\n data.firmwareUpdateContext.availableUpdate !==\n undefined\n ) {\n return {\n ..._.context._internalState,\n error: new UnsupportedFirmwareDAError(\n \"Firmware is not the latest version\",\n ),\n };\n } else {\n return {\n ..._.context._internalState,\n deviceMetadata: data,\n };\n }\n },\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n },\n ),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n GetDeviceMetadataCheck: {\n always: [\n {\n target: \"Error\",\n guard: \"hasError\",\n },\n {\n target: \"InstallDependencies\",\n },\n ],\n },\n InstallDependencies: {\n exit: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction: UserInteractionRequired.None,\n }),\n }),\n invoke: {\n src: \"installApps\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n applications: [\n ..._.context.input.dependencies,\n _.context.input.application,\n ],\n allowMissingApplication:\n this.input.allowMissingApplication ?? false,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n installPlan:\n _.event.snapshot.context.intermediateValue.installPlan,\n deviceId:\n _.event.snapshot.context.intermediateValue.deviceId ??\n _.context.intermediateValue.deviceId,\n }),\n }),\n },\n onDone: {\n target: \"InstallDependenciesCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<OpenAppWithDependenciesMachineInternalState>(\n {\n Right: (data) => ({\n ..._.context._internalState,\n installResult: data,\n }),\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n },\n ),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n InstallDependenciesCheck: {\n always: [\n {\n guard: \"hasError\",\n target: \"Error\",\n },\n {\n target: \"OpenApp\",\n },\n ],\n },\n OpenApp: {\n exit: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction: UserInteractionRequired.None,\n }),\n }),\n invoke: {\n src: \"openApp\",\n input: (_) => ({\n unlockTimeout: _.context.input.unlockTimeout,\n appName: _.context.input.application.name,\n }),\n onSnapshot: {\n actions: assign({\n intermediateValue: (_) => ({\n ..._.context.intermediateValue,\n requiredUserInteraction:\n _.event.snapshot.context.intermediateValue\n .requiredUserInteraction,\n installPlan: null,\n }),\n }),\n },\n onDone: {\n target: \"OpenAppCheck\",\n actions: assign({\n _internalState: (_) =>\n _.event.output.caseOf<OpenAppWithDependenciesMachineInternalState>(\n {\n Right: () => _.context._internalState,\n Left: (error) => ({\n ..._.context._internalState,\n error,\n }),\n },\n ),\n }),\n },\n onError: {\n target: \"Error\",\n actions: \"assignErrorFromEvent\",\n },\n },\n },\n OpenAppCheck: {\n always: [\n {\n guard: \"hasError\",\n target: \"Error\",\n },\n {\n target: \"Success\",\n },\n ],\n },\n Success: {\n type: \"final\",\n },\n Error: {\n type: \"final\",\n },\n },\n output: (args) => {\n const { context } = args;\n const { error, deviceMetadata, installResult } = context._internalState;\n if (error) {\n return Left(error);\n }\n return Right({\n deviceMetadata: deviceMetadata!,\n installResult: installResult!,\n });\n },\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["Left", "Right", "assign", "setup", "UserInteractionRequired", "DEFAULT_UNLOCK_TIMEOUT_MS", "UnsupportedFirmwareDAError", "GetDeviceMetadataDeviceAction", "InstallOrUpdateAppsDeviceAction", "OpenAppDeviceAction", "XStateDeviceAction", "openAppWithDependenciesDAStateStep", "OpenAppWithDependenciesDeviceAction", "internalApi", "unlockTimeout", "getMetadataMachine", "installAppsMachine", "openAppMachine", "context", "_", "data", "error", "args", "deviceMetadata", "installResult"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/api/device-action/os/OpenAppWithDependencies/types.ts"],
|
|
4
|
-
"sourcesContent": ["import type { CommandErrorResult } from \"@api/command/model/CommandResult\";\nimport type { DeviceActionState } from \"@api/device-action/model/DeviceActionState\";\nimport type {\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nimport type {\n GetDeviceMetadataDAOutput,\n GetDeviceMetadataDARequiredInteraction,\n} from \"@api/device-action/os/GetDeviceMetadata/types\";\nimport type { GetDeviceStatusDAInput } from \"@api/device-action/os/GetDeviceStatus/types\";\nimport type {\n ApplicationDependency,\n InstallOrUpdateAppsDAError,\n InstallOrUpdateAppsDAOutput,\n InstallOrUpdateAppsDARequiredInteraction,\n InstallPlan,\n} from \"@api/device-action/os/InstallOrUpdateApps/types\";\nimport type {\n OpenAppDAError,\n OpenAppDARequiredInteraction,\n} from \"@api/device-action/os/OpenAppDeviceAction/types\";\n\nexport const openAppWithDependenciesDAStateStep = Object.freeze({\n GET_DEVICE_METADATA: \"os.openAppWithDependencies.steps.getDeviceMetadata\",\n INSTALL_OR_UPDATE_APPS:\n \"os.openAppWithDependencies.steps.installOrUpdateApps\",\n OPEN_APP: \"os.openAppWithDependencies.steps.openApp\",\n} as const);\n\nexport type OpenAppWithDependenciesDAStateStep =\n (typeof openAppWithDependenciesDAStateStep)[keyof typeof openAppWithDependenciesDAStateStep];\n\nexport type OpenAppWithDependenciesDAOutput = {\n deviceMetadata: GetDeviceMetadataDAOutput;\n installResult: InstallOrUpdateAppsDAOutput;\n};\n\nexport type OpenAppWithDependenciesDAInput = GetDeviceStatusDAInput & {\n readonly application: ApplicationDependency;\n readonly dependencies: ApplicationDependency[];\n readonly requireLatestFirmware?: boolean;\n};\n\nexport type OpenAppWithDependenciesDAError =\n | InstallOrUpdateAppsDAError\n | OpenAppDAError\n | UnknownDAError\n | UnsupportedFirmwareDAError\n | CommandErrorResult[\"error\"];\n\nexport type OpenAppWithDependenciesDARequiredInteraction =\n | GetDeviceMetadataDARequiredInteraction\n | InstallOrUpdateAppsDARequiredInteraction\n | OpenAppDARequiredInteraction;\n\nexport type OpenAppWithDependenciesDAIntermediateValue = {\n requiredUserInteraction: OpenAppWithDependenciesDARequiredInteraction;\n installPlan: InstallPlan | null;\n deviceId?: Uint8Array;\n step: OpenAppWithDependenciesDAStateStep;\n};\n\nexport type OpenAppWithDependenciesDAState = DeviceActionState<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue\n>;\n"],
|
|
4
|
+
"sourcesContent": ["import type { CommandErrorResult } from \"@api/command/model/CommandResult\";\nimport type { DeviceActionState } from \"@api/device-action/model/DeviceActionState\";\nimport type {\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nimport type {\n GetDeviceMetadataDAOutput,\n GetDeviceMetadataDARequiredInteraction,\n} from \"@api/device-action/os/GetDeviceMetadata/types\";\nimport type { GetDeviceStatusDAInput } from \"@api/device-action/os/GetDeviceStatus/types\";\nimport type {\n ApplicationDependency,\n InstallOrUpdateAppsDAError,\n InstallOrUpdateAppsDAOutput,\n InstallOrUpdateAppsDARequiredInteraction,\n InstallPlan,\n} from \"@api/device-action/os/InstallOrUpdateApps/types\";\nimport type {\n OpenAppDAError,\n OpenAppDARequiredInteraction,\n} from \"@api/device-action/os/OpenAppDeviceAction/types\";\n\nexport const openAppWithDependenciesDAStateStep = Object.freeze({\n GET_DEVICE_METADATA: \"os.openAppWithDependencies.steps.getDeviceMetadata\",\n INSTALL_OR_UPDATE_APPS:\n \"os.openAppWithDependencies.steps.installOrUpdateApps\",\n OPEN_APP: \"os.openAppWithDependencies.steps.openApp\",\n} as const);\n\nexport type OpenAppWithDependenciesDAStateStep =\n (typeof openAppWithDependenciesDAStateStep)[keyof typeof openAppWithDependenciesDAStateStep];\n\nexport type OpenAppWithDependenciesDAOutput = {\n deviceMetadata: GetDeviceMetadataDAOutput;\n installResult: InstallOrUpdateAppsDAOutput;\n};\n\nexport type OpenAppWithDependenciesDAInput = GetDeviceStatusDAInput & {\n readonly application: ApplicationDependency;\n readonly dependencies: ApplicationDependency[];\n readonly requireLatestFirmware?: boolean;\n readonly allowMissingApplication?: boolean;\n};\n\nexport type OpenAppWithDependenciesDAError =\n | InstallOrUpdateAppsDAError\n | OpenAppDAError\n | UnknownDAError\n | UnsupportedFirmwareDAError\n | CommandErrorResult[\"error\"];\n\nexport type OpenAppWithDependenciesDARequiredInteraction =\n | GetDeviceMetadataDARequiredInteraction\n | InstallOrUpdateAppsDARequiredInteraction\n | OpenAppDARequiredInteraction;\n\nexport type OpenAppWithDependenciesDAIntermediateValue = {\n requiredUserInteraction: OpenAppWithDependenciesDARequiredInteraction;\n installPlan: InstallPlan | null;\n deviceId?: Uint8Array;\n step: OpenAppWithDependenciesDAStateStep;\n};\n\nexport type OpenAppWithDependenciesDAState = DeviceActionState<\n OpenAppWithDependenciesDAOutput,\n OpenAppWithDependenciesDAError,\n OpenAppWithDependenciesDAIntermediateValue\n>;\n"],
|
|
5
5
|
"mappings": "AAuBO,MAAMA,EAAqC,OAAO,OAAO,CAC9D,oBAAqB,qDACrB,uBACE,uDACF,SAAU,0CACZ,CAAU",
|
|
6
6
|
"names": ["openAppWithDependenciesDAStateStep"]
|
|
7
7
|
}
|
package/lib/esm/src/api/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Apdu as r}from"./apdu/model/Apdu";import{APDU_MAX_PAYLOAD as p,ApduBuilder as a}from"./apdu/utils/ApduBuilder";import{ApduParser as n}from"./apdu/utils/ApduParser";export*from"./apdu/utils/AppBuilderError";import{ByteArrayBuilder as c}from"./apdu/utils/ByteArrayBuilder";import{ByteArrayParser as d}from"./apdu/utils/ByteArrayParser";import{InvalidGetFirmwareMetadataResponseError as A,InvalidStatusWordError as
|
|
1
|
+
import{Apdu as r}from"./apdu/model/Apdu";import{APDU_MAX_PAYLOAD as p,ApduBuilder as a}from"./apdu/utils/ApduBuilder";import{ApduParser as n}from"./apdu/utils/ApduParser";export*from"./apdu/utils/AppBuilderError";import{ByteArrayBuilder as c}from"./apdu/utils/ByteArrayBuilder";import{ByteArrayParser as d}from"./apdu/utils/ByteArrayParser";import{InvalidGetFirmwareMetadataResponseError as A,InvalidResponseFormatError as D,InvalidStatusWordError as u}from"./command/Errors";import{CommandResultFactory as v,CommandResultStatus as S,isSuccessCommandResult as y}from"./command/model/CommandResult";import{CloseAppCommand as C}from"./command/os/CloseAppCommand";import{GetAppAndVersionCommand as L}from"./command/os/GetAppAndVersionCommand";import{GetBackgroundImageSizeCommand as B,GetBackgroundImageSizeCommandError as R}from"./command/os/GetBackgroundImageSizeCommand";import{BatteryStatusType as T,GetBatteryStatusCommand as b}from"./command/os/GetBatteryStatusCommand";import{GetOsVersionCommand as O}from"./command/os/GetOsVersionCommand";import{ListAppsCommand as U}from"./command/os/ListAppsCommand";import{LoadCertificateCommand as F}from"./command/os/LoadCertificateCommand";import{OpenAppCommand as V}from"./command/os/OpenAppCommand";import{isCommandErrorCode as P}from"./command/utils/CommandErrors";import{CommandUtils as w}from"./command/utils/CommandUtils";import{GLOBAL_ERRORS as K,GlobalCommandError as N,GlobalCommandErrorHandler as q}from"./command/utils/GlobalCommandError";import{DeviceModel as Y,DeviceModelId as j,LEDGER_VENDOR_ID as J}from"./device/DeviceModel";import{DeviceStatus as Z}from"./device/DeviceStatus";import{DeviceActionStatus as ee}from"./device-action/model/DeviceActionState";import{UserInteractionRequired as re}from"./device-action/model/UserInteractionRequired";import{CallTaskInAppDeviceAction as pe}from"./device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction";import{DEFAULT_UNLOCK_TIMEOUT_MS as ie}from"./device-action/os/Const";import{AppAlreadyInstalledDAError as me,DeviceLockedError as se,DeviceNotOnboardedError as ce,OutOfMemoryDAError as fe,RefusedByUserDAError as de,UnknownDAError as xe,UnsupportedFirmwareDAError as Ae}from"./device-action/os/Errors";import{GetDeviceMetadataDeviceAction as ue}from"./device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction";import{GetDeviceStatusDeviceAction as ve}from"./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction";import{GoToDashboardDeviceAction as ye}from"./device-action/os/GoToDashboard/GoToDashboardDeviceAction";import{InstallOrUpdateAppsDeviceAction as Ce}from"./device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction";import{ListAppsDeviceAction as Le}from"./device-action/os/ListApps/ListAppsDeviceAction";import{ListAppsWithMetadataDeviceAction as Be}from"./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction";import{OpenAppDeviceAction as Ie}from"./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction";import{OpenAppWithDependenciesDeviceAction as be}from"./device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction";import{SendCommandInAppDeviceAction as Oe}from"./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction";import{XStateDeviceAction as Ue}from"./device-action/xstate-utils/XStateDeviceAction";import{StaticDeviceModelDataSource as Fe}from"./device-model/data/StaticDeviceModelDataSource";import{BleDeviceInfos as Ve}from"./device-model/model/BleDeviceInfos";import{TransportDeviceModel as Pe}from"./device-model/model/DeviceModel";import{ApduResponse as we}from"./device-session/ApduResponse";export*from"./device-session/data/FramerConst";import{DeviceSessionStateType as Ne}from"./device-session/DeviceSessionState";import{GenuineCheckDeviceAction as Xe}from"./secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction";import{InstallAppDeviceAction as je}from"./secure-channel/device-action/InstallApp/InstallAppDeviceAction";import{ListInstalledAppsDeviceAction as Qe}from"./secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction";import{UninstallAppDeviceAction as $e}from"./secure-channel/device-action/UninstallApp/UninstallAppDeviceAction";import{SecureChannelError as oo}from"../internal/secure-channel/model/Errors";import{defaultApduReceiverServiceStubBuilder as to}from"./device-session/service/DefaultApduReceiverService.stub";import{defaultApduSenderServiceStubBuilder as ao}from"./device-session/service/DefaultApduSenderService.stub";import{FramerUtils as no}from"./device-session/utils/FramerUtils";import{DeviceManagementKit as so}from"./DeviceManagementKit";import{DeviceManagementKitBuilder as fo}from"./DeviceManagementKitBuilder";export*from"./Error";import{noopLogger as Do,noopLoggerFactory as uo}from"./logger-publisher/utils/noopLoggerFactory";import{LogLevel as vo}from"./logger-subscriber/model/LogLevel";import{ConsoleLogger as yo}from"./logger-subscriber/service/ConsoleLogger";import{DefaultLogTagFormatter as Co}from"./logger-subscriber/service/DefaultLogTagFormatter";import{WebLogsExporterLogger as Lo}from"./logger-subscriber/service/WebLogsExporterLogger";import{ConnectedDevice as Bo}from"./transport/model/ConnectedDevice";import{DeviceConnectionStateMachine as Io}from"./transport/model/DeviceConnectionStateMachine";export*from"./transport/model/Errors";import{TransportConnectedDevice as ho}from"./transport/model/TransportConnectedDevice";import{connectedDeviceStubBuilder as Mo}from"./transport/model/TransportConnectedDevice.stub";export*from"./types";import{formatApduReceivedLog as Fo,formatApduSentLog as _o}from"./utils/apduLogs";import{ApplicationChecker as zo}from"./utils/ApplicationChecker";import{base64StringToBuffer as Wo,bufferToBase64String as wo,isBase64String as Ho}from"./utils/Base64String";import{bufferToHexaString as No,hexaStringToBuffer as qo,isHexaString as Xo}from"./utils/HexaString";export{p as APDU_MAX_PAYLOAD,r as Apdu,a as ApduBuilder,n as ApduParser,we as ApduResponse,me as AppAlreadyInstalledDAError,zo as ApplicationChecker,T as BatteryStatusType,Ve as BleDeviceInfos,c as ByteArrayBuilder,d as ByteArrayParser,pe as CallTaskInAppDeviceAction,C as CloseAppCommand,v as CommandResultFactory,S as CommandResultStatus,w as CommandUtils,Bo as ConnectedDevice,yo as ConsoleLogger,ie as DEFAULT_UNLOCK_TIMEOUT_MS,Co as DefaultLogTagFormatter,ee as DeviceActionStatus,Io as DeviceConnectionStateMachine,se as DeviceLockedError,so as DeviceManagementKit,fo as DeviceManagementKitBuilder,Y as DeviceModel,j as DeviceModelId,ce as DeviceNotOnboardedError,Ne as DeviceSessionStateType,Z as DeviceStatus,no as FramerUtils,K as GLOBAL_ERRORS,Xe as GenuineCheckDeviceAction,L as GetAppAndVersionCommand,B as GetBackgroundImageSizeCommand,R as GetBackgroundImageSizeCommandError,b as GetBatteryStatusCommand,ue as GetDeviceMetadataDeviceAction,ve as GetDeviceStatusDeviceAction,O as GetOsVersionCommand,N as GlobalCommandError,q as GlobalCommandErrorHandler,ye as GoToDashboardDeviceAction,je as InstallAppDeviceAction,Ce as InstallOrUpdateAppsDeviceAction,A as InvalidGetFirmwareMetadataResponseError,D as InvalidResponseFormatError,u as InvalidStatusWordError,J as LEDGER_VENDOR_ID,U as ListAppsCommand,Le as ListAppsDeviceAction,Be as ListAppsWithMetadataDeviceAction,Qe as ListInstalledAppsDeviceAction,F as LoadCertificateCommand,vo as LogLevel,V as OpenAppCommand,Ie as OpenAppDeviceAction,be as OpenAppWithDependenciesDeviceAction,fe as OutOfMemoryDAError,de as RefusedByUserDAError,oo as SecureChannelError,Oe as SendCommandInAppDeviceAction,Fe as StaticDeviceModelDataSource,ho as TransportConnectedDevice,Pe as TransportDeviceModel,$e as UninstallAppDeviceAction,xe as UnknownDAError,Ae as UnsupportedFirmwareDAError,re as UserInteractionRequired,Lo as WebLogsExporterLogger,Ue as XStateDeviceAction,Wo as base64StringToBuffer,wo as bufferToBase64String,No as bufferToHexaString,Mo as connectedDeviceStubBuilder,to as defaultApduReceiverServiceStubBuilder,ao as defaultApduSenderServiceStubBuilder,Fo as formatApduReceivedLog,_o as formatApduSentLog,qo as hexaStringToBuffer,Ho as isBase64String,P as isCommandErrorCode,Xo as isHexaString,y as isSuccessCommandResult,Do as noopLogger,uo as noopLoggerFactory};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/api/index.ts"],
|
|
4
|
-
"sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { type Command } from \"@api/command/Command\";\nexport {\n InvalidGetFirmwareMetadataResponseError,\n InvalidStatusWordError,\n} from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n GetBackgroundImageSizeCommand,\n GetBackgroundImageSizeCommandError,\n type GetBackgroundImageSizeCommandResult,\n type GetBackgroundImageSizeErrorCodes,\n type GetBackgroundImageSizeResponse,\n} from \"@api/command/os/GetBackgroundImageSizeCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GLOBAL_ERRORS,\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nexport {\n AppAlreadyInstalledDAError,\n DeviceLockedError,\n DeviceNotOnboardedError,\n OutOfMemoryDAError,\n RefusedByUserDAError,\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nexport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport type {\n GoToDashboardDAError,\n GoToDashboardDAInput,\n GoToDashboardDAIntermediateValue,\n GoToDashboardDAOutput,\n GoToDashboardDARequiredInteraction,\n GoToDashboardDAState,\n} from \"@api/device-action/os/GoToDashboard/types\";\nexport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { OpenAppWithDependenciesDeviceAction } from \"@api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\nexport { SecureChannelError } from \"@internal/secure-channel/model/Errors\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport {\n noopLogger,\n noopLoggerFactory,\n} from \"@api/logger-publisher/utils/noopLoggerFactory\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { DefaultLogTagFormatter } from \"@api/logger-subscriber/service/DefaultLogTagFormatter\";\nexport { type LogTagFormatter } from \"@api/logger-subscriber/service/LogTagFormatter\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport {\n DeviceConnectionStateMachine,\n type DeviceConnectionStateMachineParams,\n} from \"@api/transport/model/DeviceConnectionStateMachine\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { formatApduReceivedLog, formatApduSentLog } from \"@api/utils/apduLogs\";\nexport { ApplicationChecker } from \"@api/utils/ApplicationChecker\";\nexport {\n type AppConfig,\n type ApplicationResolver,\n type ResolvedApp,\n} from \"@api/utils/ApplicationResolver\";\nexport {\n base64StringToBuffer,\n bufferToBase64String,\n isBase64String,\n} from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
|
|
5
|
-
"mappings": "AAEA,OAAS,QAAAA,MAAY,uBACrB,OAAS,oBAAAC,EAAkB,eAAAC,MAAmB,8BAC9C,OAAS,cAAAC,MAAkB,6BAC3B,WAAc,kCACd,OAAS,oBAAAC,MAAwB,mCACjC,OAAS,mBAAAC,MAAuB,kCAEhC,OACE,2CAAAC,EACA,0BAAAC,MACK,sBACP,OACE,wBAAAC,EACA,uBAAAC,EACA,0BAAAC,MACK,mCACP,OAAS,mBAAAC,MAAuB,kCAChC,OACE,2BAAAC,MAEK,0CACP,OACE,iCAAAC,EACA,sCAAAC,MAIK,gDACP,OACE,qBAAAC,EAEA,2BAAAC,MAEK,0CACP,OACE,uBAAAC,MAEK,sCACP,OAEE,mBAAAC,MAGK,kCACP,OAEE,0BAAAC,MAEK,yCACP,OAEE,kBAAAC,MACK,iCACP,OAAS,sBAAAC,MAA0B,mCACnC,OAAS,gBAAAC,MAAoB,kCAC7B,OACE,iBAAAC,EACA,sBAAAC,EACA,6BAAAC,MACK,wCACP,OACE,eAAAC,EACA,iBAAAC,EACA,oBAAAC,MACK,0BACP,OAAS,gBAAAC,MAAoB,2BAE7B,OAEE,sBAAAC,
|
|
6
|
-
"names": ["Apdu", "APDU_MAX_PAYLOAD", "ApduBuilder", "ApduParser", "ByteArrayBuilder", "ByteArrayParser", "InvalidGetFirmwareMetadataResponseError", "InvalidStatusWordError", "CommandResultFactory", "CommandResultStatus", "isSuccessCommandResult", "CloseAppCommand", "GetAppAndVersionCommand", "GetBackgroundImageSizeCommand", "GetBackgroundImageSizeCommandError", "BatteryStatusType", "GetBatteryStatusCommand", "GetOsVersionCommand", "ListAppsCommand", "LoadCertificateCommand", "OpenAppCommand", "isCommandErrorCode", "CommandUtils", "GLOBAL_ERRORS", "GlobalCommandError", "GlobalCommandErrorHandler", "DeviceModel", "DeviceModelId", "LEDGER_VENDOR_ID", "DeviceStatus", "DeviceActionStatus", "UserInteractionRequired", "CallTaskInAppDeviceAction", "DEFAULT_UNLOCK_TIMEOUT_MS", "AppAlreadyInstalledDAError", "DeviceLockedError", "DeviceNotOnboardedError", "OutOfMemoryDAError", "RefusedByUserDAError", "UnknownDAError", "UnsupportedFirmwareDAError", "GetDeviceMetadataDeviceAction", "GetDeviceStatusDeviceAction", "GoToDashboardDeviceAction", "InstallOrUpdateAppsDeviceAction", "ListAppsDeviceAction", "ListAppsWithMetadataDeviceAction", "OpenAppDeviceAction", "OpenAppWithDependenciesDeviceAction", "SendCommandInAppDeviceAction", "XStateDeviceAction", "StaticDeviceModelDataSource", "BleDeviceInfos", "TransportDeviceModel", "ApduResponse", "DeviceSessionStateType", "GenuineCheckDeviceAction", "InstallAppDeviceAction", "ListInstalledAppsDeviceAction", "UninstallAppDeviceAction", "SecureChannelError", "defaultApduReceiverServiceStubBuilder", "defaultApduSenderServiceStubBuilder", "FramerUtils", "DeviceManagementKit", "DeviceManagementKitBuilder", "noopLogger", "noopLoggerFactory", "LogLevel", "ConsoleLogger", "DefaultLogTagFormatter", "WebLogsExporterLogger", "ConnectedDevice", "DeviceConnectionStateMachine", "TransportConnectedDevice", "connectedDeviceStubBuilder", "formatApduReceivedLog", "formatApduSentLog", "ApplicationChecker", "base64StringToBuffer", "bufferToBase64String", "isBase64String", "bufferToHexaString", "hexaStringToBuffer", "isHexaString"]
|
|
4
|
+
"sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { type Command } from \"@api/command/Command\";\nexport {\n InvalidGetFirmwareMetadataResponseError,\n InvalidResponseFormatError,\n InvalidStatusWordError,\n} from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n GetBackgroundImageSizeCommand,\n GetBackgroundImageSizeCommandError,\n type GetBackgroundImageSizeCommandResult,\n type GetBackgroundImageSizeErrorCodes,\n type GetBackgroundImageSizeResponse,\n} from \"@api/command/os/GetBackgroundImageSizeCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GLOBAL_ERRORS,\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport { DEFAULT_UNLOCK_TIMEOUT_MS } from \"@api/device-action/os/Const\";\nexport {\n AppAlreadyInstalledDAError,\n DeviceLockedError,\n DeviceNotOnboardedError,\n OutOfMemoryDAError,\n RefusedByUserDAError,\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nexport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport type {\n GoToDashboardDAError,\n GoToDashboardDAInput,\n GoToDashboardDAIntermediateValue,\n GoToDashboardDAOutput,\n GoToDashboardDARequiredInteraction,\n GoToDashboardDAState,\n} from \"@api/device-action/os/GoToDashboard/types\";\nexport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { OpenAppWithDependenciesDeviceAction } from \"@api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\nexport { SecureChannelError } from \"@internal/secure-channel/model/Errors\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport {\n noopLogger,\n noopLoggerFactory,\n} from \"@api/logger-publisher/utils/noopLoggerFactory\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { DefaultLogTagFormatter } from \"@api/logger-subscriber/service/DefaultLogTagFormatter\";\nexport { type LogTagFormatter } from \"@api/logger-subscriber/service/LogTagFormatter\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport {\n DeviceConnectionStateMachine,\n type DeviceConnectionStateMachineParams,\n} from \"@api/transport/model/DeviceConnectionStateMachine\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { formatApduReceivedLog, formatApduSentLog } from \"@api/utils/apduLogs\";\nexport { ApplicationChecker } from \"@api/utils/ApplicationChecker\";\nexport {\n type AppConfig,\n type ApplicationResolver,\n type ResolvedApp,\n} from \"@api/utils/ApplicationResolver\";\nexport {\n base64StringToBuffer,\n bufferToBase64String,\n isBase64String,\n} from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
|
|
5
|
+
"mappings": "AAEA,OAAS,QAAAA,MAAY,uBACrB,OAAS,oBAAAC,EAAkB,eAAAC,MAAmB,8BAC9C,OAAS,cAAAC,MAAkB,6BAC3B,WAAc,kCACd,OAAS,oBAAAC,MAAwB,mCACjC,OAAS,mBAAAC,MAAuB,kCAEhC,OACE,2CAAAC,EACA,8BAAAC,EACA,0BAAAC,MACK,sBACP,OACE,wBAAAC,EACA,uBAAAC,EACA,0BAAAC,MACK,mCACP,OAAS,mBAAAC,MAAuB,kCAChC,OACE,2BAAAC,MAEK,0CACP,OACE,iCAAAC,EACA,sCAAAC,MAIK,gDACP,OACE,qBAAAC,EAEA,2BAAAC,MAEK,0CACP,OACE,uBAAAC,MAEK,sCACP,OAEE,mBAAAC,MAGK,kCACP,OAEE,0BAAAC,MAEK,yCACP,OAEE,kBAAAC,MACK,iCACP,OAAS,sBAAAC,MAA0B,mCACnC,OAAS,gBAAAC,MAAoB,kCAC7B,OACE,iBAAAC,EACA,sBAAAC,EACA,6BAAAC,MACK,wCACP,OACE,eAAAC,EACA,iBAAAC,EACA,oBAAAC,MACK,0BACP,OAAS,gBAAAC,MAAoB,2BAE7B,OAEE,sBAAAC,OACK,6CACP,OAAS,2BAAAC,OAA+B,mDACxC,OAAS,6BAAAC,OAAiC,4EAC1C,OAAS,6BAAAC,OAAiC,8BAC1C,OACE,8BAAAC,GACA,qBAAAC,GACA,2BAAAC,GACA,sBAAAC,GACA,wBAAAC,GACA,kBAAAC,GACA,8BAAAC,OACK,+BACP,OAAS,iCAAAC,OAAqC,wEAC9C,OAAS,+BAAAC,OAAmC,oEAC5C,OAAS,6BAAAC,OAAiC,gEAS1C,OAAS,mCAAAC,OAAuC,4EAChD,OAAS,wBAAAC,OAA4B,sDACrC,OAAS,oCAAAC,OAAwC,8EACjD,OAAS,uBAAAC,OAA2B,gEACpC,OAAS,uCAAAC,OAA2C,oFACpD,OAAS,gCAAAC,OAAoC,kFAC7C,OAEE,sBAAAC,OACK,qDACP,OAAS,+BAAAC,OAAmC,qDAC5C,OAAS,kBAAAC,OAAsB,yCAC/B,OAAS,wBAAAC,OAA4B,sCACrC,OAAS,gBAAAC,OAAoB,mCAC7B,WAAc,uCACd,OAEE,0BAAAC,OACK,yCACP,OAAS,4BAAAC,OAAgC,0EACzC,OAAS,0BAAAC,OAA8B,sEACvC,OAAS,iCAAAC,OAAqC,oFAC9C,OAAS,4BAAAC,OAAgC,0EACzC,OAAS,sBAAAC,OAA0B,wCAEnC,OAAS,yCAAAC,OAA6C,8DACtD,OAAS,uCAAAC,OAA2C,4DACpD,OAAS,eAAAC,OAAmB,wCAC5B,OAAS,uBAAAC,OAA2B,2BACpC,OAAS,8BAAAC,OAAkC,kCAC3C,WAAc,aACd,OACE,cAAAC,GACA,qBAAAC,OACK,gDACP,OAAS,YAAAC,OAAgB,wCACzB,OAAS,iBAAAC,OAAqB,+CAC9B,OAAS,0BAAAC,OAA8B,wDAEvC,OAAS,yBAAAC,OAA6B,uDACtC,OAAS,mBAAAC,OAAuB,uCAChC,OACE,gCAAAC,OAEK,oDACP,WAAc,8BACd,OAAS,4BAAAC,OAAgC,gDACzC,OAAS,8BAAAC,OAAkC,qDAC3C,WAAc,aACd,OAAS,yBAAAC,GAAuB,qBAAAC,OAAyB,sBACzD,OAAS,sBAAAC,OAA0B,gCAMnC,OACE,wBAAAC,GACA,wBAAAC,GACA,kBAAAC,OACK,0BACP,OACE,sBAAAC,GACA,sBAAAC,GACA,gBAAAC,OACK",
|
|
6
|
+
"names": ["Apdu", "APDU_MAX_PAYLOAD", "ApduBuilder", "ApduParser", "ByteArrayBuilder", "ByteArrayParser", "InvalidGetFirmwareMetadataResponseError", "InvalidResponseFormatError", "InvalidStatusWordError", "CommandResultFactory", "CommandResultStatus", "isSuccessCommandResult", "CloseAppCommand", "GetAppAndVersionCommand", "GetBackgroundImageSizeCommand", "GetBackgroundImageSizeCommandError", "BatteryStatusType", "GetBatteryStatusCommand", "GetOsVersionCommand", "ListAppsCommand", "LoadCertificateCommand", "OpenAppCommand", "isCommandErrorCode", "CommandUtils", "GLOBAL_ERRORS", "GlobalCommandError", "GlobalCommandErrorHandler", "DeviceModel", "DeviceModelId", "LEDGER_VENDOR_ID", "DeviceStatus", "DeviceActionStatus", "UserInteractionRequired", "CallTaskInAppDeviceAction", "DEFAULT_UNLOCK_TIMEOUT_MS", "AppAlreadyInstalledDAError", "DeviceLockedError", "DeviceNotOnboardedError", "OutOfMemoryDAError", "RefusedByUserDAError", "UnknownDAError", "UnsupportedFirmwareDAError", "GetDeviceMetadataDeviceAction", "GetDeviceStatusDeviceAction", "GoToDashboardDeviceAction", "InstallOrUpdateAppsDeviceAction", "ListAppsDeviceAction", "ListAppsWithMetadataDeviceAction", "OpenAppDeviceAction", "OpenAppWithDependenciesDeviceAction", "SendCommandInAppDeviceAction", "XStateDeviceAction", "StaticDeviceModelDataSource", "BleDeviceInfos", "TransportDeviceModel", "ApduResponse", "DeviceSessionStateType", "GenuineCheckDeviceAction", "InstallAppDeviceAction", "ListInstalledAppsDeviceAction", "UninstallAppDeviceAction", "SecureChannelError", "defaultApduReceiverServiceStubBuilder", "defaultApduSenderServiceStubBuilder", "FramerUtils", "DeviceManagementKit", "DeviceManagementKitBuilder", "noopLogger", "noopLoggerFactory", "LogLevel", "ConsoleLogger", "DefaultLogTagFormatter", "WebLogsExporterLogger", "ConnectedDevice", "DeviceConnectionStateMachine", "TransportConnectedDevice", "connectedDeviceStubBuilder", "formatApduReceivedLog", "formatApduSentLog", "ApplicationChecker", "base64StringToBuffer", "bufferToBase64String", "isBase64String", "bufferToHexaString", "hexaStringToBuffer", "isHexaString"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAppWithDependenciesDeviceAction.d.ts","sourceRoot":"","sources":["../../../../../../../src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAKnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAE/F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAGnG,OAAO,EACL,KAAK,wBAAwB,EAC7B,kBAAkB,EACnB,MAAM,oDAAoD,CAAC;AAE5D,OAAO,EACL,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,0CAA0C,EAC/C,KAAK,+BAA+B,EAErC,MAAM,SAAS,CAAC;AAEjB,KAAK,2CAA2C,GAAG;IACjD,QAAQ,CAAC,KAAK,EAAE,8BAA8B,GAAG,IAAI,CAAC;IACtD,QAAQ,CAAC,cAAc,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAC1D,QAAQ,CAAC,aAAa,EAAE,2BAA2B,GAAG,IAAI,CAAC;CAC5D,CAAC;AAEF,qBAAa,mCAAoC,SAAQ,kBAAkB,CACzE,+BAA+B,EAC/B,8BAA8B,EAC9B,8BAA8B,EAC9B,0CAA0C,EAC1C,2CAA2C,CAC5C;IACC,gBAAgB,CACd,WAAW,EAAE,WAAW,GACvB,wBAAwB,CACzB,+BAA+B,EAC/B,8BAA8B,EAC9B,8BAA8B,EAC9B,0CAA0C,EAC1C,2CAA2C,CAC5C;
|
|
1
|
+
{"version":3,"file":"OpenAppWithDependenciesDeviceAction.d.ts","sourceRoot":"","sources":["../../../../../../../src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAKnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAE/F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAGnG,OAAO,EACL,KAAK,wBAAwB,EAC7B,kBAAkB,EACnB,MAAM,oDAAoD,CAAC;AAE5D,OAAO,EACL,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,0CAA0C,EAC/C,KAAK,+BAA+B,EAErC,MAAM,SAAS,CAAC;AAEjB,KAAK,2CAA2C,GAAG;IACjD,QAAQ,CAAC,KAAK,EAAE,8BAA8B,GAAG,IAAI,CAAC;IACtD,QAAQ,CAAC,cAAc,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAC1D,QAAQ,CAAC,aAAa,EAAE,2BAA2B,GAAG,IAAI,CAAC;CAC5D,CAAC;AAEF,qBAAa,mCAAoC,SAAQ,kBAAkB,CACzE,+BAA+B,EAC/B,8BAA8B,EAC9B,8BAA8B,EAC9B,0CAA0C,EAC1C,2CAA2C,CAC5C;IACC,gBAAgB,CACd,WAAW,EAAE,WAAW,GACvB,wBAAwB,CACzB,+BAA+B,EAC/B,8BAA8B,EAC9B,8BAA8B,EAC9B,0CAA0C,EAC1C,2CAA2C,CAC5C;CAuTF"}
|
|
@@ -19,6 +19,7 @@ export type OpenAppWithDependenciesDAInput = GetDeviceStatusDAInput & {
|
|
|
19
19
|
readonly application: ApplicationDependency;
|
|
20
20
|
readonly dependencies: ApplicationDependency[];
|
|
21
21
|
readonly requireLatestFirmware?: boolean;
|
|
22
|
+
readonly allowMissingApplication?: boolean;
|
|
22
23
|
};
|
|
23
24
|
export type OpenAppWithDependenciesDAError = InstallOrUpdateAppsDAError | OpenAppDAError | UnknownDAError | UnsupportedFirmwareDAError | CommandErrorResult["error"];
|
|
24
25
|
export type OpenAppWithDependenciesDARequiredInteraction = GetDeviceMetadataDARequiredInteraction | InstallOrUpdateAppsDARequiredInteraction | OpenAppDARequiredInteraction;
|