@elliemae/pui-scripting-object 1.4.0 → 1.6.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 CHANGED
@@ -26,3 +26,4 @@ __reExport(lib_exports, require("./script.js"), module.exports);
26
26
  __reExport(lib_exports, require("./session.js"), module.exports);
27
27
  __reExport(lib_exports, require("./transaction.js"), module.exports);
28
28
  __reExport(lib_exports, require("./transactiontemplate.js"), module.exports);
29
+ __reExport(lib_exports, require("./userAccessRights.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 userAccessRights_exports = {};
16
+ module.exports = __toCommonJS(userAccessRights_exports);
package/dist/esm/index.js CHANGED
@@ -9,3 +9,4 @@ export * from "./script.js";
9
9
  export * from "./session.js";
10
10
  export * from "./transaction.js";
11
11
  export * from "./transactiontemplate.js";
12
+ export * from "./userAccessRights.js";
File without changes
@@ -1,3 +1,4 @@
1
+ import { UserAccessRights } from './userAccessRights';
1
2
  export declare type Personas = {
2
3
  entityId: string;
3
4
  entityType: string;
@@ -32,4 +33,11 @@ export interface IAuth {
32
33
  createAuthCode(clientId: string): Promise<string>;
33
34
  getAccessToken(appInfo: PluginInfo): Promise<TokenInfo>;
34
35
  getUser(): Promise<User>;
36
+ /**
37
+ * Get access rights for the current user
38
+ *
39
+ * @returns user access rights
40
+ * @throws {Error} if operation fails
41
+ */
42
+ getUserAccessRights(): Promise<UserAccessRights>;
35
43
  }
@@ -9,3 +9,4 @@ export * from './script.js';
9
9
  export * from './session.js';
10
10
  export * from './transaction.js';
11
11
  export * from './transactiontemplate.js';
12
+ export * from './userAccessRights.js';
@@ -11,12 +11,15 @@ export declare type FieldOptions = {
11
11
  */
12
12
  value: string;
13
13
  };
14
+ export declare type SetFieldResponse = {
15
+ failed: string[];
16
+ };
14
17
  /**
15
18
  * The Loan object provides methods for interacting with an open loan in the application's editor screen(s).
16
19
  */
17
20
  export interface ILoan {
18
21
  /**
19
- * Gets entire Loan object
22
+ * Get entire Loan object
20
23
  *
21
24
  * @returns v3 Loan Object
22
25
  *
@@ -27,7 +30,18 @@ export interface ILoan {
27
30
  */
28
31
  all(): Promise<Record<string, any>>;
29
32
  apply(loan: Record<string, string>): Promise<void>;
30
- commit(): Promise<void>;
33
+ /**
34
+ * Commit all pending changes for the current loan
35
+ *
36
+ * @returns v3 Loan Object
37
+ * @throws {Error} if the loan is not in a valid state or if there are business rule violations
38
+ *
39
+ * #### Product Compatibility:
40
+ * | | Encompass | Encompass Web | TPO | Consumer Connect |
41
+ * :-----:|:-----: |:-----: |:-----: |:-----: |
42
+ * | all | ✔ | ✔ | ✔ | ✖️ |
43
+ */
44
+ commit(): Promise<Record<string, any>>;
31
45
  getField(id: string): Promise<string>;
32
46
  /**
33
47
  * get options for list of fields
@@ -70,7 +84,14 @@ export interface ILoan {
70
84
  */
71
85
  getFieldOptions(fieldIds: string[]): Promise<Record<string, FieldOptions[]>>;
72
86
  getFields(ids: string[]): Promise<Record<string, string>>;
73
- setFields(fields: Record<string, string>): Promise<void>;
87
+ /**
88
+ * Set the values of one or more fields on the Loan.
89
+ *
90
+ * @param fields list of field ids and their values
91
+ * @returns list of field ids that failed to set
92
+ * @throws {Error} if operation fails due to network error
93
+ */
94
+ setFields(fields: Record<string, string>): Promise<SetFieldResponse>;
74
95
  merge(): Promise<void>;
75
96
  isReadOnly(): Promise<boolean>;
76
97
  applyLock(fieldId: string, lock: boolean): Promise<void>;
@@ -0,0 +1,361 @@
1
+ export declare type UserAccessRights = {
2
+ access: string[];
3
+ additionalServices: AdditionalServices;
4
+ ausTracking: AusTracking;
5
+ borrowerContacts: BorrowerContacts;
6
+ businessContacts: BusinessContacts;
7
+ businessRules: BusinessRules;
8
+ closingDocs: string[];
9
+ companyUserSetup: CompanyUserSetup;
10
+ contacts: Contacts;
11
+ contactSetup: ContactSetup;
12
+ consumerConnect: string[];
13
+ dashboard: Dashboard;
14
+ disclosureTracking: DisclosureTracking;
15
+ docsSetup: DocsSetup;
16
+ documents: Documents;
17
+ dynamicDataManagement: DynamicDataManagement;
18
+ eDisclosures: EDisclosures;
19
+ eFolderHistory: EFolderHistory;
20
+ eFolderSetup: EFolderSetup;
21
+ externalSettings: string[];
22
+ eVault: EVault;
23
+ fileContacts: FileContacts;
24
+ forms: Form[];
25
+ gseServices: GseServices;
26
+ home: string[];
27
+ importLoans: ImportLoan[];
28
+ services: Service[];
29
+ itemizationFee: string[];
30
+ loan: string[];
31
+ loanSetup: LoanSetup;
32
+ manageServiceProviders: ManageServiceProviders;
33
+ milestoneWorkflowManagement: MilestoneWorkflowManagement;
34
+ moveLoans: MoveLoans;
35
+ personalSettings: string[];
36
+ personalTemplates: PersonalTemplates;
37
+ pipeline: Pipeline;
38
+ exportServices: ExportServices;
39
+ postClosingConditions: PostClosingConditions;
40
+ preliminaryConditions: PreliminaryConditions;
41
+ purchaseConditions: PurchaseConditions;
42
+ reports: string[];
43
+ print: Print;
44
+ secondarySetup: SecondarySetup;
45
+ deliveryConditions: DeliveryConditions;
46
+ settings: string[];
47
+ smartClient: string[];
48
+ systemAdministration: SystemAdministration;
49
+ tablesAndFees: TablesAndFees;
50
+ tools: Tool[];
51
+ tpoCompanyDetails: TpoCompanyDetails;
52
+ tpoConnectSiteSettings: TpoConnectSiteSettings;
53
+ tpoContacts: TpoContacts;
54
+ tpoFees: TpoFees;
55
+ tpoInformation: TpoInformation;
56
+ tpoOrganizationSettings: TpoOrganizationSettings;
57
+ tqlServices: TqlServices;
58
+ trades: Trades;
59
+ underwritingConditions: UnderwritingConditions;
60
+ enhancedConditions: EnhancedConditions;
61
+ loConnectTasks: LoConnectTasks;
62
+ encompassWebServices: EncompassWebServices;
63
+ underwritingCenter: UnderwritingCenter;
64
+ };
65
+ export declare type AdditionalServices = {
66
+ access: boolean;
67
+ rights: string[];
68
+ };
69
+ export declare type AusTracking = {
70
+ access: boolean;
71
+ rights: string[];
72
+ };
73
+ export declare type BorrowerContacts = {
74
+ access: boolean;
75
+ rights: string[];
76
+ };
77
+ export declare type BusinessContacts = {
78
+ access: boolean;
79
+ rights: string[];
80
+ };
81
+ export declare type BusinessRules = {
82
+ access: boolean;
83
+ rights: string[];
84
+ };
85
+ export declare type CompanyUserSetup = {
86
+ access: boolean;
87
+ rights: string[];
88
+ };
89
+ export declare type Contacts = {
90
+ access: boolean;
91
+ rights: string[];
92
+ };
93
+ export declare type ContactSetup = {
94
+ access: boolean;
95
+ rights: string[];
96
+ };
97
+ export declare type Dashboard = {
98
+ access: boolean;
99
+ rights: string[];
100
+ };
101
+ export declare type DisclosureTracking = {
102
+ access: boolean;
103
+ rights: string[];
104
+ };
105
+ export declare type DocsSetup = {
106
+ access: boolean;
107
+ rights: string[];
108
+ };
109
+ export declare type Documents = {
110
+ access: boolean;
111
+ rights: string[];
112
+ protectedDocuments: string[];
113
+ unprotectedDocuments: string[];
114
+ unassignedFiles: string[];
115
+ };
116
+ export declare type DynamicDataManagement = {
117
+ access: boolean;
118
+ rights: string[];
119
+ };
120
+ export declare type EDisclosures = {
121
+ access: boolean;
122
+ rights: string[];
123
+ };
124
+ export declare type EFolderHistory = {
125
+ access: boolean;
126
+ };
127
+ export declare type EFolderSetup = {
128
+ access: boolean;
129
+ rights: string[];
130
+ };
131
+ export declare type EVault = {
132
+ eVaultPortal: EVaultPortal;
133
+ };
134
+ export declare type EVaultPortal = {
135
+ access: boolean;
136
+ rights: string[];
137
+ };
138
+ export declare type FileContacts = {
139
+ access: boolean;
140
+ rights: string[];
141
+ grantWriteAccess: GrantWriteAccess;
142
+ };
143
+ export declare type GrantWriteAccess = {
144
+ access: boolean;
145
+ loanTeam: LoanTeam[];
146
+ };
147
+ export declare type LoanTeam = {
148
+ role: Role;
149
+ };
150
+ export declare type Role = {
151
+ entityId: string;
152
+ entityName: string;
153
+ entityType: string;
154
+ };
155
+ export declare type Form = {
156
+ entityId: string;
157
+ entityName: string;
158
+ entityType: string;
159
+ };
160
+ export declare type GseServices = {
161
+ access: boolean;
162
+ rights: string[];
163
+ };
164
+ export declare type ImportLoan = {
165
+ entityId: string;
166
+ entityType: string;
167
+ };
168
+ export declare type Service = {
169
+ category: string;
170
+ accessSetting: string;
171
+ defaultAccess: string;
172
+ };
173
+ export declare type LoanSetup = {
174
+ access: boolean;
175
+ rights: string[];
176
+ };
177
+ export declare type ManageServiceProviders = {
178
+ accessSetting: string;
179
+ rights: string[];
180
+ };
181
+ export declare type MilestoneWorkflowManagement = {
182
+ acceptFiles: AcceptFile[];
183
+ returnFiles: ReturnFile[];
184
+ changeExpectedDate: ChangeExpectedDate[];
185
+ finishMilestones: FinishMilestone[];
186
+ assignLoanTeamMembers: AssignLoanTeamMember[];
187
+ editComments: EditComment[];
188
+ };
189
+ export declare type AcceptFile = {
190
+ entityId: string;
191
+ entityName: string;
192
+ entityType: string;
193
+ };
194
+ export declare type ReturnFile = {
195
+ entityId: string;
196
+ entityName: string;
197
+ entityType: string;
198
+ };
199
+ export declare type ChangeExpectedDate = {
200
+ entityId: string;
201
+ entityName: string;
202
+ entityType: string;
203
+ };
204
+ export declare type FinishMilestone = {
205
+ entityId: string;
206
+ entityName: string;
207
+ entityType: string;
208
+ };
209
+ export declare type AssignLoanTeamMember = {
210
+ milestone: Milestone;
211
+ role?: Role2;
212
+ };
213
+ export declare type Milestone = {
214
+ entityId: string;
215
+ entityName: string;
216
+ entityType: string;
217
+ };
218
+ export declare type Role2 = {
219
+ entityId: string;
220
+ entityName: string;
221
+ entityType: string;
222
+ };
223
+ export declare type EditComment = {
224
+ entityId: string;
225
+ entityName: string;
226
+ entityType: string;
227
+ };
228
+ export declare type MoveLoans = {
229
+ access: boolean;
230
+ moveFrom: MoveFrom[];
231
+ moveTo: MoveTo[];
232
+ };
233
+ export declare type MoveFrom = {
234
+ entityId: string;
235
+ entityType: string;
236
+ };
237
+ export declare type MoveTo = {
238
+ entityId: string;
239
+ entityType: string;
240
+ };
241
+ export declare type PersonalTemplates = {
242
+ access: boolean;
243
+ rights: string[];
244
+ };
245
+ export declare type Pipeline = {
246
+ access: boolean;
247
+ pipelineTasks: string[];
248
+ pipelineViews: PipelineView[];
249
+ nonAccessibleColumns: any[];
250
+ };
251
+ export declare type PipelineView = {
252
+ entityId: string;
253
+ entityName: string;
254
+ entityType: string;
255
+ };
256
+ export declare type ExportServices = {
257
+ accessSetting: string;
258
+ defaultAccess: string;
259
+ };
260
+ export declare type PostClosingConditions = {
261
+ access: boolean;
262
+ rights: string[];
263
+ };
264
+ export declare type PreliminaryConditions = {
265
+ access: boolean;
266
+ rights: string[];
267
+ };
268
+ export declare type PurchaseConditions = {
269
+ access: boolean;
270
+ rights: string[];
271
+ };
272
+ export declare type Print = {
273
+ access: boolean;
274
+ rights: string[];
275
+ };
276
+ export declare type SecondarySetup = {
277
+ access: boolean;
278
+ rights: string[];
279
+ };
280
+ export declare type DeliveryConditions = {
281
+ access: boolean;
282
+ rights: string[];
283
+ };
284
+ export declare type SystemAdministration = {
285
+ access: boolean;
286
+ rights: string[];
287
+ };
288
+ export declare type TablesAndFees = {
289
+ access: boolean;
290
+ rights: string[];
291
+ };
292
+ export declare type Tool = {
293
+ entityName: string;
294
+ };
295
+ export declare type TpoCompanyDetails = {
296
+ access: boolean;
297
+ rights: string[];
298
+ };
299
+ export declare type TpoConnectSiteSettings = {
300
+ access: boolean;
301
+ rights: string[];
302
+ };
303
+ export declare type TpoContacts = {
304
+ access: boolean;
305
+ rights: string[];
306
+ };
307
+ export declare type TpoFees = {
308
+ access: boolean;
309
+ rights: string[];
310
+ };
311
+ export declare type TpoInformation = {
312
+ access: boolean;
313
+ rights: string[];
314
+ };
315
+ export declare type TpoOrganizationSettings = {
316
+ access: boolean;
317
+ rights: string[];
318
+ };
319
+ export declare type TqlServices = {
320
+ access: boolean;
321
+ rights: string[];
322
+ };
323
+ export declare type Trades = {
324
+ access: boolean;
325
+ rights: string[];
326
+ };
327
+ export declare type UnderwritingConditions = {
328
+ access: boolean;
329
+ rights: string[];
330
+ };
331
+ export declare type EnhancedConditions = {
332
+ access: boolean;
333
+ conditionType: ConditionType;
334
+ };
335
+ export declare type ConditionType = {
336
+ 'Investor Delivery': string[];
337
+ 'Post-Closing': string[];
338
+ Preliminary: string[];
339
+ Underwriting: string[];
340
+ };
341
+ export declare type LoConnectTasks = {
342
+ access: boolean;
343
+ rights: string[];
344
+ customForms: any[];
345
+ customTools: any[];
346
+ globalApplications: any[];
347
+ standardWebForms: StandardWebForm[];
348
+ };
349
+ export declare type StandardWebForm = {
350
+ formName: string;
351
+ access: boolean;
352
+ formID: number;
353
+ };
354
+ export declare type EncompassWebServices = {
355
+ access: boolean;
356
+ rights: string[];
357
+ };
358
+ export declare type UnderwritingCenter = {
359
+ access: boolean;
360
+ rights: string[];
361
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-scripting-object",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "Typescript defintions for Scripting Objects",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/cjs/index.js",
@@ -58,8 +58,8 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.5.0",
61
- "@elliemae/pui-cli": "~7.3.0",
62
- "@elliemae/pui-doc-gen": "~1.1.0",
61
+ "@elliemae/pui-cli": "~7.5.0",
62
+ "@elliemae/pui-doc-gen": "~1.2.1",
63
63
  "@types/styled-components": "~5.1.26",
64
64
  "redux": "~4.2.0",
65
65
  "redux-saga": "~1.2.1",