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.1.0 to 23.2.0

11

index.d.ts

@@ -8,3 +8,3 @@ /**

*/
import { IAFlowSession } from "./IAFlowEngineAPI";
import { IADebugFlowSession, IAFlowSession } from "./IAFlowEngineAPI";
/**

@@ -57,1 +57,10 @@ * The SDK version.

export declare function createSession(props: IACreateSessionParams): Promise<IAFlowSession>;
/**
* Creates a flow session with debugging features enabled.
* @param props the {@link IACreateDebugSessionParams} properties used to create the session
*
* @returns A promise of that resolves to the newly created flow session.
*
* @throws string - an error message if the flow session can not be created
*/
export declare function createDebugSession(props: IACreateDebugSessionParams): Promise<IADebugFlowSession>;

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.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};
var c=(t,o,r)=>new Promise((n,s)=>{var d=e=>{try{i(r.next(e))}catch(a){s(a)}},l=e=>{try{i(r.throw(e))}catch(a){s(a)}},i=e=>e.done?n(e.value):Promise.resolve(e.value).then(d,l);i((r=r.apply(t,o)).next())});function S(t){let o=t.split(".")[1].replace("/-/g","+").replace("/_/g","/"),r=atob(o).split("").map(n=>"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)).join("");return JSON.parse(decodeURIComponent(r))}var u={version:"23.2.0"};var f=new Function("n","return import(n)"),m=u.version;function g(t){return c(this,null,function*(){let o;for(let r=0;r<3;++r){try{return yield t()}catch(n){o=n}yield new Promise(n=>setTimeout(n,100))}throw o})}function I(t){return c(this,null,function*(){let o,r;try{r=S(t.jwt)}catch(i){throw"Error: JWT token is not valid."}if(typeof r.iss!="string")throw"Error: JWT token is not valid.";let n=r.iss,s={loaderVersion:m,projectSha256:void 0,schemeSha256:void 0,dependencies: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"&&(s.projectSha256=o.projectSha256,s.schemeSha256=o.schemeSha256,s.dependencies=o.referenceSha256)}let d=JSON.stringify(s);return g(function(){return c(this,null,function*(){let e=yield(yield fetch(n+"/flow/initLoader",{method:"POST",headers:{Authorization:"Bearer "+t.jwt},body:d})).json();if(e.type==="error")throw e.message;let a=yield w(e.flowEngineUrl);return e.globalInputData=t.globalInputData,e.storedSessionState=o,e.loaderVersion=u,a.engineCreateSession(e)})})})}function A(t){return c(this,null,function*(){let o;try{o=S(t.jwt)}catch(i){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(i){throw"Error: JWT token is not valid."}if(r.action!=="debug")throw"Error: JWT session token must be a debugging token";let n=o.iss,s={loaderVersion:m},d=JSON.stringify(s);return g(function(){return c(this,null,function*(){let e=yield(yield fetch(n+"/flow/initLoader",{method:"POST",headers:{Authorization:"Bearer "+t.jwt},body:d})).json();if(e.type==="error")throw e.message;let a=yield w(e.flowEngineUrl);return e.globalInputData=t.globalInputData,e.loaderVersion=u,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{m as IASDKVersion,A as createDebugSession,I as createSession};
/**

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

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

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

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