@elliemae/pui-scripting-object 1.8.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.
- package/dist/cjs/events.js +16 -0
- package/dist/cjs/index.js +16 -15
- package/dist/cjs/{analytics.js → objects/analytics.js} +0 -0
- package/dist/cjs/{application.js → objects/application.js} +0 -0
- package/dist/cjs/{auth.js → objects/auth.js} +0 -0
- package/dist/cjs/{form.js → objects/form.js} +0 -0
- package/dist/cjs/{global.js → objects/global.js} +0 -0
- package/dist/cjs/{http.js → objects/http.js} +0 -0
- package/dist/cjs/{loan.js → objects/loan.js} +0 -0
- package/dist/cjs/{loanv2.js → objects/loanv2.js} +0 -0
- package/dist/cjs/objects/memStorage.js +16 -0
- package/dist/cjs/{module.js → objects/module.js} +0 -0
- package/dist/cjs/{route.js → objects/route.js} +0 -0
- package/dist/cjs/{session.js → objects/session.js} +0 -0
- package/dist/cjs/{transaction.js → objects/transaction.js} +12 -0
- package/dist/cjs/objects/transactionTemplate.js +16 -0
- package/dist/cjs/{userAccessRights.js → objects/userAccessRights.js} +0 -0
- package/dist/cjs/{view.js → objects/view.js} +0 -0
- package/dist/esm/{analytics.js → events.js} +0 -0
- package/dist/esm/index.js +16 -15
- package/dist/esm/{form.js → objects/analytics.js} +0 -0
- package/dist/esm/{application.js → objects/application.js} +0 -0
- package/dist/esm/{auth.js → objects/auth.js} +0 -0
- package/dist/esm/{global.js → objects/form.js} +0 -0
- package/dist/esm/{http.js → objects/global.js} +0 -0
- package/dist/esm/{route.js → objects/http.js} +0 -0
- package/dist/esm/{loan.js → objects/loan.js} +0 -0
- package/dist/esm/{loanv2.js → objects/loanv2.js} +0 -0
- package/dist/esm/{session.js → objects/memStorage.js} +0 -0
- package/dist/esm/{module.js → objects/module.js} +0 -0
- package/dist/esm/{transaction.js → objects/route.js} +0 -0
- package/dist/esm/{transactiontemplate.js → objects/session.js} +0 -0
- package/dist/esm/objects/transaction.js +8 -0
- package/dist/esm/{userAccessRights.js → objects/transactionTemplate.js} +0 -0
- package/dist/esm/{view.js → objects/userAccessRights.js} +0 -0
- package/dist/esm/objects/view.js +0 -0
- package/dist/types/events.d.ts +7 -0
- package/dist/types/index.d.ts +17 -15
- package/dist/types/{analytics.d.ts → objects/analytics.d.ts} +6 -0
- package/dist/types/{application.d.ts → objects/application.d.ts} +92 -2
- package/dist/types/objects/auth.d.ts +105 -0
- package/dist/types/objects/form.d.ts +47 -0
- package/dist/types/objects/global.d.ts +47 -0
- package/dist/types/objects/http.d.ts +52 -0
- package/dist/types/{loan.d.ts → objects/loan.d.ts} +75 -11
- package/dist/types/{loanv2.d.ts → objects/loanv2.d.ts} +33 -0
- package/dist/types/objects/memStorage.d.ts +26 -0
- package/dist/types/objects/module.d.ts +55 -0
- package/dist/types/{route.d.ts → objects/route.d.ts} +1 -1
- package/dist/types/{session.d.ts → objects/session.d.ts} +1 -1
- package/dist/types/objects/transaction.d.ts +295 -0
- package/dist/types/objects/transactionTemplate.d.ts +76 -0
- package/dist/types/{userAccessRights.d.ts → objects/userAccessRights.d.ts} +3 -0
- package/dist/types/{view.d.ts → objects/view.d.ts} +20 -18
- package/dist/types/scriptingObjectTypes.d.ts +18 -12
- package/package.json +2 -2
- package/dist/cjs/transactiontemplate.js +0 -16
- package/dist/types/auth.d.ts +0 -43
- package/dist/types/form.d.ts +0 -10
- package/dist/types/global.d.ts +0 -5
- package/dist/types/http.d.ts +0 -7
- package/dist/types/module.d.ts +0 -16
- package/dist/types/transaction.d.ts +0 -53
- 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,19 +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("./
|
|
28
|
-
__reExport(lib_exports, require("./
|
|
29
|
-
__reExport(lib_exports, require("./
|
|
30
|
-
__reExport(lib_exports, require("./
|
|
31
|
-
__reExport(lib_exports, require("./
|
|
32
|
-
__reExport(lib_exports, require("./
|
|
33
|
-
__reExport(lib_exports, require("./
|
|
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);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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 memStorage_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(memStorage_exports);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
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
|
+
};
|
|
6
10
|
var __copyProps = (to, from, except, desc) => {
|
|
7
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -13,4 +17,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
17
|
};
|
|
14
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
19
|
var transaction_exports = {};
|
|
20
|
+
__export(transaction_exports, {
|
|
21
|
+
OriginContext: () => OriginContext
|
|
22
|
+
});
|
|
16
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);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/esm/index.js
CHANGED
|
@@ -1,16 +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 "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./
|
|
14
|
-
export * from "./
|
|
15
|
-
export * from "./
|
|
16
|
-
export * from "./
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,17 +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 './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './
|
|
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';
|
|
17
19
|
export type { ScriptingObjectTypes } from './scriptingObjectTypes.js';
|
|
@@ -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
|
-
*
|
|
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
|
|
@@ -104,5 +174,25 @@ export interface IApplication {
|
|
|
104
174
|
*/
|
|
105
175
|
showError(message: string): Promise<void>;
|
|
106
176
|
}
|
|
107
|
-
|
|
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
|
+
*/
|
|
108
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
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare type FormDescriptor = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Methods to get information about the custom form
|
|
7
|
+
*/
|
|
8
|
+
export interface IForm {
|
|
9
|
+
/**
|
|
10
|
+
* get metadata of the form
|
|
11
|
+
*
|
|
12
|
+
* @returns form metadata
|
|
13
|
+
*/
|
|
14
|
+
getDescriptor(): Promise<FormDescriptor>;
|
|
15
|
+
/**
|
|
16
|
+
* get reference to the form's input control
|
|
17
|
+
*
|
|
18
|
+
* @param id form id
|
|
19
|
+
* @returns form input control object
|
|
20
|
+
*/
|
|
21
|
+
getControl(id: string): Promise<any>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* event handler for form load event
|
|
25
|
+
*
|
|
26
|
+
* @param id unique id of the form that is loaded
|
|
27
|
+
*/
|
|
28
|
+
export declare type FormLoadListener = (id: string) => void;
|
|
29
|
+
/**
|
|
30
|
+
* event handler for form unload event
|
|
31
|
+
*
|
|
32
|
+
* @param id unique id of the form that is unloaded
|
|
33
|
+
*/
|
|
34
|
+
export declare type FormUnloadListener = (id: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* events that notifies the form's lifecycle
|
|
37
|
+
*/
|
|
38
|
+
export declare type FormEvents = {
|
|
39
|
+
/**
|
|
40
|
+
* form is loaded and ready for user interaction
|
|
41
|
+
*/
|
|
42
|
+
'form.load': FormLoadListener;
|
|
43
|
+
/**
|
|
44
|
+
* form is unloaded and no longer available for user interaction
|
|
45
|
+
*/
|
|
46
|
+
'form.unload': FormUnloadListener;
|
|
47
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Global object allows for data to be shared between custom forms/tools/plugins within a user's session.
|
|
3
|
+
* Unlike the Session scripting object, where data is isolated to be visible/accessible only by the form/plugin that writes the variables,
|
|
4
|
+
* values written to the Global store are visible to all such customizations
|
|
5
|
+
*
|
|
6
|
+
* The implementation of this object should write the global state data to the host application's sessionStore,
|
|
7
|
+
* but should ensure that the state is isolated away from the host application's state variables. This should be done by creating
|
|
8
|
+
* naming conventions for the global keyspaces, e.g. ssf.global.<key>.
|
|
9
|
+
*
|
|
10
|
+
* In order to ensure that guest applications cannot consume significant amounts of sessionStorage, restrictions should be placed on
|
|
11
|
+
* the number and size of the stored session state. In particular, we can start with these values:
|
|
12
|
+
* Each valueObj, when stringified, cannot exceed 5 KB
|
|
13
|
+
* Total global state should be limited to 50 values
|
|
14
|
+
* This will ensure that no guest can consume more than 250 KB of sessionStorage
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export interface IGlobal {
|
|
18
|
+
/**
|
|
19
|
+
* set a value in the global store
|
|
20
|
+
*
|
|
21
|
+
* @param key unique key to identify the value
|
|
22
|
+
* @param value value to be stored
|
|
23
|
+
*/
|
|
24
|
+
set(key: string, value: any): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* get a value from the global store
|
|
27
|
+
*
|
|
28
|
+
* @param key unique key to identify the value
|
|
29
|
+
* @returns value stored in the global store
|
|
30
|
+
*/
|
|
31
|
+
get(key: string): Promise<any>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* event handler for global state change event
|
|
35
|
+
*
|
|
36
|
+
* @param key name of the key for which the value changed
|
|
37
|
+
*/
|
|
38
|
+
export declare type GlobalStateChangeListener = (key: string) => void;
|
|
39
|
+
/**
|
|
40
|
+
* events fired from Global scripting object
|
|
41
|
+
*/
|
|
42
|
+
export declare type GlobalEvents = {
|
|
43
|
+
/**
|
|
44
|
+
* event fired when a value changes in the global store
|
|
45
|
+
*/
|
|
46
|
+
'global.change': GlobalStateChangeListener;
|
|
47
|
+
};
|