@elliemae/pui-scripting-object 1.7.0 → 1.9.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 (73) hide show
  1. package/dist/cjs/events.js +16 -0
  2. package/dist/cjs/index.js +16 -12
  3. package/dist/cjs/objects/analytics.js +16 -0
  4. package/dist/cjs/{application.js → objects/application.js} +0 -0
  5. package/dist/cjs/{auth.js → objects/auth.js} +0 -0
  6. package/dist/cjs/{form.js → objects/form.js} +0 -0
  7. package/dist/cjs/{global.js → objects/global.js} +0 -0
  8. package/dist/cjs/{http.js → objects/http.js} +0 -0
  9. package/dist/cjs/{loan.js → objects/loan.js} +0 -0
  10. package/dist/cjs/objects/loanv2.js +38 -0
  11. package/dist/cjs/objects/memStorage.js +16 -0
  12. package/dist/cjs/{module.js → objects/module.js} +0 -0
  13. package/dist/cjs/objects/route.js +16 -0
  14. package/dist/cjs/{session.js → objects/session.js} +0 -0
  15. package/dist/cjs/{loanv2.js → objects/transaction.js} +9 -9
  16. package/dist/cjs/objects/transactionTemplate.js +16 -0
  17. package/dist/cjs/{userAccessRights.js → objects/userAccessRights.js} +0 -0
  18. package/dist/cjs/objects/view.js +16 -0
  19. package/dist/cjs/scriptingObjectTypes.js +16 -0
  20. package/dist/esm/{form.js → events.js} +0 -0
  21. package/dist/esm/index.js +16 -12
  22. package/dist/esm/{global.js → objects/analytics.js} +0 -0
  23. package/dist/esm/{application.js → objects/application.js} +0 -0
  24. package/dist/esm/{auth.js → objects/auth.js} +0 -0
  25. package/dist/esm/{http.js → objects/form.js} +0 -0
  26. package/dist/esm/{session.js → objects/global.js} +0 -0
  27. package/dist/esm/{transaction.js → objects/http.js} +0 -0
  28. package/dist/esm/{loan.js → objects/loan.js} +0 -0
  29. package/dist/esm/objects/loanv2.js +18 -0
  30. package/dist/esm/{transactiontemplate.js → objects/memStorage.js} +0 -0
  31. package/dist/esm/{module.js → objects/module.js} +0 -0
  32. package/dist/esm/{userAccessRights.js → objects/route.js} +0 -0
  33. package/dist/esm/objects/session.js +0 -0
  34. package/dist/esm/objects/transaction.js +8 -0
  35. package/dist/esm/objects/transactionTemplate.js +0 -0
  36. package/dist/esm/objects/userAccessRights.js +0 -0
  37. package/dist/esm/objects/view.js +0 -0
  38. package/dist/esm/scriptingObjectTypes.js +0 -0
  39. package/dist/types/events.d.ts +7 -0
  40. package/dist/types/index.d.ts +18 -12
  41. package/dist/types/objects/analytics.d.ts +24 -0
  42. package/dist/types/{application.d.ts → objects/application.d.ts} +98 -2
  43. package/dist/types/objects/auth.d.ts +105 -0
  44. package/dist/types/objects/form.d.ts +47 -0
  45. package/dist/types/objects/global.d.ts +47 -0
  46. package/dist/types/objects/http.d.ts +52 -0
  47. package/dist/types/{loan.d.ts → objects/loan.d.ts} +75 -11
  48. package/dist/types/objects/loanv2.d.ts +140 -0
  49. package/dist/types/objects/memStorage.d.ts +26 -0
  50. package/dist/types/objects/module.d.ts +55 -0
  51. package/dist/types/objects/route.d.ts +7 -0
  52. package/dist/types/objects/session.d.ts +18 -0
  53. package/dist/types/objects/transaction.d.ts +295 -0
  54. package/dist/types/objects/transactionTemplate.d.ts +76 -0
  55. package/dist/types/{userAccessRights.d.ts → objects/userAccessRights.d.ts} +3 -0
  56. package/dist/types/objects/view.d.ts +43 -0
  57. package/dist/types/script.d.ts +25 -1
  58. package/dist/types/scriptingObjectTypes.d.ts +30 -0
  59. package/package.json +5 -3
  60. package/dist/cjs/index.pug +0 -19
  61. package/dist/cjs/transaction.js +0 -16
  62. package/dist/cjs/transactiontemplate.js +0 -16
  63. package/dist/esm/index.pug +0 -19
  64. package/dist/esm/loanv2.js +0 -8
  65. package/dist/types/auth.d.ts +0 -43
  66. package/dist/types/form.d.ts +0 -10
  67. package/dist/types/global.d.ts +0 -5
  68. package/dist/types/http.d.ts +0 -7
  69. package/dist/types/loanv2.d.ts +0 -61
  70. package/dist/types/module.d.ts +0 -16
  71. package/dist/types/session.d.ts +0 -4
  72. package/dist/types/transaction.d.ts +0 -53
  73. package/dist/types/transactiontemplate.d.ts +0 -12
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var events_exports = {};
16
+ module.exports = __toCommonJS(events_exports);
package/dist/cjs/index.js CHANGED
@@ -15,16 +15,20 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
15
15
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
16
  var lib_exports = {};
