@elliemae/pui-scripting-object 1.12.0 → 1.14.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/objects/application.js +11 -0
- package/dist/cjs/objects/module.js +0 -17
- package/dist/cjs/objects/transactionv2.js +13 -0
- package/dist/esm/objects/application.js +11 -0
- package/dist/esm/objects/module.js +0 -13
- package/dist/esm/objects/transactionv2.js +9 -0
- package/dist/types/objects/application.d.ts +16 -0
- package/dist/types/objects/module.d.ts +11 -25
- package/dist/types/objects/shared.d.ts +67 -9
- package/dist/types/objects/transaction.d.ts +6 -69
- package/dist/types/objects/transactionv2.d.ts +26 -89
- package/package.json +13 -4
|
@@ -19,10 +19,21 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var application_exports = {};
|
|
20
20
|
__export(application_exports, {
|
|
21
21
|
ApplicationExtensionType: () => ApplicationExtensionType,
|
|
22
|
+
LogLevel: () => LogLevel,
|
|
22
23
|
ModalSize: () => ModalSize,
|
|
23
24
|
NavigationType: () => NavigationType
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(application_exports);
|
|
27
|
+
var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
28
|
+
LogLevel2["TRACE"] = "TRACE";
|
|
29
|
+
LogLevel2["DEBUG"] = "DEBUG";
|
|
30
|
+
LogLevel2["INFO"] = "INFO";
|
|
31
|
+
LogLevel2["AUDIT"] = "AUDIT";
|
|
32
|
+
LogLevel2["WARN"] = "WARN";
|
|
33
|
+
LogLevel2["ERROR"] = "ERROR";
|
|
34
|
+
LogLevel2["FATAL"] = "FATAL";
|
|
35
|
+
return LogLevel2;
|
|
36
|
+
})(LogLevel || {});
|
|
26
37
|
var ApplicationExtensionType = /* @__PURE__ */ ((ApplicationExtensionType2) => {
|
|
27
38
|
ApplicationExtensionType2["TOOL"] = "TOOL";
|
|
28
39
|
ApplicationExtensionType2["MENU"] = "MENU";
|
|
@@ -3,10 +3,6 @@ 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
|
-
};
|
|
10
6
|
var __copyProps = (to, from, except, desc) => {
|
|
11
7
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
8
|
for (let key of __getOwnPropNames(from))
|
|
@@ -17,17 +13,4 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
13
|
};
|
|
18
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
15
|
var module_exports = {};
|
|
20
|
-
__export(module_exports, {
|
|
21
|
-
LogLevel: () => LogLevel
|
|
22
|
-
});
|
|
23
16
|
module.exports = __toCommonJS(module_exports);
|
|
24
|
-
var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
25
|
-
LogLevel2["TRACE"] = "TRACE";
|
|
26
|
-
LogLevel2["DEBUG"] = "DEBUG";
|
|
27
|
-
LogLevel2["INFO"] = "INFO";
|
|
28
|
-
LogLevel2["AUDIT"] = "AUDIT";
|
|
29
|
-
LogLevel2["WARN"] = "WARN";
|
|
30
|
-
LogLevel2["ERROR"] = "ERROR";
|
|
31
|
-
LogLevel2["FATAL"] = "FATAL";
|
|
32
|
-
return LogLevel2;
|
|
33
|
-
})(LogLevel || {});
|
|
@@ -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,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
17
|
};
|
|
14
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
19
|
var transactionv2_exports = {};
|
|
20
|
+
__export(transactionv2_exports, {
|
|
21
|
+
CompleteReason: () => CompleteReason
|
|
22
|
+
});
|
|
16
23
|
module.exports = __toCommonJS(transactionv2_exports);
|
|
24
|
+
var CompleteReason = /* @__PURE__ */ ((CompleteReason2) => {
|
|
25
|
+
CompleteReason2["CLOSE"] = "close";
|
|
26
|
+
CompleteReason2["CANCEL"] = "cancel";
|
|
27
|
+
CompleteReason2["ERROR"] = "error";
|
|
28
|
+
return CompleteReason2;
|
|
29
|
+
})(CompleteReason || {});
|
|
@@ -1,3 +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 || {});
|
|
1
11
|
var ApplicationExtensionType = /* @__PURE__ */ ((ApplicationExtensionType2) => {
|
|
2
12
|
ApplicationExtensionType2["TOOL"] = "TOOL";
|
|
3
13
|
ApplicationExtensionType2["MENU"] = "MENU";
|
|
@@ -20,6 +30,7 @@ var ModalSize = /* @__PURE__ */ ((ModalSize2) => {
|
|
|
20
30
|
})(ModalSize || {});
|
|
21
31
|
export {
|
|
22
32
|
ApplicationExtensionType,
|
|
33
|
+
LogLevel,
|
|
23
34
|
ModalSize,
|
|
24
35
|
NavigationType
|
|
25
36
|
};
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
}
|
|
1
10
|
export declare type AppInfo = {
|
|
2
11
|
id: string;
|
|
3
12
|
name: string;
|
|
@@ -173,6 +182,13 @@ export interface IApplication {
|
|
|
173
182
|
* @param message error message to display
|
|
174
183
|
*/
|
|
175
184
|
showError(message: string): Promise<void>;
|
|
185
|
+
/**
|
|
186
|
+
* log a message to host application's logs
|
|
187
|
+
*
|
|
188
|
+
* @param message message to log
|
|
189
|
+
* @param logLevel level of the log message
|
|
190
|
+
*/
|
|
191
|
+
log(message: string, logLevel: LogLevel): Promise<void>;
|
|
176
192
|
}
|
|
177
193
|
/**
|
|
178
194
|
* event handler that handles user login event
|
|
@@ -1,47 +1,33 @@
|
|
|
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
1
|
/**
|
|
11
|
-
*
|
|
2
|
+
* Exposes MicroApp module specific methods
|
|
12
3
|
*/
|
|
13
4
|
export interface IModule {
|
|
14
5
|
/**
|
|
15
|
-
* get module-specific
|
|
6
|
+
* get microapp module-specific capabilities or settings defined by the host application. Helps to define the style and/or behavior of the module
|
|
16
7
|
*
|
|
17
|
-
* @returns key-value pairs
|
|
8
|
+
* @returns capabilities or settings as key-value pairs
|
|
18
9
|
*/
|
|
19
10
|
getCapabilities(): Promise<Record<string, string>>;
|
|
20
11
|
/**
|
|
21
|
-
*
|
|
12
|
+
* get microapp module-specific parameters.
|
|
13
|
+
* For example, a lender may select a set of loans within the host application which must be passed to a module
|
|
14
|
+
* that implements a specific workflow for those loans
|
|
22
15
|
*
|
|
23
|
-
* @returns
|
|
16
|
+
* @returns parameters as key-value pairs
|
|
24
17
|
*/
|
|
25
|
-
getParameters(): Promise<Record<string, string>>;
|
|
18
|
+
getParameters(): Promise<Record<string, string | number | boolean>>;
|
|
26
19
|
/**
|
|
27
|
-
* unload the module from the host application
|
|
20
|
+
* unload the microapp module from the host application
|
|
28
21
|
*/
|
|
29
22
|
unload(): Promise<void>;
|
|
30
|
-
/**
|
|
31
|
-
* log a message to host application's logs
|
|
32
|
-
*
|
|
33
|
-
* @param message message to log
|
|
34
|
-
* @param logLevel level of the log message
|
|
35
|
-
*/
|
|
36
|
-
log(message: string, logLevel: LogLevel): Promise<void>;
|
|
37
23
|
}
|
|
38
24
|
/**
|
|
39
25
|
* event handler that handles module unload event
|
|
40
26
|
*
|
|
41
|
-
* @param id unique id of the
|
|
27
|
+
* @param id unique id of the app that is being unloaded
|
|
42
28
|
* @returns true if the module can be unloaded, false otherwise
|
|
43
29
|
*/
|
|
44
|
-
export declare type ModuleUnLoadingListener = (
|
|
30
|
+
export declare type ModuleUnLoadingListener = (appId: string) => boolean;
|
|
45
31
|
/**
|
|
46
32
|
* events that notifies the module's lifecycle
|
|
47
33
|
*/
|
|
@@ -14,7 +14,7 @@ export declare enum OriginContext {
|
|
|
14
14
|
/**
|
|
15
15
|
* transaction origination context
|
|
16
16
|
*/
|
|
17
|
-
export declare type
|
|
17
|
+
export declare type OriginDetails = {
|
|
18
18
|
/**
|
|
19
19
|
* Temporary session token that grants authorization for a partner
|
|
20
20
|
* integration to access transaction origination information via the REST API's /partner/v2/origins/:id endpoint
|
|
@@ -25,14 +25,6 @@ export declare type OriginInfo = {
|
|
|
25
25
|
* via the REST API's /partner/v2/origins/:id endpoint
|
|
26
26
|
*/
|
|
27
27
|
id: string;
|
|
28
|
-
/**
|
|
29
|
-
* Unique identifier for the transaction in whose context the
|
|
30
|
-
* partner integrations user-interface is being launched.
|
|
31
|
-
* This is only available in the situation where your integration
|
|
32
|
-
* is being launched in the context of an existing transaction,
|
|
33
|
-
* and can be used to decide the appropriate view to display to users
|
|
34
|
-
*/
|
|
35
|
-
transactionId?: string;
|
|
36
28
|
/**
|
|
37
29
|
* The user type in whose context your integration is being launched
|
|
38
30
|
*/
|
|
@@ -73,3 +65,69 @@ export declare type TransactionEvent = {
|
|
|
73
65
|
*/
|
|
74
66
|
resources: Array<TransactionResource>;
|
|
75
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* details about the transaction
|
|
70
|
+
*/
|
|
71
|
+
export declare type TransactionDetails = {
|
|
72
|
+
/**
|
|
73
|
+
* details about the transaction that is created / updated
|
|
74
|
+
*/
|
|
75
|
+
request: {
|
|
76
|
+
/**
|
|
77
|
+
* The type of transaction request being initiated for the subject product.
|
|
78
|
+
* This must be one of the supported values for the request type that your application
|
|
79
|
+
* is configured to support - based on which its data entitlements are scoped.
|
|
80
|
+
*/
|
|
81
|
+
type: string;
|
|
82
|
+
/**
|
|
83
|
+
* The specific set of selectable options that apply to the specific
|
|
84
|
+
* type of transaction request, as modeled by your application
|
|
85
|
+
*/
|
|
86
|
+
options?: Record<string, string | boolean | number>;
|
|
87
|
+
/**
|
|
88
|
+
* The collection of file attachments - referred to as resource objects in the
|
|
89
|
+
* EPC API - to be attached to the transaction request.
|
|
90
|
+
* The id, name, and mimeType attribute needed for each resource object
|
|
91
|
+
* in the collection can be created in one of two ways:
|
|
92
|
+
* Your application utilized the transaction.createResource method to build a custom file upload experience, and the user invoked this functionality and uploaded a file from their local drive.
|
|
93
|
+
* Your application utilized the application.performAction("getAvailableResources") method to launch the host application's file explorer, and the user invoked this functionality and attached a file[s] from the host application.
|
|
94
|
+
* Once the resource objects are collected from these methods,
|
|
95
|
+
* be sure to echo them back to the EPC platform when creating a transaction!
|
|
96
|
+
*/
|
|
97
|
+
resources: Array<TransactionResource>;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* details of the transaction resource
|
|
102
|
+
*/
|
|
103
|
+
export declare type ResourceDetails = {
|
|
104
|
+
/**
|
|
105
|
+
* resource id
|
|
106
|
+
*/
|
|
107
|
+
id: string;
|
|
108
|
+
/**
|
|
109
|
+
* urn of the target upload location
|
|
110
|
+
*/
|
|
111
|
+
respository: string;
|
|
112
|
+
/**
|
|
113
|
+
* name of the resource
|
|
114
|
+
*/
|
|
115
|
+
name: string;
|
|
116
|
+
/**
|
|
117
|
+
* url to stream the resource
|
|
118
|
+
*/
|
|
119
|
+
location: string;
|
|
120
|
+
/**
|
|
121
|
+
* authorization header to upload the resource
|
|
122
|
+
*/
|
|
123
|
+
authorizationHeader: string;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* name of the document to be uploaded
|
|
127
|
+
*/
|
|
128
|
+
export declare type ResourceOptions = {
|
|
129
|
+
/**
|
|
130
|
+
* name of the document
|
|
131
|
+
*/
|
|
132
|
+
name: string;
|
|
133
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResourceDetails, TransactionDetails, TransactionEvent, OriginDetails, ResourceOptions } from './shared.js';
|
|
2
2
|
/**
|
|
3
3
|
* details about the transaction that is created / updated
|
|
4
4
|
*/
|
|
@@ -8,69 +8,6 @@ export declare type TransactionInfo = {
|
|
|
8
8
|
*/
|
|
9
9
|
id: string | null;
|
|
10
10
|
};
|
|
11
|
-
/**
|
|
12
|
-
* information about the transaction to be initiated
|
|
13
|
-
*/
|
|
14
|
-
export declare type TransactionOptions = {
|
|
15
|
-
request: {
|
|
16
|
-
/**
|
|
17
|
-
* The type of transaction request being initiated for the subject product.
|
|
18
|
-
* This must be one of the supported values for the request type that your application
|
|
19
|
-
* is configured to support - based on which its data entitlements are scoped.
|
|
20
|
-
*/
|
|
21
|
-
type: string;
|
|
22
|
-
/**
|
|
23
|
-
* The specific set of selectable options that apply to the specific
|
|
24
|
-
* type of transaction request, as modeled by your application
|
|
25
|
-
*/
|
|
26
|
-
options?: Record<string, string | boolean | number>;
|
|
27
|
-
/**
|
|
28
|
-
* The collection of file attachments - referred to as resource objects in the
|
|
29
|
-
* EPC API - to be attached to the transaction request.
|
|
30
|
-
* The id, name, and mimeType attribute needed for each resource object
|
|
31
|
-
* in the collection can be created in one of two ways:
|
|
32
|
-
* Your application utilized the transaction.createResource method to build a custom file upload experience, and the user invoked this functionality and uploaded a file from their local drive.
|
|
33
|
-
* Your application utilized the application.performAction("getAvailableResources") method to launch the host application's file explorer, and the user invoked this functionality and attached a file[s] from the host application.
|
|
34
|
-
* Once the resource objects are collected from these methods,
|
|
35
|
-
* be sure to echo them back to the EPC platform when creating a transaction!
|
|
36
|
-
*/
|
|
37
|
-
resources: Array<TransactionResource>;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* resource name to be uploaded
|
|
42
|
-
*/
|
|
43
|
-
export declare type TransactionResourceFile = {
|
|
44
|
-
/**
|
|
45
|
-
* name of the file
|
|
46
|
-
*/
|
|
47
|
-
name: string;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* response object of createResource method
|
|
51
|
-
*/
|
|
52
|
-
export declare type TransactionResourceResponse = {
|
|
53
|
-
/**
|
|
54
|
-
* resource id
|
|
55
|
-
*/
|
|
56
|
-
id: string;
|
|
57
|
-
/**
|
|
58
|
-
* urn of the target upload location
|
|
59
|
-
*/
|
|
60
|
-
respository: string;
|
|
61
|
-
/**
|
|
62
|
-
* name of the resource
|
|
63
|
-
*/
|
|
64
|
-
name: string;
|
|
65
|
-
/**
|
|
66
|
-
* url to stream the resource
|
|
67
|
-
*/
|
|
68
|
-
location: string;
|
|
69
|
-
/**
|
|
70
|
-
* authorization header to upload the resource
|
|
71
|
-
*/
|
|
72
|
-
authorizationHeader: string;
|
|
73
|
-
};
|
|
74
11
|
/**
|
|
75
12
|
* Provides your applications lender/borrower-facing view with the necessary handles to model your application's
|
|
76
13
|
* transactional interaction with the EPC platform.
|
|
@@ -87,7 +24,7 @@ export interface ITransaction {
|
|
|
87
24
|
*
|
|
88
25
|
* @returns transaction origination information
|
|
89
26
|
*/
|
|
90
|
-
getOrigin(): Promise<
|
|
27
|
+
getOrigin(): Promise<OriginDetails>;
|
|
91
28
|
/**
|
|
92
29
|
* Refresh your application's transaction origination context - if your current one expires.
|
|
93
30
|
* This method returns a new originId and partnerAccessToken - which your application back-end can use to retrieve a refreshed transaction origin:
|
|
@@ -96,7 +33,7 @@ export interface ITransaction {
|
|
|
96
33
|
*
|
|
97
34
|
* @returns transaction origination information
|
|
98
35
|
*/
|
|
99
|
-
refreshOrigin(): Promise<
|
|
36
|
+
refreshOrigin(): Promise<OriginDetails>;
|
|
100
37
|
/**
|
|
101
38
|
* Allow Lenders to use your integration to upload files from their
|
|
102
39
|
* local drive as an attachment to a new transaction.
|
|
@@ -106,14 +43,14 @@ export interface ITransaction {
|
|
|
106
43
|
* @param options details of the resource to be uploaded
|
|
107
44
|
* @returns location and authorization header to upload the resource
|
|
108
45
|
*/
|
|
109
|
-
createResource(options:
|
|
46
|
+
createResource(options: ResourceOptions): Promise<ResourceDetails>;
|
|
110
47
|
/**
|
|
111
48
|
* initiate a new transaction with your integration
|
|
112
49
|
*
|
|
113
50
|
* @param options details of the transaction to be initiated
|
|
114
51
|
* @returns transaction id
|
|
115
52
|
*/
|
|
116
|
-
create(options:
|
|
53
|
+
create(options: TransactionDetails): Promise<TransactionInfo>;
|
|
117
54
|
/**
|
|
118
55
|
* Set the transaction in whose context you want to invoke methods that operate on an existing transaction.
|
|
119
56
|
* The subject transaction must be one that was created for the current loan and EPC product.
|
|
@@ -190,7 +127,7 @@ export interface ITransaction {
|
|
|
190
127
|
* @param options transaction details
|
|
191
128
|
* @returns transaction id
|
|
192
129
|
*/
|
|
193
|
-
update(options:
|
|
130
|
+
update(options: TransactionDetails): Promise<TransactionInfo>;
|
|
194
131
|
/**
|
|
195
132
|
* Allow Lenders to initiate an event/message for the subject transaction with your integration
|
|
196
133
|
*
|
|
@@ -1,70 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OriginDetails, TransactionDetails, TransactionEvent, ResourceDetails, ResourceOptions } from './shared.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* reason for completing the user interaction with the transaction
|
|
4
4
|
*/
|
|
5
|
-
export declare
|
|
5
|
+
export declare enum CompleteReason {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* user completed interaction with the transaction
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* The type of transaction request being initiated for the subject product.
|
|
12
|
-
* This must be one of the supported values for the request type that your application
|
|
13
|
-
* is configured to support - based on which its data entitlements are scoped.
|
|
14
|
-
*/
|
|
15
|
-
type: string;
|
|
16
|
-
/**
|
|
17
|
-
* The specific set of selectable options that apply to the specific
|
|
18
|
-
* type of transaction request, as modeled by your application
|
|
19
|
-
*/
|
|
20
|
-
options?: Record<string, string | boolean | number>;
|
|
21
|
-
/**
|
|
22
|
-
* The collection of file attachments - referred to as resource objects in the
|
|
23
|
-
* EPC API - to be attached to the transaction request.
|
|
24
|
-
* The id, name, and mimeType attribute needed for each resource object
|
|
25
|
-
* in the collection can be created in one of two ways:
|
|
26
|
-
* Your application utilized the transaction.createResource method to build a custom file upload experience, and the user invoked this functionality and uploaded a file from their local drive.
|
|
27
|
-
* Your application utilized the application.performAction("getAvailableResources") method to launch the host application's file explorer, and the user invoked this functionality and attached a file[s] from the host application.
|
|
28
|
-
* Once the resource objects are collected from these methods,
|
|
29
|
-
* be sure to echo them back to the EPC platform when creating a transaction!
|
|
30
|
-
*/
|
|
31
|
-
resources: Array<TransactionResource>;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* name of the document to be uploaded
|
|
36
|
-
*/
|
|
37
|
-
export declare type ResourceOptions = {
|
|
38
|
-
/**
|
|
39
|
-
* name of the document
|
|
40
|
-
*/
|
|
41
|
-
name: string;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* details of the transaction resource
|
|
45
|
-
*/
|
|
46
|
-
export declare type ResourceDetails = {
|
|
47
|
-
/**
|
|
48
|
-
* resource id
|
|
49
|
-
*/
|
|
50
|
-
id: string;
|
|
51
|
-
/**
|
|
52
|
-
* urn of the target upload location
|
|
53
|
-
*/
|
|
54
|
-
respository: string;
|
|
55
|
-
/**
|
|
56
|
-
* name of the resource
|
|
57
|
-
*/
|
|
58
|
-
name: string;
|
|
9
|
+
CLOSE = "close",
|
|
59
10
|
/**
|
|
60
|
-
*
|
|
11
|
+
* user cancelled the interaction with transaction
|
|
61
12
|
*/
|
|
62
|
-
|
|
13
|
+
CANCEL = "cancel",
|
|
63
14
|
/**
|
|
64
|
-
*
|
|
15
|
+
* interaction with the transaction errored out
|
|
65
16
|
*/
|
|
66
|
-
|
|
67
|
-
}
|
|
17
|
+
ERROR = "error"
|
|
18
|
+
}
|
|
68
19
|
/**
|
|
69
20
|
* Provides your applications lender/borrower-facing view with the necessary handles to model your application's
|
|
70
21
|
* transactional interaction with the EPC platform.
|
|
@@ -88,7 +39,7 @@ export interface ITransactionV2 {
|
|
|
88
39
|
* @param id - unique identifier for the transaction
|
|
89
40
|
* @param options details of the event/message to be initiated
|
|
90
41
|
* @returns transaction event id
|
|
91
|
-
* @throws error when event creation fails
|
|
42
|
+
* @throws error when event creation fails, TransactionNotFound error for invalid transaction id
|
|
92
43
|
*/
|
|
93
44
|
createEvent(id: string, options: TransactionEvent): Promise<string>;
|
|
94
45
|
/**
|
|
@@ -97,7 +48,7 @@ export interface ITransactionV2 {
|
|
|
97
48
|
* @param id - unique identifier for the transaction
|
|
98
49
|
* @param options details of the document to be uploaded
|
|
99
50
|
* @returns details about the location where to upload the document
|
|
100
|
-
* @throws error when resource can not be created
|
|
51
|
+
* @throws error when resource can not be created, TransactionNotFound error for invalid transaction id
|
|
101
52
|
*/
|
|
102
53
|
createResource(id: string, options: ResourceOptions): Promise<ResourceDetails>;
|
|
103
54
|
/**
|
|
@@ -109,46 +60,32 @@ export interface ITransactionV2 {
|
|
|
109
60
|
*/
|
|
110
61
|
get(id: string): Promise<TransactionDetails>;
|
|
111
62
|
/**
|
|
112
|
-
* Get
|
|
63
|
+
* Get origination and context
|
|
113
64
|
*
|
|
114
|
-
* @
|
|
115
|
-
* @
|
|
116
|
-
* @throws TransactinNotFound error for invalid transaction id
|
|
65
|
+
* @returns service setup origination information
|
|
66
|
+
* @throws OriginNotFound error when origin is not found
|
|
117
67
|
*/
|
|
118
|
-
getOrigin(
|
|
68
|
+
getOrigin(): Promise<OriginDetails>;
|
|
119
69
|
/**
|
|
120
|
-
* refresh
|
|
70
|
+
* refresh origination context, if current one expires.
|
|
121
71
|
*
|
|
122
|
-
* @
|
|
123
|
-
* @returns transaction origination information
|
|
124
|
-
* @throws TransactionNotFound error for invalid transaction id
|
|
72
|
+
* @returns origination information
|
|
125
73
|
*/
|
|
126
|
-
refreshOrigin(
|
|
74
|
+
refreshOrigin(): Promise<OriginDetails>;
|
|
127
75
|
/**
|
|
128
76
|
* update existing transaction.
|
|
129
77
|
*
|
|
130
78
|
* @param id - unique identifier for the transaction
|
|
131
79
|
* @param options transaction details to be updated
|
|
132
|
-
* @
|
|
133
|
-
* @throws error when transaction update fails
|
|
80
|
+
* @throws error when transaction update fails, TransactionNotFound error for invalid transaction id
|
|
134
81
|
*/
|
|
135
82
|
update(id: string, options: TransactionDetails): Promise<void>;
|
|
136
83
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
* cancel the
|
|
143
|
-
* This signals a cancelation outcome to the host application -
|
|
144
|
-
* how this is handled by the host upon user navigation can vary across applications
|
|
145
|
-
*/
|
|
146
|
-
cancel(): Promise<void>;
|
|
147
|
-
/**
|
|
148
|
-
* Navigate your users back to where they left off in the host Encompass application,
|
|
149
|
-
* after their has been an error (application error or workflow error) on your integrations user-interface.
|
|
150
|
-
* This signals an error outcome to the host Encompass application -
|
|
151
|
-
* how this is handled by the host upon user navigation can vary across applications
|
|
84
|
+
* notify host on completion of user interaction with the transaction
|
|
85
|
+
* so that host can perform any necessary post user interaction processing / cleanup.
|
|
86
|
+
*
|
|
87
|
+
* @param id - unique identifier for the transaction
|
|
88
|
+
* @param reason reason for completing the transaction user interaction
|
|
152
89
|
*/
|
|
153
|
-
|
|
90
|
+
completeUserInteraction(id: string, reason: CompleteReason): Promise<void>;
|
|
154
91
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-scripting-object",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Typescript defintions for Scripting Objects",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
7
7
|
"module": "./dist/es/index.js",
|
|
8
|
-
"
|
|
8
|
+
"unpkg": "./dist/umd/index.js",
|
|
9
|
+
"jsdelivr": "./dist/imd/index.js",
|
|
10
|
+
"types": "./dist/types/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/types/index.d.ts",
|
|
14
|
+
"import": "./dist/es/index.js",
|
|
15
|
+
"require": "./dist/cjs/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
9
18
|
"files": [
|
|
10
19
|
"dist",
|
|
11
20
|
"build"
|
|
@@ -18,7 +27,7 @@
|
|
|
18
27
|
"url": "https://git.elliemae.io/platform-ui/pui-scripting-object.git"
|
|
19
28
|
},
|
|
20
29
|
"engines": {
|
|
21
|
-
"pnpm": ">=
|
|
30
|
+
"pnpm": ">=7",
|
|
22
31
|
"node": ">=16"
|
|
23
32
|
},
|
|
24
33
|
"author": "ICE",
|
|
@@ -58,7 +67,7 @@
|
|
|
58
67
|
},
|
|
59
68
|
"devDependencies": {
|
|
60
69
|
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.5.0",
|
|
61
|
-
"@elliemae/pui-cli": "~7.
|
|
70
|
+
"@elliemae/pui-cli": "~7.14.1",
|
|
62
71
|
"@elliemae/pui-doc-gen": "~1.3.0",
|
|
63
72
|
"@elliemae/pui-theme": "~2.6.0",
|
|
64
73
|
"@types/styled-components": "~5.1.26",
|