@elliemae/pui-scripting-object 1.10.1 → 1.11.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/index.js +2 -0
- package/dist/cjs/objects/shared.js +28 -0
- package/dist/cjs/objects/transaction.js +0 -12
- package/dist/cjs/objects/transactionv2.js +16 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/objects/shared.js +8 -0
- package/dist/esm/objects/transaction.js +0 -8
- package/dist/esm/objects/transactionv2.js +0 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/objects/shared.d.ts +75 -0
- package/dist/types/objects/transaction.d.ts +1 -75
- package/dist/types/objects/transactionv2.d.ts +140 -0
- package/dist/types/scriptingObjectTypes.d.ts +2 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -30,6 +30,8 @@ __reExport(lib_exports, require("./objects/route.js"), module.exports);
|
|
|
30
30
|
__reExport(lib_exports, require("./objects/service.js"), module.exports);
|
|
31
31
|
__reExport(lib_exports, require("./objects/session.js"), module.exports);
|
|
32
32
|
__reExport(lib_exports, require("./objects/transaction.js"), module.exports);
|
|
33
|
+
__reExport(lib_exports, require("./objects/transactionv2.js"), module.exports);
|
|
33
34
|
__reExport(lib_exports, require("./objects/transactionTemplate.js"), module.exports);
|
|
34
35
|
__reExport(lib_exports, require("./objects/userAccessRights.js"), module.exports);
|
|
35
36
|
__reExport(lib_exports, require("./objects/view.js"), module.exports);
|
|
37
|
+
__reExport(lib_exports, require("./objects/shared.js"), module.exports);
|
|
@@ -0,0 +1,28 @@
|
|
|
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 shared_exports = {};
|
|
20
|
+
__export(shared_exports, {
|
|
21
|
+
OriginContext: () => OriginContext
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(shared_exports);
|
|
24
|
+
var OriginContext = /* @__PURE__ */ ((OriginContext2) => {
|
|
25
|
+
OriginContext2["LENDER"] = "lender";
|
|
26
|
+
OriginContext2["CONSUMER"] = "consumer";
|
|
27
|
+
return OriginContext2;
|
|
28
|
+
})(OriginContext || {});
|
|
@@ -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,12 +13,4 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
13
|
};
|
|
18
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
15
|
var transaction_exports = {};
|
|
20
|
-
__export(transaction_exports, {
|
|
21
|
-
OriginContext: () => OriginContext
|
|
22
|
-
});
|
|
23
16
|
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 transactionv2_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(transactionv2_exports);
|
package/dist/esm/index.js
CHANGED
|
@@ -13,6 +13,8 @@ export * from "./objects/route.js";
|
|
|
13
13
|
export * from "./objects/service.js";
|
|
14
14
|
export * from "./objects/session.js";
|
|
15
15
|
export * from "./objects/transaction.js";
|
|
16
|
+
export * from "./objects/transactionv2.js";
|
|
16
17
|
export * from "./objects/transactionTemplate.js";
|
|
17
18
|
export * from "./objects/userAccessRights.js";
|
|
18
19
|
export * from "./objects/view.js";
|
|
20
|
+
export * from "./objects/shared.js";
|
|
File without changes
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,8 +13,10 @@ export * from './objects/route.js';
|
|
|
13
13
|
export * from './objects/service.js';
|
|
14
14
|
export * from './objects/session.js';
|
|
15
15
|
export * from './objects/transaction.js';
|
|
16
|
+
export * from './objects/transactionv2.js';
|
|
16
17
|
export * from './objects/transactionTemplate.js';
|
|
17
18
|
export * from './objects/userAccessRights.js';
|
|
18
19
|
export * from './objects/view.js';
|
|
20
|
+
export * from './objects/shared.js';
|
|
19
21
|
export type { ScriptingObjectEvents } from './events.js';
|
|
20
22
|
export type { ScriptingObjectTypes } from './scriptingObjectTypes.js';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* user type context
|
|
3
|
+
*/
|
|
4
|
+
export declare enum OriginContext {
|
|
5
|
+
/**
|
|
6
|
+
* user interface is being presented to a user in a lending enterprise
|
|
7
|
+
*/
|
|
8
|
+
LENDER = "lender",
|
|
9
|
+
/**
|
|
10
|
+
* user interface is being presented to a consumer/borrower
|
|
11
|
+
*/
|
|
12
|
+
CONSUMER = "consumer"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* transaction origination context
|
|
16
|
+
*/
|
|
17
|
+
export declare type OriginInfo = {
|
|
18
|
+
/**
|
|
19
|
+
* Temporary session token that grants authorization for a partner
|
|
20
|
+
* integration to access transaction origination information via the REST API's /partner/v2/origins/:id endpoint
|
|
21
|
+
*/
|
|
22
|
+
partnerAccessToken: string;
|
|
23
|
+
/**
|
|
24
|
+
* Unique identifier for the transaction origination information snapshot accessible
|
|
25
|
+
* via the REST API's /partner/v2/origins/:id endpoint
|
|
26
|
+
*/
|
|
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
|
+
/**
|
|
37
|
+
* The user type in whose context your integration is being launched
|
|
38
|
+
*/
|
|
39
|
+
context: OriginContext;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* file attachment information
|
|
43
|
+
*/
|
|
44
|
+
export declare type TransactionResource = {
|
|
45
|
+
/**
|
|
46
|
+
* unique identifier for the file attachment
|
|
47
|
+
*/
|
|
48
|
+
id: string;
|
|
49
|
+
/**
|
|
50
|
+
* name of the file attachment
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
53
|
+
/**
|
|
54
|
+
* mime type of the file attachment
|
|
55
|
+
*/
|
|
56
|
+
mimeType: string;
|
|
57
|
+
};
|
|
58
|
+
export declare type TransactionEvent = {
|
|
59
|
+
/**
|
|
60
|
+
* event name
|
|
61
|
+
*/
|
|
62
|
+
text: string;
|
|
63
|
+
/**
|
|
64
|
+
* urn representing the event type
|
|
65
|
+
*/
|
|
66
|
+
type: string;
|
|
67
|
+
/**
|
|
68
|
+
* comments related to event
|
|
69
|
+
*/
|
|
70
|
+
comments: string;
|
|
71
|
+
/**
|
|
72
|
+
* list of file attachments related to event
|
|
73
|
+
*/
|
|
74
|
+
resources: Array<TransactionResource>;
|
|
75
|
+
};
|
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* user type context
|
|
3
|
-
*/
|
|
4
|
-
export declare enum OriginContext {
|
|
5
|
-
/**
|
|
6
|
-
* user interface is being presented to a user in a lending enterprise
|
|
7
|
-
*/
|
|
8
|
-
LENDER = "lender",
|
|
9
|
-
/**
|
|
10
|
-
* user interface is being presented to a consumer/borrower
|
|
11
|
-
*/
|
|
12
|
-
CONSUMER = "consumer"
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* transaction origination context
|
|
16
|
-
*/
|
|
17
|
-
export declare type OriginInfo = {
|
|
18
|
-
/**
|
|
19
|
-
* Temporary session token that grants authorization for a partner
|
|
20
|
-
* integration to access transaction origination information via the REST API's /partner/v2/origins/:id endpoint
|
|
21
|
-
*/
|
|
22
|
-
partnerAccessToken: string;
|
|
23
|
-
/**
|
|
24
|
-
* Unique identifier for the transaction origination information snapshot accessible
|
|
25
|
-
* via the REST API's /partner/v2/origins/:id endpoint
|
|
26
|
-
*/
|
|
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
|
-
/**
|
|
37
|
-
* The user type in whose context your integration is being launched
|
|
38
|
-
*/
|
|
39
|
-
context: OriginContext;
|
|
40
|
-
};
|
|
1
|
+
import { OriginInfo, TransactionResource, TransactionEvent } from './shared.js';
|
|
41
2
|
/**
|
|
42
3
|
* details about the transaction that is created / updated
|
|
43
4
|
*/
|
|
@@ -47,23 +8,6 @@ export declare type TransactionInfo = {
|
|
|
47
8
|
*/
|
|
48
9
|
id: string | null;
|
|
49
10
|
};
|
|
50
|
-
/**
|
|
51
|
-
* file attachment information
|
|
52
|
-
*/
|
|
53
|
-
export declare type TransactionResource = {
|
|
54
|
-
/**
|
|
55
|
-
* unique identifier for the file attachment
|
|
56
|
-
*/
|
|
57
|
-
id: string;
|
|
58
|
-
/**
|
|
59
|
-
* name of the file attachment
|
|
60
|
-
*/
|
|
61
|
-
name: string;
|
|
62
|
-
/**
|
|
63
|
-
* mime type of the file attachment
|
|
64
|
-
*/
|
|
65
|
-
mimeType: string;
|
|
66
|
-
};
|
|
67
11
|
/**
|
|
68
12
|
* information about the transaction to be initiated
|
|
69
13
|
*/
|
|
@@ -127,24 +71,6 @@ export declare type TransactionResourceResponse = {
|
|
|
127
71
|
*/
|
|
128
72
|
authorizationHeader: string;
|
|
129
73
|
};
|
|
130
|
-
export declare type TransactionEvent = {
|
|
131
|
-
/**
|
|
132
|
-
* event name
|
|
133
|
-
*/
|
|
134
|
-
text: string;
|
|
135
|
-
/**
|
|
136
|
-
* urn representing the event type
|
|
137
|
-
*/
|
|
138
|
-
type: string;
|
|
139
|
-
/**
|
|
140
|
-
* comments related to event
|
|
141
|
-
*/
|
|
142
|
-
comments: string;
|
|
143
|
-
/**
|
|
144
|
-
* list of file attachments related to event
|
|
145
|
-
*/
|
|
146
|
-
resources: Array<TransactionResource>;
|
|
147
|
-
};
|
|
148
74
|
/**
|
|
149
75
|
* Provides your applications lender/borrower-facing view with the necessary handles to model your application's
|
|
150
76
|
* transactional interaction with the EPC platform.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { OriginInfo, TransactionResource, TransactionEvent } from './shared.js';
|
|
2
|
+
/**
|
|
3
|
+
* details about the transaction
|
|
4
|
+
*/
|
|
5
|
+
export declare type TransactionDetails = {
|
|
6
|
+
/**
|
|
7
|
+
* details about the transaction that is created / updated
|
|
8
|
+
*/
|
|
9
|
+
request: {
|
|
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
|
+
* response object of createResource method
|
|
45
|
+
*/
|
|
46
|
+
export declare type CreateResourceResponse = {
|
|
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;
|
|
59
|
+
/**
|
|
60
|
+
* url to stream the resource
|
|
61
|
+
*/
|
|
62
|
+
location: string;
|
|
63
|
+
/**
|
|
64
|
+
* authorization header to upload the resource
|
|
65
|
+
*/
|
|
66
|
+
authorizationHeader: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Provides your applications lender/borrower-facing view with the necessary handles to model your application's
|
|
70
|
+
* transactional interaction with the EPC platform.
|
|
71
|
+
* Allows access to an interactive session's origination context,
|
|
72
|
+
* create a new transaction,
|
|
73
|
+
* update an existing transaction,
|
|
74
|
+
* create events/messages for a transaction, and more.
|
|
75
|
+
*/
|
|
76
|
+
export interface ITransactionV2 {
|
|
77
|
+
/**
|
|
78
|
+
* Get transaction's origination and context
|
|
79
|
+
*
|
|
80
|
+
* @param id - unique identifier for the transaction
|
|
81
|
+
* @returns transaction origination information and null if the transaction is not found
|
|
82
|
+
*/
|
|
83
|
+
getOrigin(id: string): Promise<OriginInfo | null>;
|
|
84
|
+
/**
|
|
85
|
+
* Refresh transaction origination context, if current one expires.
|
|
86
|
+
*
|
|
87
|
+
* @param id - unique identifier for the transaction
|
|
88
|
+
* @returns transaction origination information or null if the transaction is not found
|
|
89
|
+
*/
|
|
90
|
+
refreshOrigin(id: string): Promise<OriginInfo | null>;
|
|
91
|
+
/**
|
|
92
|
+
* get necessary details to upload document for specific transaction
|
|
93
|
+
*
|
|
94
|
+
* @param id - unique identifier for the transaction
|
|
95
|
+
* @param options details of the document to be uploaded
|
|
96
|
+
* @returns details about the location where to upload the document
|
|
97
|
+
*/
|
|
98
|
+
createResource(id: string, options: ResourceOptions): Promise<CreateResourceResponse | null>;
|
|
99
|
+
/**
|
|
100
|
+
* create new transaction
|
|
101
|
+
*
|
|
102
|
+
* @param options details of the transaction to be created
|
|
103
|
+
* @returns transaction id
|
|
104
|
+
*/
|
|
105
|
+
create(options: TransactionDetails): Promise<string>;
|
|
106
|
+
/**
|
|
107
|
+
* update existing transaction.
|
|
108
|
+
*
|
|
109
|
+
* @param id - unique identifier for the transaction
|
|
110
|
+
* @param options transaction details to be updated
|
|
111
|
+
* @returns transaction id and null if the transaction is not found
|
|
112
|
+
*/
|
|
113
|
+
update(id: string, options: TransactionDetails): Promise<void | null>;
|
|
114
|
+
/**
|
|
115
|
+
* send event for the subject transaction
|
|
116
|
+
*
|
|
117
|
+
* @param id - unique identifier for the transaction
|
|
118
|
+
* @param options details of the event/message to be initiated
|
|
119
|
+
* @returns transaction event id
|
|
120
|
+
*/
|
|
121
|
+
createEvent(id: string, options: TransactionEvent): Promise<string>;
|
|
122
|
+
/**
|
|
123
|
+
* Navigate your users back to where they left off in the host Encompass application,
|
|
124
|
+
* after they are done interacting with your application's user-interface
|
|
125
|
+
*/
|
|
126
|
+
close(): Promise<void>;
|
|
127
|
+
/**
|
|
128
|
+
* cancel the
|
|
129
|
+
* This signals a cancelation outcome to the host application -
|
|
130
|
+
* how this is handled by the host upon user navigation can vary across applications
|
|
131
|
+
*/
|
|
132
|
+
cancel(): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Navigate your users back to where they left off in the host Encompass application,
|
|
135
|
+
* after their has been an error (application error or workflow error) on your integrations user-interface.
|
|
136
|
+
* This signals an error outcome to the host Encompass application -
|
|
137
|
+
* how this is handled by the host upon user navigation can vary across applications
|
|
138
|
+
*/
|
|
139
|
+
error(): Promise<void>;
|
|
140
|
+
}
|
|
@@ -4,6 +4,7 @@ import { IApplication } from './objects/application.js';
|
|
|
4
4
|
import { IAuth } from './objects/auth.js';
|
|
5
5
|
import { ISession } from './objects/session.js';
|
|
6
6
|
import { ITransaction } from './objects/transaction.js';
|
|
7
|
+
import { ITransactionV2 } from './objects/transactionv2.js';
|
|
7
8
|
import { ITransactionTemplate } from './objects/transactionTemplate.js';
|
|
8
9
|
import { IForm } from './objects/form.js';
|
|
9
10
|
import { IGlobal } from './objects/global.js';
|
|
@@ -29,6 +30,7 @@ export declare type ScriptingObjectTypes = {
|
|
|
29
30
|
Service: IService;
|
|
30
31
|
Session: ISession;
|
|
31
32
|
Transaction: ITransaction;
|
|
33
|
+
TransactionV2: ITransactionV2;
|
|
32
34
|
TransactionTemplate: ITransactionTemplate;
|
|
33
35
|
View: IView;
|
|
34
36
|
};
|