Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oracle/ia-flows-sdk

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oracle/ia-flows-sdk - npm Package Compare versions

Comparing version 23.0.0 to 23.1.0

113

IAFlowEngineAPI.d.ts

@@ -184,3 +184,3 @@ /**

* @remarks
* The schema of the json payload is defined by {@link returnedDataDefinition}. Setting data that is invalid will result in an {@link IAReturnedDataError}
* The schema of the JSON payload is defined by {@link returnedDataDefinition}. Setting data that is invalid will result in an {@link IAReturnedDataError}
* Any value set will not be reflected in the model until {@link IAFlowSession.refreshModel} is called

@@ -194,2 +194,7 @@ *

/**
* The width of the control when in an IARow, otherwise undefined when the control is in an IAFlowItemGroup.
* @since 23.1.0
*/
readonly layoutWidth?: number;
/**
* The names of the custom properties set on this action

@@ -251,4 +256,10 @@ */

*/
model: IAFlowItemGroup;
readonly model: IAFlowItemGroup;
/**
* The name of the flow
*
* @since 23.1.0
*/
readonly name: string;
/**
* Gets a value from the currently calculated session data.

@@ -283,3 +294,3 @@ *

*
* @remarks The schema of the json payload is defined by {@link globalInputDataDefinition}. Setting data that does not conform to the schema will result in an {@link IAReturnedDataError}
* @remarks The schema of the JSON payload is defined by {@link globalInputDataDefinition}. Setting data that does not conform to the schema will result in an {@link IAReturnedDataError}
* @param data - the data to set

@@ -297,3 +308,3 @@ *

/**
* Creates an {@link IADateValue} with the specified year, month and day
* Creates an {@link IADateValue} with the specified year, month and day
* @param year - the date's year

@@ -323,2 +334,41 @@ * @param month - the date's month, with the 1 representing January and 12 representing December

/**
* A Flow session with debugging features enabled
*
* @remarks
* A debugging session adds additional instrumentation and access to the Debugger UI widget to enable
* users to see how the rules, pages, controls and data actions in their flow are behaving inside their currently running
* application.
* <br/>
* The additional features enabled in the debugging session can impact performance
* and provide the ability for users to interrogate rules and data within the currently running flow in detail.
* <strong>It is strongly advised this feature not be enabled in production applications.</strong>
* */
export interface IADebugFlowSession extends IAFlowSession {
/**
* Loads a serialised session state in to this flow session.
*
* @remarks
* Loading a serialised session will cause any data currently in the session to
* be destroyed and the session reset to the contents of the stored session state
* @param storedSessionState - the session state to restore
* @see {@link IAFlowSession.getSessionState}
*/
loadSessionState(storedSessionState: string): Promise<IADebugFlowSession>;
/**
* Creates the Debugger UI widget and attaches it to the specified element
* @param el - the element to attach the debugger widget to
*/
createDebugger(el: HTMLElement): void;
/**
* Destroys the Debugger UI and removes it from its parent element.
*/
destroyDebugger(): void;
/**
* Shows the specified item in the Debugger UI widget.
*
* @param modelId - the id of the item in the flow model to show
*/
debugNavigateTo(modelId: string): void;
}
/**
* An array of {@link IAFlowItem}

@@ -365,2 +415,7 @@ */

/**
* True if this group is read-only, otherwise false
* @since 23.1.0
*/
readonly isReadOnly: boolean;
/**
* The items owned by this container

@@ -426,2 +481,7 @@ */

/**
* True if this group is read-only, otherwise false
* @since 23.1.0
*/
readonly isReadOnly: boolean;
/**
* A {@link IAFlowItemGroup} for each record in the list

@@ -478,2 +538,7 @@ */

/**
* True if this page read-only, otherwise false
* @since 23.1.0
*/
readonly isReadOnly: boolean;
/**
* The set of errors that are currently attached to this page

@@ -688,2 +753,7 @@ */

/**
* True if this row is read-only, otherwise false
* @since 23.1.0
*/
readonly isReadOnly: boolean;
/**
* the page to which this row belongs

@@ -811,2 +881,32 @@ */

