@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.
Files changed (64) hide show
  1. package/dist/cjs/events.js +16 -0
  2. package/dist/cjs/index.js +16 -15
  3. package/dist/cjs/{analytics.js → objects/analytics.js} +0 -0
  4. package/dist/cjs/{application.js → objects/application.js} +0 -0
  5. package/dist/cjs/{auth.js → objects/auth.js} +0 -0
  6. package/dist/cjs/{form.js → objects/form.js} +0 -0
  7. package/dist/cjs/{global.js → objects/global.js} +0 -0
  8. package/dist/cjs/{http.js → objects/http.js} +0 -0
  9. package/dist/cjs/{loan.js → objects/loan.js} +0 -0
  10. package/dist/cjs/{loanv2.js → objects/loanv2.js} +0 -0
  11. package/dist/cjs/objects/memStorage.js +16 -0
  12. package/dist/cjs/{module.js → objects/module.js} +0 -0
  13. package/dist/cjs/{route.js → objects/route.js} +0 -0
  14. package/dist/cjs/{session.js → objects/session.js} +0 -0
  15. package/dist/cjs/{transaction.js → objects/transaction.js} +12 -0
  16. package/dist/cjs/objects/transactionTemplate.js +16 -0
  17. package/dist/cjs/{userAccessRights.js → objects/userAccessRights.js} +0 -0
  18. package/dist/cjs/{view.js → objects/view.js} +0 -0
  19. package/dist/esm/{analytics.js → events.js} +0 -0
  20. package/dist/esm/index.js +16 -15
  21. package/dist/esm/{form.js → objects/analytics.js} +0 -0
  22. package/dist/esm/{application.js → objects/application.js} +0 -0
  23. package/dist/esm/{auth.js → objects/auth.js} +0 -0
  24. package/dist/esm/{global.js → objects/form.js} +0 -0
  25. package/dist/esm/{http.js → objects/global.js} +0 -0
  26. package/dist/esm/{route.js → objects/http.js} +0 -0
  27. package/dist/esm/{loan.js → objects/loan.js} +0 -0
  28. package/dist/esm/{loanv2.js → objects/loanv2.js} +0 -0
  29. package/dist/esm/{session.js → objects/memStorage.js} +0 -0
  30. package/dist/esm/{module.js → objects/module.js} +0 -0
  31. package/dist/esm/{transaction.js → objects/route.js} +0 -0
  32. package/dist/esm/{transactiontemplate.js → objects/session.js} +0 -0
  33. package/dist/esm/objects/transaction.js +8 -0
  34. package/dist/esm/{userAccessRights.js → objects/transactionTemplate.js} +0 -0
  35. package/dist/esm/{view.js → objects/userAccessRights.js} +0 -0
  36. package/dist/esm/objects/view.js +0 -0
  37. package/dist/types/events.d.ts +7 -0
  38. package/dist/types/index.d.ts +17 -15
  39. package/dist/types/{analytics.d.ts → objects/analytics.d.ts} +6 -0
  40. package/dist/types/{application.d.ts → objects/application.d.ts} +92 -2
  41. package/dist/types/objects/auth.d.ts +105 -0
  42. package/dist/types/objects/form.d.ts +47 -0
  43. package/dist/types/objects/global.d.ts +47 -0
  44. package/dist/types/objects/http.d.ts +52 -0
  45. package/dist/types/{loan.d.ts → objects/loan.d.ts} +75 -11
  46. package/dist/types/{loanv2.d.ts → objects/loanv2.d.ts} +33 -0
  47. package/dist/types/objects/memStorage.d.ts +26 -0
  48. package/dist/types/objects/module.d.ts +55 -0
  49. package/dist/types/{route.d.ts → objects/route.d.ts} +1 -1
  50. package/dist/types/{session.d.ts → objects/session.d.ts} +1 -1
  51. package/dist/types/objects/transaction.d.ts +295 -0
  52. package/dist/types/objects/transactionTemplate.d.ts +76 -0
  53. package/dist/types/{userAccessRights.d.ts → objects/userAccessRights.d.ts} +3 -0
  54. package/dist/types/{view.d.ts → objects/view.d.ts} +20 -18
  55. package/dist/types/scriptingObjectTypes.d.ts +18 -12
  56. package/package.json +2 -2
  57. package/dist/cjs/transactiontemplate.js +0 -16
  58. package/dist/types/auth.d.ts +0 -43
  59. package/dist/types/form.d.ts +0 -10
  60. package/dist/types/global.d.ts +0 -5
  61. package/dist/types/http.d.ts +0 -7
  62. package/dist/types/module.d.ts +0 -16
  63. package/dist/types/transaction.d.ts +0 -53
  64. package/dist/types/transactiontemplate.d.ts +0 -12
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Transaction request object
3
+ */
4
+ export declare type TransactionRequest = {
5
+ /**
6
+ * The type of transaction request being templated for the subject product.
7
+ * This must be one of the supported values for the request type that your application is configured to support,
8
+ * based on which its data entitlements are scoped
9
+ */
10
+ type: string;
11
+ /**
12
+ * The specific set of selectable options that apply to the specific type of transaction request,
13
+ * as modeled by your application, being templated by the Lender administrator.
14
+ * This can be used to select from which bureaus to order a borrower's credit score for a Credit integration,
15
+ * or how many days of income information to pull for a borrower in the case of a Verification of Income/Employment integration
16
+ */
17
+ options?: Record<string, any>;
18
+ };
19
+ /**
20
+ * Transaction Template object
21
+ *
22
+ * Note:
23
+ * Remember, the transactionTemplate object is only accessible to the administrator-facing view of a Partner application,
24
+ * registered as the $.adminInterfaceUrl property in the product configuration.
25
+ * This object encapsulates functionality that is only relevant for products that support 1-click/automated ordering workflows
26
+ * (as specified by the $.tags.workflows tag in the product configuration), and is only applicable
27
+ * when an administrator is trying to create a 1-click/automated service ordering setup
28
+ * in the Loan Officer Connect services management section.
29
+ * This object is therefore not accessible to an integration's service ordering views
30
+ * (registered as the $.interfaceUrl property in the product configuration),
31
+ * wherein the transaction and application objects are available for use as applicable.
32
+ */
33
+ export declare type TransactionTemplateDetails = {
34
+ /**
35
+ * The listed name for the transaction template - as auto-generated, or as provided
36
+ * by the lender administrator when the template was created
37
+ */
38
+ name: string;
39
+ request: Array<TransactionRequest>;
40
+ };
41
+ /**
42
+ * Provides application's administrator-facing view with the necessary handles
43
+ * for enabling Lender administrators to create transaction request templates,
44
+ * which they can associate with a 1-click/automated ordering business condition set.
45
+ */
46
+ export interface ITransactionTemplate {
47
+ /**
48
+ * Discover if your administrator-facing view has been rendered in the context of an existing
49
+ * transaction request template (in edit mode) or a new transaction request template (in create mode).
50
+ *
51
+ * If your application is launched in the context of an existing transaction template,
52
+ * this method will return the previously created transactionTemplate object, containing
53
+ * the associated request type and set of request options, which your application
54
+ * user-interface can use to render the applicable view for the administrator (such as pre-filling the form entries).
55
+ *
56
+ * Otherwise, if your application is launched in the context of a new transaction request template,
57
+ * this method will return a null response.
58
+ *
59
+ * @returns transactionTemplate object in edit mode, or null in create mode
60
+ */
61
+ get(): Promise<TransactionTemplateDetails | null>;
62
+ /**
63
+ * Create a new transaction request template, containing a defined request type and set of request options,
64
+ * that Lender administrators can associate with a 1-click/automated ordering business condition set.
65
+ *
66
+ * @param options details of the transaction template to be created
67
+ * @returns success
68
+ */
69
+ save(options: TransactionTemplateDetails): Promise<string>;
70
+ /**
71
+ * Navigate the administrator users back to where they left off in the
72
+ * Loan Officer Connect services management application, after they are done interacting
73
+ * with your application's administrator-facing user-interface
74
+ */
75
+ close(): Promise<void>;
76
+ }
@@ -1,3 +1,6 @@
1
+ /**
2
+ * user access rights object
3
+ */
1
4
  export declare type UserAccessRights = {
2
5
  access: string[];
3
6
  additionalServices: AdditionalServices;
@@ -7,15 +7,7 @@ export declare type ViewportSize = {
7
7
  height: number;
8
8
  };
9
9
  /**
10
- * parent window resize event handler
11
- */
12
- export declare type ResizeEventListener = (entries: ResizeObserverEntry) => void;
13
- /**
14
- * parent window breakpoint change event handler
15
- */
16
- export declare type BreakpointChangeEventListener = (breakpoint: BreakPoint) => void;
17
- /**
18
- * Methods and events to view, modify & get notified about parent's window attributes
10
+ * Methods view, modify parent's window attributes
19
11
  */
20
12
  export interface IView {
21
13
  /**
@@ -26,16 +18,26 @@ export interface IView {
26
18
  * Get the current viewport size of the parent window
27
19
  */
28
20
  getViewPortSize(): Promise<ViewportSize>;
21
+ }
22
+ /**
23
+ * parent window resize event handler
24
+ *
25
+ * @param entries details about the resize event
26
+ */
27
+ export declare type ResizeEventListener = (entries: ResizeObserverEntry) => void;
28
+ /**
29
+ * parent window breakpoint change event handler
30
+ *
31
+ * @param breakpoint current breakpoint of the parent window
32
+ */
33
+ export declare type BreakpointChangeEventListener = (breakpoint: BreakPoint) => void;
34
+ export declare type ViewEvents = {
29
35
  /**
30
- * parent window resize event
31
- *
32
- * @param eventHandler event handler to be called when the parent window is resized
36
+ * eent is fired when the parent window is resized
33
37
  */
34
- onResizeEvent(eventHandler: ResizeEventListener): string;
38
+ 'view.resize': ResizeEventListener;
35
39
  /**
36
- * parent window breakpoint change event
37
- *
38
- * @param eventHandler event handler to be called when the parent window's breakpoint changes
40
+ * event is fired when the parent window's breakpoint changes
39
41
  */
40
- onBreakpointChangeEvent(eventHandler: BreakpointChangeEventListener): string;
41
- }
42
+ 'view.breakpointChange': BreakpointChangeEventListener;
43
+ };
@@ -1,24 +1,30 @@
1
- import { ILoan } from './loan.js';
2
- import { ILoanV2 } from './loanv2.js';
3
- import { IApplication } from './application.js';
4
- import { IAuth } from './auth.js';
5
- import { ISession } from './session.js';
6
- import { ITransaction } from './transaction.js';
7
- import { ITransactionTemplate } from './transactiontemplate.js';
8
- import { IForm } from './form.js';
9
- import { IGlobal } from './global.js';
10
- import { IHttp } from './http.js';
11
- import { IAnalytics } from './analytics.js';
1
+ import { ILoan } from './objects/loan.js';
2
+ import { ILoanV2 } from './objects/loanv2.js';
3
+ import { IApplication } from './objects/application.js';
4
+ import { IAuth } from './objects/auth.js';
5
+ import { ISession } from './objects/session.js';
6
+ import { ITransaction } from './objects/transaction.js';
7
+ import { ITransactionTemplate } from './objects/transactionTemplate.js';
8
+ import { IForm } from './objects/form.js';
9
+ import { IGlobal } from './objects/global.js';
10
+ import { IHttp } from './objects/http.js';
11
+ import { IAnalytics } from './objects/analytics.js';
12
+ import { IMemStorage } from './objects/memStorage.js';
13
+ import { IView } from './objects/view.js';
14
+ import { IRoute } from './objects/route.js';
12
15
  export declare type ScriptingObjectTypes = {
13
- Application: IApplication;
14
16
  Analytics: IAnalytics;
17
+ Application: IApplication;
15
18
  Auth: IAuth;
16
19
  Form: IForm;
17
20
  Global: IGlobal;
18
21
  Http: IHttp;
19
22
  Loan: ILoan;
20
23
  LoanV2: ILoanV2;
24
+ MemStorage: IMemStorage;
25
+ Route: IRoute;
21
26
  Session: ISession;
22
27
  Transaction: ITransaction;
23
28
  TransactionTemplate: ITransactionTemplate;
29
+ View: IView;
24
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-scripting-object",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "Typescript defintions for Scripting Objects",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/cjs/index.js",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.5.0",
61
- "@elliemae/pui-cli": "~7.9.0",
61
+ "@elliemae/pui-cli": "~7.10.3",
62
62
  "@elliemae/pui-doc-gen": "~1.3.0",
63
63
  "@elliemae/pui-theme": "~2.6.0",
64
64
  "@types/styled-components": "~5.1.26",
@@ -1,16 +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 __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);
@@ -1,43 +0,0 @@
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
- id: string;
9
- realm: string;
10
- firstName: string;
11
- lastName: string;
12
- phone: string;
13
- cellPhone: string;
14
- personas: Array<Personas>;
15
- clientId: string;
16
- email: string;
17
- };
18
- export declare enum TokenType {
19
- BEARER = "Bearer"
20
- }
21
- export declare type PluginInfo = {
22
- clientId: string;
23
- redirectUrl: string;
24
- scope: TokenType;
25
- };
26
- export declare type TokenInfo = {
27
- accessToken: string;
28
- tokenType: TokenType;
29
- apiBaseUrl: string;
30
- };
31
- export interface IAuth {
32
- tokenUrl: string;
33
- createAuthCode(clientId: string): Promise<string>;
34
- getAccessToken(appInfo: PluginInfo): Promise<TokenInfo>;
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>;
43
- }
@@ -1,10 +0,0 @@
1
- export declare type FormDescriptor = {
2
- id: string;
3
- name: string;
4
- };
5
- export interface IForm {
6
- getDescriptor(): Promise<FormDescriptor>;
7
- getControl(id: string): Promise<any>;
8
- }
9
- export declare type FormLoadListener = (id: string) => void;
10
- export declare type FormUnloadListener = (id: string) => void;
@@ -1,5 +0,0 @@
1
- export interface IGlobal {
2
- set(key: string, value: string): Promise<void>;
3
- get(key: string): Promise<string>;
4
- }
5
- export declare type GlobalStateChangeListener = (key: string) => void;
@@ -1,7 +0,0 @@
1
- export interface IHttp {
2
- get(url: string, headersOrAccessToken?: HeadersInit | string): Promise<Response>;
3
- post(url: string, content: string | Record<string, string>, headersOrAccessToken?: HeadersInit | string): Promise<Response>;
4
- patch(url: string, content: string | Record<string, string>, headersOrAccessToken?: HeadersInit | string): Promise<Response>;
5
- put(url: string, content: string | Record<string, string>, headersOrAccessToken?: HeadersInit | string): Promise<Response>;
6
- delete(url: string, headersOrAccessToken?: HeadersInit | string): Promise<Response>;
7
- }
@@ -1,16 +0,0 @@
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
- export interface IModule {
11
- getCapabilities(): Promise<Record<string, string>>;
12
- getParameters(): Promise<Record<string, string>>;
13
- unload(): Promise<void>;
14
- log(message: string, logLevel: LogLevel): Promise<void>;
15
- }
16
- export declare type ModuleUnLoadingListener = (id: string) => boolean;
@@ -1,53 +0,0 @@
1
- export declare type OriginInfo = {
2
- partnerAccessToken: string;
3
- id: string;
4
- transactionId?: string;
5
- };
6
- export declare type TransactionInfo = {
7
- id: string | null;
8
- };
9
- export declare type TransactionResource = {
10
- id: string;
11
- name: string;
12
- repository: string;
13
- mimeType: string;
14
- };
15
- export declare type TransactionOptions = {
16
- scope?: Array<string>;
17
- request: {
18
- type: string;
19
- options?: Record<string, string>;
20
- resources: Array<TransactionResource>;
21
- };
22
- };
23
- export declare type TransactionResourceFile = {
24
- name: string;
25
- source: string;
26
- };
27
- export declare type TransactionResourceResponse = {
28
- id: string;
29
- respository: string;
30
- name: string;
31
- location: string;
32
- authorizationHeader: string;
33
- mimeType: string;
34
- };
35
- export declare type TransactionEvent = {
36
- text: string;
37
- type: string;
38
- comments: string;
39
- resources: Array<TransactionResource>;
40
- };
41
- export interface ITransaction {
42
- getOrigin(): Promise<OriginInfo>;
43
- refreshOrigin(): Promise<OriginInfo>;
44
- get(): Promise<TransactionInfo>;
45
- set(options: TransactionInfo): Promise<void>;
46
- create(options: TransactionOptions): Promise<TransactionInfo>;
47
- update(options: TransactionOptions): Promise<TransactionInfo>;
48
- createResource(options: TransactionResourceFile): Promise<TransactionResourceResponse>;
49
- createEvent(options: TransactionEvent): Promise<TransactionInfo>;
50
- close(): Promise<void>;
51
- cancel(): Promise<void>;
52
- error(): Promise<void>;
53
- }
@@ -1,12 +0,0 @@
1
- export declare type TransactionRequest = {
2
- type: string;
3
- options?: Record<string, string>;
4
- };
5
- export declare type TransactionTemplateOptions = {
6
- request: Array<TransactionRequest>;
7
- };
8
- export interface ITransactionTemplate {
9
- get(): Promise<TransactionTemplateOptions | null>;
10
- save(options: TransactionTemplateOptions): Promise<string>;
11
- close(): Promise<string>;
12
- }