@elliemae/pui-scripting-object 1.48.1 → 1.48.2
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 +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/types/lib/index.d.ts +0 -1
- package/dist/types/lib/objects/loan.d.ts +13 -3
- package/dist/types/lib/scriptingObjectList.d.ts +0 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/cjs/objects/loanv2.js +0 -38
- package/dist/esm/objects/loanv2.js +0 -18
- package/dist/types/lib/objects/loanv2.d.ts +0 -140
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-scripting-object",
|
|
3
|
-
"version": "1.48.
|
|
3
|
+
"version": "1.48.2",
|
|
4
4
|
"description": "Typescript defintions for Scripting Objects",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"indent": 4
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.
|
|
69
|
-
"@elliemae/pui-cli": "~8.
|
|
70
|
-
"@elliemae/pui-doc-gen": "~3.
|
|
68
|
+
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.11.0",
|
|
69
|
+
"@elliemae/pui-cli": "~8.42.2",
|
|
70
|
+
"@elliemae/pui-doc-gen": "~3.2.0",
|
|
71
71
|
"@elliemae/pui-theme": "~2.10.0",
|
|
72
72
|
"@types/styled-components": "~5.1.34",
|
|
73
73
|
"history": "~5.3.0",
|
|
@@ -1,38 +0,0 @@
|
|
|
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 || {});
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { ILoan, LoanObject } from './loan.js';
|
|
2
|
-
/**
|
|
3
|
-
* Types of field errors
|
|
4
|
-
*/
|
|
5
|
-
export declare enum FieldErrorType {
|
|
6
|
-
/**
|
|
7
|
-
* access related violations
|
|
8
|
-
*/
|
|
9
|
-
ACCESS = "access",
|
|
10
|
-
/**
|
|
11
|
-
* Violation of a field data entry rule.
|
|
12
|
-
* Thrown only when value gets applied to the loan and will remain until user fixes the value
|
|
13
|
-
*/
|
|
14
|
-
VALUE = "value",
|
|
15
|
-
/**
|
|
16
|
-
* Error during de\serialization of the field value
|
|
17
|
-
*/
|
|
18
|
-
SERIALIZATION = "serialization",
|
|
19
|
-
/**
|
|
20
|
-
* Error due to invalid data like valid RuleActionType is not implemented
|
|
21
|
-
*/
|
|
22
|
-
DATA = "data",
|
|
23
|
-
/**
|
|
24
|
-
* Error due to invalid user data based on current state of the loan
|
|
25
|
-
* This does not get applied to the loan
|
|
26
|
-
*/
|
|
27
|
-
CONFLICT = "conflict"
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Field error object
|
|
31
|
-
*/
|
|
32
|
-
export type FieldErrors = {
|
|
33
|
-
/**
|
|
34
|
-
* field id
|
|
35
|
-
*/
|
|
36
|
-
id: string;
|
|
37
|
-
/**
|
|
38
|
-
* field error type
|
|
39
|
-
*/
|
|
40
|
-
type: FieldErrorType;
|
|
41
|
-
/**
|
|
42
|
-
* error description
|
|
43
|
-
*/
|
|
44
|
-
description: string;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Return type of setField method
|
|
48
|
-
*/
|
|
49
|
-
export type SetFieldResponse = {
|
|
50
|
-
/**
|
|
51
|
-
* List of fields not meeting data, access or required rule criteria
|
|
52
|
-
*/
|
|
53
|
-
errors: FieldErrors[];
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Types of commit errors
|
|
57
|
-
*/
|
|
58
|
-
export declare enum CommitErrorStatus {
|
|
59
|
-
/**
|
|
60
|
-
* Commit failed due to fields
|
|
61
|
-
*/
|
|
62
|
-
FIELDERROR = "field_error",
|
|
63
|
-
/**
|
|
64
|
-
* Commit failed due to invalid lock or read only loan status
|
|
65
|
-
*/
|
|
66
|
-
LOCK_INVALID_OR_REMOVED = "lock_invalid_or_removed",
|
|
67
|
-
/**
|
|
68
|
-
* Commit failed due to invalid workspace state
|
|
69
|
-
*/
|
|
70
|
-
WORKSPACE_READ_ONLY = "workspace_read_only"
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Error representing a commit failure
|
|
74
|
-
*/
|
|
75
|
-
export type CommitError = Error & {
|
|
76
|
-
status: CommitErrorStatus;
|
|
77
|
-
/**
|
|
78
|
-
* List of violated rules that failed the commit
|
|
79
|
-
*/
|
|
80
|
-
ruleViolations: {
|
|
81
|
-
/**
|
|
82
|
-
* fields not meeting various field rules
|
|
83
|
-
*/
|
|
84
|
-
fieldErrors: FieldErrors[];
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* Map of field ids to their loan contract path
|
|
89
|
-
*/
|
|
90
|
-
export type FieldIDToContractPath = {
|
|
91
|
-
fieldId: string;
|
|
92
|
-
contractPath: string;
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* All operations on a loan are stateful. This means loan changes are not committed until the loan.commit is called
|
|
96
|
-
*
|
|
97
|
-
* See {@link LoanEvents} for supported events
|
|
98
|
-
*/
|
|
99
|
-
export interface ILoanV2 extends Omit<ILoan, 'commit' | 'setFields' | 'merge'> {
|
|
100
|
-
/**
|
|
101
|
-
* Commit all pending changes on the current loan
|
|
102
|
-
*
|
|
103
|
-
* {@link LoanEvents}
|
|
104
|
-
* loan.precommit event is fired before the commit is executed. If any of the event listeners return false, the commit will be aborted. Exception thrown by event listeners will be ignored. Event listeners have 60 seconds to complete their execution. After 60 seconds, the commit will proceed, if none of the listeners returned false.
|
|
105
|
-
*
|
|
106
|
-
* {@link LoanEvents}
|
|
107
|
-
* loan.committed event is fired after the commit is successful.
|
|
108
|
-
* @throws RuleValidationError
|
|
109
|
-
* if operation fails due to business / functional rules
|
|
110
|
-
* @throws Error
|
|
111
|
-
* if operation fails due to network errors
|
|
112
|
-
*/
|
|
113
|
-
commit(): Promise<void>;
|
|
114
|
-
/**
|
|
115
|
-
* Get the contract path for the given field ids
|
|
116
|
-
* @param fieldIds list of field ids for which loan contract path is required
|
|
117
|
-
* @returns list of field ids and their loan contract paths
|
|
118
|
-
* @throws Error
|
|
119
|
-
* if operation fails due to network errors
|
|
120
|
-
*/
|
|
121
|
-
getContractPath(fieldIds: string[]): Promise<FieldIDToContractPath[]>;
|
|
122
|
-
/**
|
|
123
|
-
* Syncs the loan workspace with any changes made by other users
|
|
124
|
-
*
|
|
125
|
-
* {@link LoanEvents}
|
|
126
|
-
* loan.sync event is fired after the sync is successful.
|
|
127
|
-
* @returns {Promise<LoanObject>} loan object
|
|
128
|
-
* @throws Error
|
|
129
|
-
* if operation fails due to network error
|
|
130
|
-
*/
|
|
131
|
-
merge(): Promise<LoanObject>;
|
|
132
|
-
/**
|
|
133
|
-
* Set the values of one or more fields on the Loan.
|
|
134
|
-
* @param fields list of field ids and their values
|
|
135
|
-
* @returns list of field ids that failed to set
|
|
136
|
-
* @throws Error
|
|
137
|
-
* if operation fails due to network error
|
|
138
|
-
*/
|
|
139
|
-
setFields(fields: Record<string, string>): Promise<SetFieldResponse>;
|
|
140
|
-
}
|