export declare type IAInputControlStyle = "radioButtons" | "checkBox" | "textBox" | "textArea" | "dropDown" | "custom";
/***
* Specifies the input validations specified for a given {@link IAInputControl}, excluding 'Must satisfy' conditions.
* @since 23.1.0
*/
export interface IAInputRestrictions {
/**
* For number inputs. Indicates the value must be a whole number only.
*/
wholeNumber?: boolean;
/**
* For number inputs. Indicates the value must be at least the specified value.
*/
atLeast?: number;
/**
* For number inputs. Indicates the value must be at most the specified value.
*/
atMost?: number;
/**
* For text inputs. Specifies the set of regular expression the input must match.
*/
matches?: string[];
/**
* For text inputs. Specifies the minimum character length of the input.
*/
minimumLength?: number;
/**
* For text inputs. Specifies the maximum character length of the input.
*/
maximumLength?: number;
}
/**

@@ -924,2 +1024,7 @@ * A control that collects a single value.

/**
* Returns the set of input restrictions defined for this control
* @since 23.1.0
*/
readonly inputRestrictions: IAInputRestrictions;
/**
* Parse the provided input according to the input formatters defined for the control. Cannot be used where {@link dataType} is "record"

@@ -926,0 +1031,0 @@ * @param input - the string to parse

2

index.js
/* Copyright (c) 2021, 2023, Oracle and/or its affiliates. Licensed under The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/ */
var c=(t,o,r)=>new Promise((s,i)=>{var u=e=>{try{n(r.next(e))}catch(a){i(a)}},d=e=>{try{n(r.throw(e))}catch(a){i(a)}},n=e=>e.done?s(e.value):Promise.resolve(e.value).then(u,d);n((r=r.apply(t,o)).next())});function m(t){let o=t.split(".")[1].replace("/-/g","+").replace("/_/g","/"),r=atob(o).split("").map(s=>"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)).join("");return JSON.parse(decodeURIComponent(r))}var l={version:"23.0.0"};var f=new Function("n","return import(n)"),S=l.version;function g(t){return c(this,null,function*(){let o;for(let r=0;r<3;++r){try{return yield t()}catch(s){o=s}yield new Promise(s=>setTimeout(s,100))}throw o})}function I(t){return c(this,null,function*(){let o,r;try{r=m(t.jwt)}catch(n){throw"Error: JWT token is not valid."}if(typeof r.iss!="string")throw"Error: JWT token is not valid.";let s=r.iss,i={loaderVersion:S,projectSha256:void 0,schemeSha256:void 0};if(t.resumeMode){if(JSON.parse(r.sub).action!=="startOrResume")throw"resuming is not currently supported for debug flow sessions.";try{o=JSON.parse(t.storedSessionState)}catch(e){throw"storedSessionState not provided or is invalid."}if(typeof o.projectSha256!="string"||typeof o.schemeSha256!="string")throw"storedSessionState not provided or is invalid.";t.resumeMode==="sameVersion"&&(i.projectSha256=o.projectSha256,i.schemeSha256=o.schemeSha256)}let u=JSON.stringify(i);return g(function(){return c(this,null,function*(){let e=yield(yield fetch(s+"/flow/initLoader",{method:"POST",headers:{Authorization:"Bearer "+t.jwt},body:u})).json();if(e.type==="error")throw e.message;let a=yield w(e.flowEngineUrl);return e.globalInputData=t.globalInputData,e.storedSessionState=o,e.loaderVersion=l,a.engineCreateSession(e)})})})}function A(t){return c(this,null,function*(){let o;try{o=m(t.jwt)}catch(n){throw"Error: JWT token is not valid."}if(typeof o.iss!="string")throw"Error: JWT token is not valid.";let r;try{r=JSON.parse(o.sub)}catch(n){throw"Error: JWT token is not valid."}if(r.action!=="debug")throw"Error: JWT session token must be a debugging token";let s=o.iss,i={loaderVersion:S},u=JSON.stringify(i);return g(function(){return c(this,null,function*(){let e=yield(yield fetch(s+"/flow/initLoader",{method:"POST",headers:{Authorization:"Bearer "+t.jwt},body:u})).json();if(e.type==="error")throw e.message;let a=yield w(e.flowEngineUrl);return e.globalInputData=t.globalInputData,e.loaderVersion=l,e.uiLanguage=t.uiLanguage,a.engineCreateDebugSession(e)})})})}function w(t){return window["@@ia_test_mock_import"]?window["@@ia_test_mock_import"](t):f(t)}export{S as IASDKVersion,A as createDebugSession,I as createSession};
var c=(t,o,r)=>new Promise((s,i)=>{var u=e=>{try{n(r.next(e))}catch(a){i(a)}},d=e=>{try{n(r.throw(e))}catch(a){i(a)}},n=e=>e.done?s(e.value):Promise.resolve(e.value).then(u,d);n((r=r.apply(t,o)).next())});function m(t){let o=t.split(".")[1].replace("/-/g","+").replace("/_/g","/"),r=atob(o).split("").map(s=>"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)).join("");return JSON.parse(decodeURIComponent(r))}var l={version:"23.1.0"};var f=new Function("n","return import(n)"),S=l.version;function g(t){return c(this,null,function*(){let o;for(let r=0;r<3;++r){try{return yield t()}catch(s){o=s}yield new Promise(s=>setTimeout(s,100))}throw o})}function I(t){return c(this,null,function*(){let o,r;try{r=m(t.jwt)}catch(n){throw"Error: JWT token is not valid."}if(typeof r.iss!="string")throw"Error: JWT token is not valid.";let s=r.iss,i={loaderVersion:S,projectSha256:void 0,schemeSha256:void 0};if(t.resumeMode){if(JSON.parse(r.sub).action!=="startOrResume")throw"resuming is not currently supported for debug flow sessions.";try{o=JSON.parse(t.storedSessionState)}catch(e){throw"storedSessionState not provided or is invalid."}if(typeof o.projectSha256!="string"||typeof o.schemeSha256!="string")throw"storedSessionState not provided or is invalid.";t.resumeMode==="sameVersion"&&(i.projectSha256=o.projectSha256,i.schemeSha256=o.schemeSha256)}let u=JSON.stringify(i);return g(function(){return c(this,null,function*(){let e=yield(yield fetch(s+"/flow/initLoader",{method:"POST",headers:{Authorization:"Bearer "+t.jwt},body:u})).json();if(e.type==="error")throw e.message;let a=yield w(e.flowEngineUrl);return e.globalInputData=t.globalInputData,e.storedSessionState=o,e.loaderVersion=l,a.engineCreateSession(e)})})})}function A(t){return c(this,null,function*(){let o;try{o=m(t.jwt)}catch(n){throw"Error: JWT token is not valid."}if(typeof o.iss!="string")throw"Error: JWT token is not valid.";let r;try{r=JSON.parse(o.sub)}catch(n){throw"Error: JWT token is not valid."}if(r.action!=="debug")throw"Error: JWT session token must be a debugging token";let s=o.iss,i={loaderVersion:S},u=JSON.stringify(i);return g(function(){return c(this,null,function*(){let e=yield(yield fetch(s+"/flow/initLoader",{method:"POST",headers:{Authorization:"Bearer "+t.jwt},body:u})).json();if(e.type==="error")throw e.message;let a=yield w(e.flowEngineUrl);return e.globalInputData=t.globalInputData,e.loaderVersion=l,e.uiLanguage=t.uiLanguage,a.engineCreateDebugSession(e)})})})}function w(t){return window["@@ia_test_mock_import"]?window["@@ia_test_mock_import"](t):f(t)}export{S as IASDKVersion,A as createDebugSession,I as createSession};
/**

@@ -4,0 +4,0 @@ * @license

{
"name": "@oracle/ia-flows-sdk",
"version": "23.0.0",
"version": "23.1.0",
"description": "Oracle Intelligent Advisor Flows SDK for custom flow runtime integration",

@@ -5,0 +5,0 @@ "module": "index.js",

@@ -18,3 +18,3 @@ # Intelligent Advisor Flows API SDK

## Getting started
For more information on the Intelligent Advisor Flows technology, including how to create and deploy a flow for use with this SDK please see [Get started with the Flow Engine API](https://documentation.custhelp.com/euf/assets/devdocs/unversioned/IntelligentAdvisor/en/Content/Guides/Developer_Guide/Flow_Engine_API/Get_started_with_Flow_Engine_API.htm)
For more information on the Intelligent Advisor Flows technology, including how to create and deploy a flow for use with this SDK please see [Get started with the Flow Engine API](https://documentation.custhelp.com/euf/assets/devdocs/unversioned/IntelligentAdvisor/en/Content/Guides/Customize_extend/Flow_Engine_API/Get_started_with_Flow_Engine_API.htm)

@@ -21,0 +21,0 @@ ## License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc