@elliemae/pui-scripting-object 1.1.0 → 1.3.1

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.
@@ -1,17 +1,17 @@
1
- export interface AppInfo {
1
+ export declare type AppInfo = {
2
2
  id: string;
3
3
  name: string;
4
- }
4
+ };
5
5
  export declare enum ApplicationExtensionType {
6
6
  TOOL = "TOOL",
7
7
  MENU = "MENU"
8
8
  }
9
- export interface ApplicationExtension {
9
+ export declare type ApplicationExtension = {
10
10
  type: ApplicationExtensionType;
11
11
  text: string;
12
12
  url: string;
13
13
  options?: Record<string, string>;
14
- }
14
+ };
15
15
  export declare enum NavigationType {
16
16
  STANDARD_FORM = "STANDARD_FORM",
17
17
  STANDARD_TOOL = "STANDARD_TOOL",
@@ -20,43 +20,52 @@ export declare enum NavigationType {
20
20
  GLOBAL_CUSTOM_TOOL = "GLOBAL_CUSTOM_TOOL",
21
21
  OTHER = "OTHER"
22
22
  }
23
- export interface NavigationOptions {
23
+ export declare type NavigationOptions = {
24
24
  target: string;
25
25
  type: NavigationType;
26
26
  context?: Record<string, string>;
27
- }
28
- export interface OpenOptions {
27
+ };
28
+ export declare type OpenOptions = {
29
29
  target: string;
30
30
  type?: string;
31
- }
31
+ };
32
32
  export declare enum ModalSize {
33
33
  SMALL = "sm",
34
34
  MEDIUM = "md",
35
35
  LARGE = "lg"
36
36
  }
37
- export interface OpenModalOptions {
37
+ export declare type OpenModalOptions = {
38
38
  target: string;
39
39
  name: string;
40
40
  type?: string;
41
41
  size: ModalSize;
42
- }
43
- export interface Capabilities {
42
+ };
43
+ export declare type Capabilities = {
44
44
  supprotedActions: Array<string>;
45
45
  supportedFeatures: Array<string>;
46
- }
47
- export interface Route {
46
+ };
47
+ export declare type Route = {
48
48
  url: string;
49
49
  type: NavigationType;
50
50
  name: string;
51
51
  id: string;
52
- }
53
- export interface Environment {
52
+ };
53
+ export declare type Environment = {
54
54
  apiHost: string;
55
- }
56
- export interface ApplicationContext {
55
+ };
56
+ export declare type ApplicationContext = {
57
57
  env: Environment;
58
58
  route: Route;
59
- }
59
+ };
60
+ /**
61
+ * Options for printing the document
62
+ */
63
+ export declare type PrintOptions = {
64
+ /**
65
+ * document to print
66
+ */
67
+ blob: Blob;
68
+ };
60
69
  /**
61
70
  * The Application Object allows for access to application-level UI elements, behaviors and events
62
71
  */
@@ -82,6 +91,12 @@ export interface IApplication {
82
91
  hideSpinner(): Promise<void>;
83
92
  getPoliciesDetails(): Promise<Record<string, string>>;
84
93
  getPersonaAccess(): Promise<Record<string, string>>;
94
+ /**
95
+ * Prints given document
96
+ *
97
+ * @param options Print options
98
+ */
99
+ print(options: PrintOptions): Promise<void>;
85
100
  }
86
101
  export declare type AppLoginListener = () => void;
87
102
  export declare type AppActionCompletedListener = (name: string) => void;
@@ -1,9 +1,9 @@
1
- export interface Personas {
1
+ export declare type Personas = {
2
2
  entityId: string;
3
3
  entityType: string;
4
4
  entityName: string;
5
- }
6
- export interface User {
5
+ };
6
+ export declare type User = {
7
7
  id: string;
8
8
  realm: string;
9
9
  firstName: string;
@@ -13,20 +13,20 @@ export interface User {
13
13
  personas: Array<Personas>;
14
14
  clientId: string;
15
15
  email: string;
16
- }
16
+ };
17
17
  export declare enum TokenType {
18
18
  BEARER = "Bearer"
19
19
  }
20
- export interface PluginInfo {
20
+ export declare type PluginInfo = {
21
21
  clientId: string;
22
22
  redirectUrl: string;
23
23
  scope: TokenType;
24
- }
25
- export interface TokenInfo {
24
+ };
25
+ export declare type TokenInfo = {
26
26
  accessToken: string;
27
27
  tokenType: TokenType;
28
28
  apiBaseUrl: string;
29
- }
29
+ };
30
30
  export interface IAuth {
31
31
  tokenUrl: string;
32
32
  createAuthCode(clientId: string): Promise<string>;
@@ -1,7 +1,7 @@
1
- export interface FormDescriptor {
1
+ export declare type FormDescriptor = {
2
2
  id: string;
3
3
  name: string;
4
- }
4
+ };
5
5
  export interface IForm {
6
6
  getDescriptor(): Promise<FormDescriptor>;
7
7
  getControl(id: string): Promise<any>;
@@ -1,8 +1,74 @@
1
+ /**
2
+ * option name and its value
3
+ */
4
+ export declare type FieldOptions = {
5
+ /**
6
+ * option name
7
+ */
8
+ name: string;
9
+ /**
10
+ * option value
11
+ */
12
+ value: string;
13
+ };
14
+ /**
15
+ * The Loan object provides methods for interacting with an open loan in the application's editor screen(s).
16
+ */
1
17
  export interface ILoan {
2
- all(): Promise<Record<string, string>>;
18
+ /**
19
+ * Gets entire Loan object
20
+ *
21
+ * @returns v3 Loan Object
22
+ *
23
+ * #### Product Compatibility:
24
+ * | | Encompass | Encompass Web | TPO | Consumer Connect |
25
+ * :-----:|:-----: |:-----: |:-----: |:-----: |
26
+ * | all | ✔ | ✔ | ✔ | ✖️ |
27
+ */
28
+ all(): Promise<Record<string, any>>;
3
29
  apply(loan: Record<string, string>): Promise<void>;
4
30
  commit(): Promise<void>;
5
31
  getField(id: string): Promise<string>;
32
+ /**
33
+ * get options for list of fields
34
+ *
35
+ * @param fieldIds array of field ids to get field options
36
+ * @returns array of field options for each field id
37
+ *
38
+ * #### Example
39
+ *
40
+ * Get Field options for set of field Ids
41
+ * ```ts
42
+ * const fieldOptions = await loan.getFieldOptions(['1543', '1544']);
43
+ * ```
44
+ *
45
+ * Following is a sample field options for field Id 1543:
46
+ * ```
47
+ * 1543: [
48
+ * {
49
+ * value: 'Manual Underwriting',
50
+ * name: 'Manual Underwriting'
51
+ * },
52
+ * {
53
+ * value: 'DU',
54
+ * name: 'DU'
55
+ * },
56
+ * {
57
+ * value: 'LP',
58
+ * name: 'LP'
59
+ * },
60
+ * {
61
+ * value: 'LQA',
62
+ * name: 'LQA'
63
+ * },
64
+ * {
65
+ * value: 'Other',
66
+ * name: 'Other'
67
+ * }
68
+ * ]
69
+ * ```
70
+ */
71
+ getFieldOptions(fieldIds: string[]): Promise<Record<string, FieldOptions[]>>;
6
72
  getFields(ids: string[]): Promise<Record<string, string>>;
7
73
  setFields(fields: Record<string, string>): Promise<void>;
8
74
  merge(): Promise<void>;
@@ -1,43 +1,43 @@
1
- export interface OriginInfo {
1
+ export declare type OriginInfo = {
2
2
  partnerAccessToken: string;
3
3
  id: string;
4
4
  transactionId?: string;
5
- }
6
- export interface TransactionInfo {
5
+ };
6
+ export declare type TransactionInfo = {
7
7
  id: string | null;
8
- }
9
- export interface TransactionResource {
8
+ };
9
+ export declare type TransactionResource = {
10
10
  id: string;
11
11
  name: string;
12
12
  repository: string;
13
13
  mimeType: string;
14
- }
15
- export interface TransactionOptions {
14
+ };
15
+ export declare type TransactionOptions = {
16
16
  scope?: Array<string>;
17
17
  request: {
18
18
  type: string;
19
19
  options?: Record<string, string>;
20
20
  resources: Array<TransactionResource>;
21
21
  };
22
- }
23
- export interface TransactionResourceFile {
22
+ };
23
+ export declare type TransactionResourceFile = {
24
24
  name: string;
25
25
  source: string;
26
- }
27
- export interface TransactionResourceResponse {
26
+ };
27
+ export declare type TransactionResourceResponse = {
28
28
  id: string;
29
29
  respository: string;
30
30
  name: string;
31
31
  location: string;
32
32
  authorizationHeader: string;
33
33
  mimeType: string;
34
- }
35
- export interface TransactionEvent {
34
+ };
35
+ export declare type TransactionEvent = {
36
36
  text: string;
37
37
  type: string;
38
38
  comments: string;
39
39
  resources: Array<TransactionResource>;
40
- }
40
+ };
41
41
  export interface ITransaction {
42
42
  getOrigin(): Promise<OriginInfo>;
43
43
  refreshOrigin(): Promise<OriginInfo>;
@@ -1,10 +1,10 @@
1
- export interface TransactionRequest {
1
+ export declare type TransactionRequest = {
2
2
  type: string;
3
3
  options?: Record<string, string>;
4
- }
5
- export interface TransactionTemplateOptions {
4
+ };
5
+ export declare type TransactionTemplateOptions = {
6
6
  request: Array<TransactionRequest>;
7
- }
7
+ };
8
8
  export interface ITransactionTemplate {
9
9
  get(): Promise<TransactionTemplateOptions | null>;
10
10
  save(options: TransactionTemplateOptions): Promise<string>;
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@elliemae/pui-scripting-object",
3
- "version": "1.1.0",
3
+ "version": "1.3.1",
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
  "typings": "./dist/types/lib/index.d.ts",
9
9
  "files": [
10
- "dist"
10
+ "dist",
11
+ "build"
11
12
  ],
12
13
  "publishConfig": {
13
14
  "access": "public"
@@ -25,6 +26,10 @@
25
26
  "scripts": {
26
27
  "build": "pui-cli pack -p -t node",
27
28
  "build:dev": "pui-cli pack -t node",
29
+ "docs:start": "docusaurus start",
30
+ "docs:build": "docusaurus build --out-dir build/public",
31
+ "docs:version": "docusaurus docs:version",
32
+ "docs:serve": "docusaurus serve",
28
33
  "gendoc": "pui-cli gendoc",
29
34
  "lint": "pui-cli lint",
30
35
  "lint:fix": "pui-cli lint --fix",
@@ -35,7 +40,7 @@
35
40
  "storybook:build": "exit 0",
36
41
  "storybook:docs:build": "exit 0",
37
42
  "storybook:prod": "exit 0",
38
- "setup": "rimraf -r node_modules && rimraf pnpm-lock.yaml && pnpm i",
43
+ "setup": "rimraf node_modules && rimraf pnpm-lock.yaml && pnpm i",
39
44
  "test": "pui-cli test -p",
40
45
  "test:fix": "pui-cli test -f",
41
46
  "test:watch": "jest --watch",
@@ -53,7 +58,8 @@
53
58
  },
54
59
  "devDependencies": {
55
60
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.5.0",
56
- "@elliemae/pui-cli": "7.0.0",
61
+ "@elliemae/pui-cli": "~7.1.0",
62
+ "@elliemae/pui-doc-gen": "~1.0.7",
57
63
  "@types/styled-components": "~5.1.26",
58
64
  "redux": "~4.2.0",
59
65
  "redux-saga": "~1.2.0",