@elliemae/pui-scripting-object 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +27 -0
  2. package/dist/cjs/app.config.json +19 -0
  3. package/dist/cjs/application.js +44 -0
  4. package/dist/cjs/auth.js +15 -0
  5. package/dist/cjs/form.js +15 -0
  6. package/dist/cjs/global.js +15 -0
  7. package/dist/cjs/http.js +15 -0
  8. package/dist/cjs/index.js +27 -0
  9. package/dist/cjs/index.pug +19 -0
  10. package/dist/cjs/loan.js +15 -0
  11. package/dist/cjs/module.js +32 -0
  12. package/dist/cjs/package.json +4 -0
  13. package/dist/cjs/script.js +15 -0
  14. package/dist/cjs/session.js +15 -0
  15. package/dist/cjs/transaction.js +15 -0
  16. package/dist/cjs/transactiontemplate.js +15 -0
  17. package/dist/esm/app.config.json +19 -0
  18. package/dist/esm/application.js +25 -0
  19. package/dist/esm/auth.js +0 -0
  20. package/dist/esm/form.js +0 -0
  21. package/dist/esm/global.js +0 -0
  22. package/dist/esm/http.js +0 -0
  23. package/dist/esm/index.js +11 -0
  24. package/dist/esm/index.pug +19 -0
  25. package/dist/esm/loan.js +0 -0
  26. package/dist/esm/module.js +13 -0
  27. package/dist/esm/package.json +4 -0
  28. package/dist/esm/script.js +0 -0
  29. package/dist/esm/session.js +0 -0
  30. package/dist/esm/transaction.js +0 -0
  31. package/dist/esm/transactiontemplate.js +0 -0
  32. package/dist/types/application.d.ts +79 -0
  33. package/dist/types/auth.d.ts +21 -0
  34. package/dist/types/form.d.ts +10 -0
  35. package/dist/types/global.d.ts +5 -0
  36. package/dist/types/http.d.ts +7 -0
  37. package/dist/types/index.d.ts +11 -0
  38. package/dist/types/loan.d.ts +25 -0
  39. package/dist/types/module.d.ts +16 -0
  40. package/dist/types/script.d.ts +14 -0
  41. package/dist/types/session.d.ts +4 -0
  42. package/dist/types/transaction.d.ts +53 -0
  43. package/dist/types/transactiontemplate.d.ts +12 -0
  44. package/package.json +61 -0
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # Typescript definitions for Scripting Objects
2
+
3
+ [![Build Status](https://jenkins.dco.elmae/job/UIPlatform/job/Dev/job/pui-scripting-object/job/master/badge/icon)](https://jenkins.dco.elmae/job/UIPlatform/job/Dev/job/pui-scripting-object/job/master/)
4
+
5
+ [SonarQube Report](https://sonar.ellielabs.com/overview?id=pui-scripting-object-master)
6
+
7
+ Boilerplate node(npm) module library
8
+
9
+ **React Library boilerplate is available in <https://git.elliemae.io/platform-ui/pui-scripting-object-base/tree/react>**
10
+
11
+ ## Dependencies
12
+
13
+ - NodeJS >= 16.x
14
+ - `pnpm i -g rimraf cross-env serve`
15
+
16
+ ## Development
17
+
18
+ - clone the repo
19
+ - `pnpm run setup`
20
+
21
+ ## Test
22
+
23
+ - `pnpm run test`
24
+
25
+ ## Test using browser
26
+
27
+ - `pnpm run start:server`
@@ -0,0 +1,19 @@
1
+ {
2
+ "appId": "lib-boilerplate",
3
+ "brand": "primary",
4
+ "activeEnv": "localhost",
5
+ "hosted": false,
6
+ "serviceEndpoints": {
7
+ "api": "",
8
+ "idp": ""
9
+ },
10
+ "env": {
11
+ "localhost": {},
12
+ "dev2": {},
13
+ "qa2": {},
14
+ "qa3": {},
15
+ "int": {},
16
+ "stage": {},
17
+ "prod": {}
18
+ }
19
+ }
@@ -0,0 +1,44 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var application_exports = {};
19
+ __export(application_exports, {
20
+ ApplicationExtensionType: () => ApplicationExtensionType,
21
+ ModalSize: () => ModalSize,
22
+ NavigationType: () => NavigationType
23
+ });
24
+ module.exports = __toCommonJS(application_exports);
25
+ var ApplicationExtensionType = /* @__PURE__ */ ((ApplicationExtensionType2) => {
26
+ ApplicationExtensionType2["TOOL"] = "TOOL";
27
+ ApplicationExtensionType2["MENU"] = "MENU";
28
+ return ApplicationExtensionType2;
29
+ })(ApplicationExtensionType || {});
30
+ var NavigationType = /* @__PURE__ */ ((NavigationType2) => {
31
+ NavigationType2["STANDARD_FORM"] = "STANDARD_FORM";
32
+ NavigationType2["STANDARD_TOOL"] = "STANDARD_TOOL";
33
+ NavigationType2["CUSTOM_FORM"] = "CUSTOM_FORM";
34
+ NavigationType2["CUSTOM_TOOL"] = "CUSTOM_TOOL";
35
+ NavigationType2["GLOBAL_CUSTOM_TOOL"] = "GLOBAL_CUSTOM_TOOL";
36
+ NavigationType2["OTHER"] = "OTHER";
37
+ return NavigationType2;
38
+ })(NavigationType || {});
39
+ var ModalSize = /* @__PURE__ */ ((ModalSize2) => {
40
+ ModalSize2["SMALL"] = "sm";
41
+ ModalSize2["MEDIUM"] = "md";
42
+ ModalSize2["LARGE"] = "lg";
43
+ return ModalSize2;
44
+ })(ModalSize || {});
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var auth_exports = {};
15
+ module.exports = __toCommonJS(auth_exports);
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var form_exports = {};
15
+ module.exports = __toCommonJS(form_exports);
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var global_exports = {};
15
+ module.exports = __toCommonJS(global_exports);
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var http_exports = {};
15
+ module.exports = __toCommonJS(http_exports);
@@ -0,0 +1,27 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var lib_exports = {};
16
+ module.exports = __toCommonJS(lib_exports);
17
+ __reExport(lib_exports, require("./auth.js"), module.exports);
18
+ __reExport(lib_exports, require("./application.js"), module.exports);
19
+ __reExport(lib_exports, require("./form.js"), module.exports);
20
+ __reExport(lib_exports, require("./global.js"), module.exports);
21
+ __reExport(lib_exports, require("./http.js"), module.exports);
22
+ __reExport(lib_exports, require("./loan.js"), module.exports);
23
+ __reExport(lib_exports, require("./module.js"), module.exports);
24
+ __reExport(lib_exports, require("./script.js"), module.exports);
25
+ __reExport(lib_exports, require("./session.js"), module.exports);
26
+ __reExport(lib_exports, require("./transaction.js"), module.exports);
27
+ __reExport(lib_exports, require("./transactiontemplate.js"), module.exports);
@@ -0,0 +1,19 @@
1
+
2
+ doctype html
3
+ html(lang='en')
4
+ head
5
+ meta(charset='UTF-8')
6
+ meta(name='viewport' content='width=device-width, initial-scale=1.0')
7
+ meta(http-equiv='X-UA-Compatible' content='ie=edge')
8
+ title #{htmlWebpackPlugin.options.libraryName}
9
+ body
10
+ p This library #{htmlWebpackPlugin.options.libraryName} exposes the following properties
11
+ ul#libraryAttributes
12
+ script(lang='javascript').
13
+ window.onload = function() {
14
+ const attribNode = document.getElementById('libraryAttributes');
15
+ if (attribNode) {
16
+ attribNode.innerHTML = Object.keys(window['#{htmlWebpackPlugin.options.libraryName}'] || {}).reduce((value, attribute) => value += `<li>${attribute}</li>`, '');
17
+ }
18
+ }
19
+
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var loan_exports = {};
15
+ module.exports = __toCommonJS(loan_exports);
@@ -0,0 +1,32 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var module_exports = {};
19
+ __export(module_exports, {
20
+ LogLevel: () => LogLevel
21
+ });
22
+ module.exports = __toCommonJS(module_exports);
23
+ var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
24
+ LogLevel2["TRACE"] = "TRACE";
25
+ LogLevel2["DEBUG"] = "DEBUG";
26
+ LogLevel2["INFO"] = "INFO";
27
+ LogLevel2["AUDIT"] = "AUDIT";
28
+ LogLevel2["WARN"] = "WARN";
29
+ LogLevel2["ERROR"] = "ERROR";
30
+ LogLevel2["FATAL"] = "FATAL";
31
+ return LogLevel2;
32
+ })(LogLevel || {});
@@ -0,0 +1,4 @@
1
+ {
2
+ "type": "commonjs",
3
+ "sideEffects": false
4
+ }
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var script_exports = {};
15
+ module.exports = __toCommonJS(script_exports);
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var session_exports = {};
15
+ module.exports = __toCommonJS(session_exports);
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var transaction_exports = {};
15
+ module.exports = __toCommonJS(transaction_exports);
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var transactiontemplate_exports = {};
15
+ module.exports = __toCommonJS(transactiontemplate_exports);
@@ -0,0 +1,19 @@
1
+ {
2
+ "appId": "lib-boilerplate",
3
+ "brand": "primary",
4
+ "activeEnv": "localhost",
5
+ "hosted": false,
6
+ "serviceEndpoints": {
7
+ "api": "",
8
+ "idp": ""
9
+ },
10
+ "env": {
11
+ "localhost": {},
12
+ "dev2": {},
13
+ "qa2": {},
14
+ "qa3": {},
15
+ "int": {},
16
+ "stage": {},
17
+ "prod": {}
18
+ }
19
+ }
@@ -0,0 +1,25 @@
1
+ var ApplicationExtensionType = /* @__PURE__ */ ((ApplicationExtensionType2) => {
2
+ ApplicationExtensionType2["TOOL"] = "TOOL";
3
+ ApplicationExtensionType2["MENU"] = "MENU";
4
+ return ApplicationExtensionType2;
5
+ })(ApplicationExtensionType || {});
6
+ var NavigationType = /* @__PURE__ */ ((NavigationType2) => {
7
+ NavigationType2["STANDARD_FORM"] = "STANDARD_FORM";
8
+ NavigationType2["STANDARD_TOOL"] = "STANDARD_TOOL";
9
+ NavigationType2["CUSTOM_FORM"] = "CUSTOM_FORM";
10
+ NavigationType2["CUSTOM_TOOL"] = "CUSTOM_TOOL";
11
+ NavigationType2["GLOBAL_CUSTOM_TOOL"] = "GLOBAL_CUSTOM_TOOL";
12
+ NavigationType2["OTHER"] = "OTHER";
13
+ return NavigationType2;
14
+ })(NavigationType || {});
15
+ var ModalSize = /* @__PURE__ */ ((ModalSize2) => {
16
+ ModalSize2["SMALL"] = "sm";
17
+ ModalSize2["MEDIUM"] = "md";
18
+ ModalSize2["LARGE"] = "lg";
19
+ return ModalSize2;
20
+ })(ModalSize || {});
21
+ export {
22
+ ApplicationExtensionType,
23
+ ModalSize,
24
+ NavigationType
25
+ };
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,11 @@
1
+ export * from "./auth.js";
2
+ export * from "./application.js";
3
+ export * from "./form.js";
4
+ export * from "./global.js";
5
+ export * from "./http.js";
6
+ export * from "./loan.js";
7
+ export * from "./module.js";
8
+ export * from "./script.js";
9
+ export * from "./session.js";
10
+ export * from "./transaction.js";
11
+ export * from "./transactiontemplate.js";
@@ -0,0 +1,19 @@
1
+
2
+ doctype html
3
+ html(lang='en')
4
+ head
5
+ meta(charset='UTF-8')
6
+ meta(name='viewport' content='width=device-width, initial-scale=1.0')
7
+ meta(http-equiv='X-UA-Compatible' content='ie=edge')
8
+ title #{htmlWebpackPlugin.options.libraryName}
9
+ body
10
+ p This library #{htmlWebpackPlugin.options.libraryName} exposes the following properties
11
+ ul#libraryAttributes
12
+ script(lang='javascript').
13
+ window.onload = function() {
14
+ const attribNode = document.getElementById('libraryAttributes');
15
+ if (attribNode) {
16
+ attribNode.innerHTML = Object.keys(window['#{htmlWebpackPlugin.options.libraryName}'] || {}).reduce((value, attribute) => value += `<li>${attribute}</li>`, '');
17
+ }
18
+ }
19
+
File without changes
@@ -0,0 +1,13 @@
1
+ var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
2
+ LogLevel2["TRACE"] = "TRACE";
3
+ LogLevel2["DEBUG"] = "DEBUG";
4
+ LogLevel2["INFO"] = "INFO";
5
+ LogLevel2["AUDIT"] = "AUDIT";
6
+ LogLevel2["WARN"] = "WARN";
7
+ LogLevel2["ERROR"] = "ERROR";
8
+ LogLevel2["FATAL"] = "FATAL";
9
+ return LogLevel2;
10
+ })(LogLevel || {});
11
+ export {
12
+ LogLevel
13
+ };
@@ -0,0 +1,4 @@
1
+ {
2
+ "type": "module",
3
+ "sideEffects": false
4
+ }
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,79 @@
1
+ export interface AppInfo {
2
+ id: string;
3
+ name: string;
4
+ }
5
+ export declare enum ApplicationExtensionType {
6
+ TOOL = "TOOL",
7
+ MENU = "MENU"
8
+ }
9
+ export interface ApplicationExtension {
10
+ type: ApplicationExtensionType;
11
+ text: string;
12
+ url: string;
13
+ options?: Record<string, string>;
14
+ }
15
+ export declare enum NavigationType {
16
+ STANDARD_FORM = "STANDARD_FORM",
17
+ STANDARD_TOOL = "STANDARD_TOOL",
18
+ CUSTOM_FORM = "CUSTOM_FORM",
19
+ CUSTOM_TOOL = "CUSTOM_TOOL",
20
+ GLOBAL_CUSTOM_TOOL = "GLOBAL_CUSTOM_TOOL",
21
+ OTHER = "OTHER"
22
+ }
23
+ export interface NavigationOptions {
24
+ target: string;
25
+ type: NavigationType;
26
+ context?: Record<string, string>;
27
+ }
28
+ export interface OpenOptions {
29
+ target: string;
30
+ type?: string;
31
+ }
32
+ export declare enum ModalSize {
33
+ SMALL = "sm",
34
+ MEDIUM = "md",
35
+ LARGE = "lg"
36
+ }
37
+ export interface OpenModalOptions {
38
+ target: string;
39
+ name: string;
40
+ type?: string;
41
+ size: ModalSize;
42
+ }
43
+ export interface Capabilities {
44
+ supprotedActions: Array<string>;
45
+ supportedFeatures: Array<string>;
46
+ }
47
+ export interface Route {
48
+ url: string;
49
+ type: NavigationType;
50
+ name: string;
51
+ id: string;
52
+ }
53
+ export interface Environment {
54
+ apiHost: string;
55
+ }
56
+ export interface ApplicationContext {
57
+ env: Environment;
58
+ route: Route;
59
+ }
60
+ export interface IApplication {
61
+ getDescriptior(): Promise<AppInfo>;
62
+ getApplicationContext(): Promise<ApplicationContext>;
63
+ extend(extensionObj: ApplicationExtension): Promise<void>;
64
+ navigate(options: NavigationOptions): Promise<void>;
65
+ performAction(action: string, options: Record<string, string>): Promise<void>;
66
+ open(options: OpenOptions): Promise<void>;
67
+ openModal(options: OpenModalOptions): Promise<void>;
68
+ closeModal(): Promise<void>;
69
+ supportsAction(name: string): Promise<boolean>;
70
+ supportsNavigateTo(name: string): Promise<boolean>;
71
+ getCapabilities(): Promise<Capabilities>;
72
+ keepSessionAlive(): Promise<void>;
73
+ showSpinner(message: string): Promise<void>;
74
+ hideSpinner(): Promise<void>;
75
+ getPoliciesDetails(): Promise<Record<string, string>>;
76
+ getPersonaAccess(): Promise<Record<string, string>>;
77
+ }
78
+ export declare type AppLoginListener = () => void;
79
+ export declare type AppActionCompletedListener = (name: string) => void;
@@ -0,0 +1,21 @@
1
+ export interface Personas {
2
+ entityId: string;
3
+ entityType: string;
4
+ entityName: string;
5
+ }
6
+ export interface User {
7
+ id: string;
8
+ realm: string;
9
+ firstName: string;
10
+ lastName: string;
11
+ phone: string;
12
+ cellPhone: string;
13
+ personas: Array<Personas>;
14
+ clientId: string;
15
+ email: string;
16
+ }
17
+ export interface IAuth {
18
+ tokenUrl: string;
19
+ createAuthCode(clientId: string): Promise<string>;
20
+ getUser(): Promise<User>;
21
+ }
@@ -0,0 +1,10 @@
1
+ export interface FormDescriptor {
2
+ id: string;
3
+ name: string;
4
+ }
5
+ export interface IForm {
6
+ getDescriptor(): Promise<FormDescriptor>;
7
+ getControl(id: string): Promise<any>;
8
+ }
9
+ export declare type FormLoadListener = (id: string) => void;
10
+ export declare type FormUnloadListener = (id: string) => void;
@@ -0,0 +1,5 @@
1
+ export interface IGlobal {
2
+ set(key: string, value: string): Promise<void>;
3
+ get(key: string): Promise<string>;
4
+ }
5
+ export declare type GlobalStateChangeListener = (key: string) => void;
@@ -0,0 +1,7 @@
1
+ export interface IHttp {
2
+ get(url: string, headersOrAccessToken?: HeadersInit | string): Promise<Response>;
3
+ post(url: string, content: string | Record<string, string>, headersOrAccessToken?: HeadersInit | string): Promise<Response>;
4
+ patch(url: string, content: string | Record<string, string>, headersOrAccessToken?: HeadersInit | string): Promise<Response>;
5
+ put(url: string, content: string | Record<string, string>, headersOrAccessToken?: HeadersInit | string): Promise<Response>;
6
+ delete(url: string, headersOrAccessToken?: HeadersInit | string): Promise<Response>;
7
+ }
@@ -0,0 +1,11 @@
1
+ export * from './auth.js';
2
+ export * from './application.js';
3
+ export * from './form.js';
4
+ export * from './global.js';
5
+ export * from './http.js';
6
+ export * from './loan.js';
7
+ export * from './module.js';
8
+ export * from './script.js';
9
+ export * from './session.js';
10
+ export * from './transaction.js';
11
+ export * from './transactiontemplate.js';
@@ -0,0 +1,25 @@
1
+ export interface ILoan {
2
+ all(): Promise<Record<string, string>>;
3
+ apply(loan: Record<string, string>): Promise<void>;
4
+ commit(): Promise<void>;
5
+ getField(id: string): Promise<string>;
6
+ getFields(ids: string[]): Promise<Record<string, string>>;
7
+ setFields(fields: Record<string, string>): Promise<void>;
8
+ merge(): Promise<void>;
9
+ isReadOnly(): Promise<boolean>;
10
+ applyLock(fieldId: string, lock: boolean): Promise<void>;
11
+ calculate(): Promise<void>;
12
+ getCurrentApplication(): Promise<Record<string, string>>;
13
+ execAction(type: string): Promise<void>;
14
+ getCollection(name: string): Promise<Record<string, string>>;
15
+ getLockSnapshot(): Promise<Record<string, string>>;
16
+ }
17
+ export declare type LoanPreCommitListener = (cause: string) => boolean;
18
+ export declare type LoanCommittedListener = (cause: string) => void;
19
+ export declare type LoanChangeListener = () => void;
20
+ export declare type LoanSyncListener = () => void;
21
+ export declare type LoanOpenListener = () => void;
22
+ export declare type LoanCloseListener = () => boolean;
23
+ export declare type LoanMilestoneCompletedListener = (name: string) => void;
24
+ export declare type LoanPreMilestoneCompleteListener = (name: string) => boolean;
25
+ export declare type LoanApplicationSelectedListener = () => void;
@@ -0,0 +1,16 @@
1
+ export declare enum LogLevel {
2
+ TRACE = "TRACE",
3
+ DEBUG = "DEBUG",
4
+ INFO = "INFO",
5
+ AUDIT = "AUDIT",
6
+ WARN = "WARN",
7
+ ERROR = "ERROR",
8
+ FATAL = "FATAL"
9
+ }
10
+ export interface IModule {
11
+ getCapabilities(): Promise<Record<string, string>>;
12
+ getParameters(): Promise<Record<string, string>>;
13
+ unload(): Promise<void>;
14
+ log(message: string, logLevel: LogLevel): Promise<void>;
15
+ }
16
+ export declare type ModuleUnLoadingListener = (id: string) => boolean;
@@ -0,0 +1,14 @@
1
+ import { IAuth } from './auth.js';
2
+ import { IApplication } from './application.js';
3
+ import { IForm } from './form.js';
4
+ import { IGlobal } from './global.js';
5
+ import { IHttp } from './http.js';
6
+ import { ILoan } from './loan.js';
7
+ import { IModule } from './module.js';
8
+ import { ISession } from './session.js';
9
+ import { ITransaction } from './transaction.js';
10
+ import { ITransactionTemplate } from './transactiontemplate.js';
11
+ export interface IScript {
12
+ getObject(name: string): Promise<IAuth | IApplication | IForm | IGlobal | IHttp | ILoan | IModule | ISession | ITransaction | ITransactionTemplate>;
13
+ subscribe(objName: string, eventName: string, listener: () => void | boolean): Promise<void>;
14
+ }
@@ -0,0 +1,4 @@
1
+ export interface ISession {
2
+ set(key: string, value: string): Promise<void>;
3
+ get(key: string): Promise<string>;
4
+ }
@@ -0,0 +1,53 @@
1
+ export interface OriginInfo {
2
+ partnerAccessToken: string;
3
+ id: string;
4
+ transactionId?: string;
5
+ }
6
+ export interface TransactionInfo {
7
+ id: string | null;
8
+ }
9
+ export interface TransactionResource {
10
+ id: string;
11
+ name: string;
12
+ repository: string;
13
+ mimeType: string;
14
+ }
15
+ export interface TransactionOptions {
16
+ scope?: Array<string>;
17
+ request: {
18
+ type: string;
19
+ options?: Record<string, string>;
20
+ resources: Array<TransactionResource>;
21
+ };
22
+ }
23
+ export interface TransactionResourceFile {
24
+ name: string;
25
+ source: string;
26
+ }
27
+ export interface TransactionResourceResponse {
28
+ id: string;
29
+ respository: string;
30
+ name: string;
31
+ location: string;
32
+ authorizationHeader: string;
33
+ mimeType: string;
34
+ }
35
+ export interface TransactionEvent {
36
+ text: string;
37
+ type: string;
38
+ comments: string;
39
+ resources: Array<TransactionResource>;
40
+ }
41
+ export interface ITransaction {
42
+ getOrigin(): Promise<OriginInfo>;
43
+ refreshOrigin(): Promise<OriginInfo>;
44
+ get(): Promise<TransactionInfo>;
45
+ set(options: TransactionInfo): Promise<void>;
46
+ create(options: TransactionOptions): Promise<TransactionInfo>;
47
+ update(options: TransactionOptions): Promise<TransactionInfo>;
48
+ createResource(options: TransactionResourceFile): Promise<TransactionResourceResponse>;
49
+ createEvent(options: TransactionEvent): Promise<TransactionInfo>;
50
+ close(): Promise<void>;
51
+ cancel(): Promise<void>;
52
+ error(): Promise<void>;
53
+ }
@@ -0,0 +1,12 @@
1
+ export interface TransactionRequest {
2
+ type: string;
3
+ options?: Record<string, string>;
4
+ }
5
+ export interface TransactionTemplateOptions {
6
+ request: Array<TransactionRequest>;
7
+ }
8
+ export interface ITransactionTemplate {
9
+ get(): Promise<TransactionTemplateOptions | null>;
10
+ save(options: TransactionTemplateOptions): Promise<string>;
11
+ close(): Promise<string>;
12
+ }
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@elliemae/pui-scripting-object",
3
+ "version": "1.0.0",
4
+ "description": "Typescript defintions for Scripting Objects",
5
+ "sideEffects": false,
6
+ "main": "./dist/cjs/index.js",
7
+ "module": "./dist/es/index.js",
8
+ "typings": "./dist/types/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://git.elliemae.io/platform-ui/pui-scripting-object.git"
18
+ },
19
+ "engines": {
20
+ "pnpm": ">=6",
21
+ "node": ">=16"
22
+ },
23
+ "author": "ICE MT",
24
+ "license": "MIT",
25
+ "scripts": {
26
+ "build": "pui-cli pack -p -t node",
27
+ "build:dev": "pui-cli pack -t node",
28
+ "gendoc": "pui-cli gendoc",
29
+ "lint": "pui-cli lint",
30
+ "lint:fix": "pui-cli lint --fix",
31
+ "release": "semantic-release",
32
+ "start:server": "http-server ./dist/public -p 3000",
33
+ "storybook": "exit 0",
34
+ "storybook:docs": "exit 0",
35
+ "storybook:build": "exit 0",
36
+ "storybook:docs:build": "exit 0",
37
+ "storybook:prod": "exit 0",
38
+ "setup": "rimraf -r node_modules && rimraf pnpm-lock.yaml && pnpm i",
39
+ "test": "pui-cli test -p",
40
+ "test:fix": "pui-cli test -f",
41
+ "test:watch": "jest watch",
42
+ "test:staged": "jest --coverage --passWithNoTests --bail --findRelatedTests",
43
+ "upgrade": "ncu -u && npm run setup",
44
+ "prepare": "husky install"
45
+ },
46
+ "jestSonar": {
47
+ "reportPath": "reports",
48
+ "reportFile": "tests.xml",
49
+ "indent": 4,
50
+ "sonar56x": true
51
+ },
52
+ "devDependencies": {
53
+ "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.4.2",
54
+ "@elliemae/pui-cli": "6.19.0",
55
+ "@types/styled-components": "~5.1.25",
56
+ "redux": "~4.2.0",
57
+ "redux-saga": "~1.1.3",
58
+ "styled-components": "~5.3.5"
59
+ },
60
+ "peerDependencies": {}
61
+ }