@elliemae/pui-scripting-object 1.2.0 → 1.3.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.
@@ -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,55 @@
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
+ };
1
14
  export interface ILoan {
2
15
  all(): Promise<Record<string, string>>;
3
16
  apply(loan: Record<string, string>): Promise<void>;
4
17
  commit(): Promise<void>;
5
18
  getField(id: string): Promise<string>;
19
+ /**
20
+ * get options for list of fields
21
+ *
22
+ * @param fieldIds array of field ids to get field options
23
+ * @returns array of field options for each field id
24
+ * @example:
25
+ * ```ts
26
+ * const fieldOptions = await loan.getFieldOptions(['1543', '1544']);
27
+ * ```
28
+ *
29
+ * Following is a sample field options for field Id 1543:
30
+ * 1543: [
31
+ * {
32
+ * value: 'Manual Underwriting',
33
+ * name: 'Manual Underwriting'
34
+ * },
35
+ * {
36
+ * value: 'DU',
37
+ * name: 'DU'
38
+ * },
39
+ * {
40
+ * value: 'LP',
41
+ * name: 'LP'
42
+ * },
43
+ * {
44
+ * value: 'LQA',
45
+ * name: 'LQA'
46
+ * },
47
+ * {
48
+ * value: 'Other',
49
+ * name: 'Other'
50
+ * }]
51
+ */
52
+ getFieldOptions(fieldIds: string[]): Promise<Record<string, FieldOptions[]>>;
6
53
  getFields(ids: string[]): Promise<Record<string, string>>;
7
54
  setFields(fields: Record<string, string>): Promise<void>;
8
55
  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/docs/index.md ADDED
@@ -0,0 +1 @@
1
+ # Getting Started
package/docs/intro.md ADDED
@@ -0,0 +1 @@
1
+ # Introduction
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-scripting-object",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Typescript defintions for Scripting Objects",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/cjs/index.js",
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.5.0",
60
- "@elliemae/pui-cli": "~7.0.0",
60
+ "@elliemae/pui-cli": "~7.1.0",
61
61
  "@elliemae/pui-doc-gen": "~1.0.5",
62
62
  "@types/styled-components": "~5.1.26",
63
63
  "redux": "~4.2.0",