17
17
  module.exports = __toCommonJS(lib_exports);
18
- __reExport(lib_exports, require("./auth.js"), module.exports);
19
- __reExport(lib_exports, require("./application.js"), module.exports);
20
- __reExport(lib_exports, require("./form.js"), module.exports);
21
- __reExport(lib_exports, require("./global.js"), module.exports);
22
- __reExport(lib_exports, require("./http.js"), module.exports);
23
- __reExport(lib_exports, require("./loan.js"), module.exports);
24
- __reExport(lib_exports, require("./loanv2.js"), module.exports);
25
- __reExport(lib_exports, require("./module.js"), module.exports);
26
18
  __reExport(lib_exports, require("./script.js"), module.exports);
27
- __reExport(lib_exports, require("./session.js"), module.exports);
28
- __reExport(lib_exports, require("./transaction.js"), module.exports);
29
- __reExport(lib_exports, require("./transactiontemplate.js"), module.exports);
30
- __reExport(lib_exports, require("./userAccessRights.js"), module.exports);
19
+ __reExport(lib_exports, require("./objects/analytics.js"), module.exports);
20
+ __reExport(lib_exports, require("./objects/application.js"), module.exports);
21
+ __reExport(lib_exports, require("./objects/auth.js"), module.exports);
22
+ __reExport(lib_exports, require("./objects/form.js"), module.exports);
23
+ __reExport(lib_exports, require("./objects/global.js"), module.exports);
24
+ __reExport(lib_exports, require("./objects/http.js"), module.exports);
25
+ __reExport(lib_exports, require("./objects/loan.js"), module.exports);
26
+ __reExport(lib_exports, require("./objects/loanv2.js"), module.exports);
27
+ __reExport(lib_exports, require("./objects/memStorage.js"), module.exports);
28
+ __reExport(lib_exports, require("./objects/module.js"), module.exports);
29
+ __reExport(lib_exports, require("./objects/route.js"), module.exports);
30
+ __reExport(lib_exports, require("./objects/session.js"), module.exports);
31
+ __reExport(lib_exports, require("./objects/transaction.js"), module.exports);
32
+ __reExport(lib_exports, require("./objects/transactionTemplate.js"), module.exports);
33
+ __reExport(lib_exports, require("./objects/userAccessRights.js"), module.exports);
34
+ __reExport(lib_exports, require("./objects/view.js"), module.exports);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var analytics_exports = {};
16
+ module.exports = __toCommonJS(analytics_exports);
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var loanv2_exports = {};
20
+ __export(loanv2_exports, {
21
+ CommitErrorStatus: () => CommitErrorStatus,
22
+ FieldErrorType: () => FieldErrorType
23
+ });
24
+ module.exports = __toCommonJS(loanv2_exports);
25
+ var FieldErrorType = /* @__PURE__ */ ((FieldErrorType2) => {
26
+ FieldErrorType2["ACCESS"] = "access";
27
+ FieldErrorType2["VALUE"] = "value";
28
+ FieldErrorType2["SERIALIZATION"] = "serialization";
29
+ FieldErrorType2["DATA"] = "data";
30
+ FieldErrorType2["CONFLICT"] = "conflict";
31
+ return FieldErrorType2;
32
+ })(FieldErrorType || {});
33
+ var CommitErrorStatus = /* @__PURE__ */ ((CommitErrorStatus2) => {
34
+ CommitErrorStatus2["FIELDERROR"] = "field_error";
35
+ CommitErrorStatus2["LOCK_INVALID_OR_REMOVED"] = "lock_invalid_or_removed";
36
+ CommitErrorStatus2["WORKSPACE_READ_ONLY"] = "workspace_read_only";
37
+ return CommitErrorStatus2;
38
+ })(CommitErrorStatus || {});
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var memStorage_exports = {};
16
+ module.exports = __toCommonJS(memStorage_exports);
File without changes
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var route_exports = {};
16
+ module.exports = __toCommonJS(route_exports);
File without changes
@@ -16,13 +16,13 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var loanv2_exports = {};
20
- __export(loanv2_exports, {
21
- FieldErrorType: () => FieldErrorType
19
+ var transaction_exports = {};
20
+ __export(transaction_exports, {
21
+ OriginContext: () => OriginContext
22
22
  });
23
- module.exports = __toCommonJS(loanv2_exports);
24
- var FieldErrorType = /* @__PURE__ */ ((FieldErrorType2) => {
25
- FieldErrorType2["ACCESS"] = "access";
26
- FieldErrorType2["VALUE"] = "value";
27
- return FieldErrorType2;
28
- })(FieldErrorType || {});
23
+ module.exports = __toCommonJS(transaction_exports);
24
+ var OriginContext = /* @__PURE__ */ ((OriginContext2) => {
25
+ OriginContext2["LENDER"] = "lender";
26
+ OriginContext2["CONSUMER"] = "consumer";
27
+ return OriginContext2;
28
+ })(OriginContext || {});
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var transactionTemplate_exports = {};
16
+ module.exports = __toCommonJS(transactionTemplate_exports);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var view_exports = {};
16
+ module.exports = __toCommonJS(view_exports);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var scriptingObjectTypes_exports = {};
16
+ module.exports = __toCommonJS(scriptingObjectTypes_exports);
File without changes
package/dist/esm/index.js CHANGED
@@ -1,13 +1,17 @@
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 "./loanv2.js";
8
- export * from "./module.js";
9
1
  export * from "./script.js";
10
- export * from "./session.js";
11
- export * from "./transaction.js";
12
- export * from "./transactiontemplate.js";
13
- export * from "./userAccessRights.js";
2
+ export * from "./objects/analytics.js";
3
+ export * from "./objects/application.js";
4
+ export * from "./objects/auth.js";
5
+ export * from "./objects/form.js";
6
+ export * from "./objects/global.js";
7
+ export * from "./objects/http.js";
8
+ export * from "./objects/loan.js";
9
+ export * from "./objects/loanv2.js";
10
+ export * from "./objects/memStorage.js";
11
+ export * from "./objects/module.js";
12
+ export * from "./objects/route.js";
13
+ export * from "./objects/session.js";
14
+ export * from "./objects/transaction.js";
15
+ export * from "./objects/transactionTemplate.js";
16
+ export * from "./objects/userAccessRights.js";
17
+ export * from "./objects/view.js";
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,18 @@
1
+ var FieldErrorType = /* @__PURE__ */ ((FieldErrorType2) => {
2
+ FieldErrorType2["ACCESS"] = "access";
3
+ FieldErrorType2["VALUE"] = "value";
4
+ FieldErrorType2["SERIALIZATION"] = "serialization";
5
+ FieldErrorType2["DATA"] = "data";
6
+ FieldErrorType2["CONFLICT"] = "conflict";
7
+ return FieldErrorType2;
8
+ })(FieldErrorType || {});
9
+ var CommitErrorStatus = /* @__PURE__ */ ((CommitErrorStatus2) => {
10
+ CommitErrorStatus2["FIELDERROR"] = "field_error";
11
+ CommitErrorStatus2["LOCK_INVALID_OR_REMOVED"] = "lock_invalid_or_removed";
12
+ CommitErrorStatus2["WORKSPACE_READ_ONLY"] = "workspace_read_only";
13
+ return CommitErrorStatus2;
14
+ })(CommitErrorStatus || {});
15
+ export {
16
+ CommitErrorStatus,
17
+ FieldErrorType
18
+ };
File without changes
File without changes
@@ -0,0 +1,8 @@
1
+ var OriginContext = /* @__PURE__ */ ((OriginContext2) => {
2
+ OriginContext2["LENDER"] = "lender";
3
+ OriginContext2["CONSUMER"] = "consumer";
4
+ return OriginContext2;
5
+ })(OriginContext || {});
6
+ export {
7
+ OriginContext
8
+ };
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ import { FormEvents } from './objects/form.js';
2
+ import { ApplicationEvents } from './objects/application.js';
3
+ import { GlobalEvents } from './objects/global.js';
4
+ import { ModuleEvents } from './objects/module.js';
5
+ import { LoanEvents } from './objects/loan.js';
6
+ import { ViewEvents } from './objects/view.js';
7
+ export declare type ScriptingObjectEvents = FormEvents & ApplicationEvents & GlobalEvents & ModuleEvents & LoanEvents & ViewEvents;
@@ -1,13 +1,19 @@
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 './loanv2.js';
8
- export * from './module.js';
9
1
  export * from './script.js';
10
- export * from './session.js';
11
- export * from './transaction.js';
12
- export * from './transactiontemplate.js';
13
- export * from './userAccessRights.js';
2
+ export * from './objects/analytics.js';
3
+ export * from './objects/application.js';
4
+ export * from './objects/auth.js';
5
+ export * from './objects/form.js';
6
+ export * from './objects/global.js';
7
+ export * from './objects/http.js';
8
+ export * from './objects/loan.js';
9
+ export * from './objects/loanv2.js';
10
+ export * from './objects/memStorage.js';
11
+ export * from './objects/module.js';
12
+ export * from './objects/route.js';
13
+ export * from './objects/session.js';
14
+ export * from './objects/transaction.js';
15
+ export * from './objects/transactionTemplate.js';
16
+ export * from './objects/userAccessRights.js';
17
+ export * from './objects/view.js';
18
+ export type { ScriptingObjectEvents } from './events.js';
19
+ export type { ScriptingObjectTypes } from './scriptingObjectTypes.js';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Business analytics event to be sent
3
+ */
4
+ export declare type BAEvent = {
5
+ /**
6
+ * name of the analytic event
7
+ */
8
+ event: string;
9
+ /**
10
+ * custom properties to be sent with the event
11
+ */
12
+ [key: string]: string;
13
+ };
14
+ /**
15
+ * Methods and events to send and receive business analytics events
16
+ */
17
+ export interface IAnalytics {
18
+ /**
19
+ * send business analytics event
20
+ *
21
+ * @param event business event to be sent
22
+ */
23
+ sendBAEvent(event: BAEvent): void;
24
+ }
@@ -12,6 +12,9 @@ export declare type ApplicationExtension = {
12
12
  url: string;
13
13
  options?: Record<string, string>;
14
14
  };
15
+ /**
16
+ * Types of navigations
17
+ */
15
18
  export declare enum NavigationType {
16
19
  STANDARD_FORM = "STANDARD_FORM",
17
20
  STANDARD_TOOL = "STANDARD_TOOL",
@@ -20,7 +23,13 @@ export declare enum NavigationType {
20
23
  GLOBAL_CUSTOM_TOOL = "GLOBAL_CUSTOM_TOOL",
21
24
  OTHER = "OTHER"
22
25
  }
26
+ /**
27
+ * navigation options
28
+ */
23
29
  export declare type NavigationOptions = {
30
+ /**
31
+ *
32
+ */
24
33
  target: string;
25
34
  type: NavigationType;
26
35
  context?: Record<string, string>;
@@ -67,7 +76,7 @@ export declare type PrintOptions = {
67
76
  blob: Blob;
68
77
  };
69
78
  /**
70
- * The Application Object allows for access to application-level UI elements, behaviors and events
79
+ * Allows access to application-level UI elements, behaviors and events
71
80
  */
72
81
  export interface IApplication {
73
82
  /**
@@ -77,19 +86,80 @@ export interface IApplication {
77
86
  */
78
87
  getDescriptior(): Promise<AppInfo>;
79
88
  getApplicationContext(): Promise<ApplicationContext>;
89
+ /**
90
+ * extends the application with a new menu item or tool
91
+ *
92
+ * @param extensionObj properties of the extension
93
+ */
80
94
  extend(extensionObj: ApplicationExtension): Promise<void>;
95
+ /**
96
+ * navigate to a new application route / url
97
+ *
98
+ * @param options target url and type of navigation
99
+ */
81
100
  navigate(options: NavigationOptions): Promise<void>;
82
101
  performAction(action: string, options: Record<string, string>): Promise<void>;
102
+ /**
103
+ * open a page or document
104
+ *
105
+ * @param options target and type of the document to open
106
+ */
83
107
  open(options: OpenOptions): Promise<void>;
108
+ /**
109
+ * open a modal
110
+ *
111
+ * @param options modal properties
112
+ */
84
113
  openModal(options: OpenModalOptions): Promise<void>;
114
+ /**
115
+ * close a modal
116
+ */
85
117
  closeModal(): Promise<void>;
118
+ /**
119
+ * get supportability of an action
120
+ *
121
+ * @param name action name
122
+ * @returns true if the action is supported
123
+ */
86
124
  supportsAction(name: string): Promise<boolean>;
125
+ /**
126
+ * get navigability to a particular page or screen
127
+ *
128
+ * @param name page or screen name
129
+ * @returns true if the page or screen is navigable
130
+ */
87
131
  supportsNavigateTo(name: string): Promise<boolean>;
132
+ /**
133
+ * Get the capabilities of the application
134
+ *
135
+ * @returns capabilities as key-value pairs
136
+ */
88
137
  getCapabilities(): Promise<Capabilities>;
138
+ /**
139
+ * renew the user session
140
+ */
89
141
  keepSessionAlive(): Promise<void>;
142
+ /**
143
+ * show wait spinner
144
+ *
145
+ * @param message message to display
146
+ */
90
147
  showSpinner(message: string): Promise<void>;
148
+ /**
149
+ * hide wait spinner
150
+ */
91
151
  hideSpinner(): Promise<void>;
152
+ /**
153
+ * get policy details for the current user
154
+ *
155
+ * @returns policy details as key value pairs
156
+ */
92
157
  getPoliciesDetails(): Promise<Record<string, string>>;
158
+ /**
159
+ * get persona Access information for the current user
160
+ *
161
+ * @returns persona access information as key value pairs
162
+ */
93
163
  getPersonaAccess(): Promise<Record<string, string>>;
94
164
  /**
95
165
  * Prints given document
@@ -97,6 +167,32 @@ export interface IApplication {
97
167
  * @param options Print options
98
168
  */
99
169
  print(options: PrintOptions): Promise<void>;
170
+ /**
171
+ * show error message to user
172
+ *
173
+ * @param message error message to display
174
+ */
175
+ showError(message: string): Promise<void>;
100
176
  }
101
- export declare type AppLoginListener = () => void;
177
+ /**
178
+ * event handler that handles user login event
179
+ *
180
+ * @param userId unique identifier of the user
181
+ */
182
+ export declare type AppLoginListener = (userId: string) => void;
183
+ /**
184
+ * event handler that handles action completed event
185
+ *
186
+ * @param name action name
187
+ */
102
188
  export declare type AppActionCompletedListener = (name: string) => void;
189
+ export declare type ApplicationEvents = {
190
+ /**
191
+ * event fired when the user logs in
192
+ */
193
+ 'application.login': AppLoginListener;
194
+ /**
195
+ * event fired when an action is completed. actions are executed through the performAction method
196
+ */
197
+ 'application.actionCompleted': AppActionCompletedListener;
198
+ };
@@ -0,0 +1,105 @@
1
+ import { UserAccessRights } from './userAccessRights';
2
+ export declare type Personas = {
3
+ entityId: string;
4
+ entityType: string;
5
+ entityName: string;
6
+ };
7
+ export declare type User = {
8
+ /**
9
+ * unique identifier for the user
10
+ */
11
+ id: string;
12
+ realm: string;
13
+ /**
14
+ * user's first name
15
+ */
16
+ firstName: string;
17
+ /**
18
+ * user's last name
19
+ */
20
+ lastName: string;
21
+ /**
22
+ * user's phone number
23
+ */
24
+ phone: string;
25
+ /**
26
+ * user's cell phone number
27
+ */
28
+ cellPhone: string;
29
+ personas: Array<Personas>;
30
+ /**
31
+ * encompass client Id
32
+ */
33
+ clientId: string;
34
+ /**
35
+ * user's email address
36
+ */
37
+ email: string;
38
+ };
39
+ export declare enum TokenType {
40
+ BEARER = "Bearer"
41
+ }
42
+ export declare type PluginInfo = {
43
+ /**
44
+ * unique identifier for the plugin
45
+ */
46
+ clientId: string;
47
+ /**
48
+ * redirect url for the plugin
49
+ */
50
+ redirectUrl: string;
51
+ /**
52
+ * type of token
53
+ */
54
+ scope: TokenType;
55
+ };
56
+ export declare type TokenInfo = {
57
+ /**
58
+ * child access token
59
+ */
60
+ accessToken: string;
61
+ /**
62
+ * type of token
63
+ */
64
+ tokenType: TokenType;
65
+ /**
66
+ * base url of the api endpoint
67
+ */
68
+ apiBaseUrl: string;
69
+ };
70
+ /**
71
+ * Methods to get information about the user and access token
72
+ */
73
+ export interface IAuth {
74
+ /**
75
+ * Deprecated: use getAccessToken method instead
76
+ *
77
+ * Generates a new Auth Code for the caller which can be exchanged for
78
+ * an Access Token using the Client Secret associated with the given OAuth Client ID.
79
+ * In certain contexts, the Auth token is tied to the currently logged in user's identity
80
+ *
81
+ * @param clientId unique identifier of the plugin
82
+ * @returns auth code
83
+ */
84
+ createAuthCode(clientId: string): Promise<string>;
85
+ /**
86
+ * Get child access token for the given plugin
87
+ *
88
+ * @param appInfo metadata about the plugin requesting the access token
89
+ * @returns access token with the api base url
90
+ */
91
+ getAccessToken(appInfo: PluginInfo): Promise<TokenInfo>;
92
+ /**
93
+ * Get current logged in user information
94
+ *
95
+ * @returns user information
96
+ */
97
+ getUser(): Promise<User>;
98
+ /**
99
+ * Get access rights for the current user
100
+ *
101
+ * @returns user access rights
102
+ * @throws {Error} if operation fails
103
+ */
104
+ getUserAccessRights(): Promise<UserAccessRights>;
105
+ }