@elliemae/pui-scripting-object 1.0.0 → 1.1.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,8 +1,6 @@
1
1
  {
2
2
  "appId": "lib-boilerplate",
3
- "brand": "primary",
4
3
  "activeEnv": "localhost",
5
- "hosted": false,
6
4
  "serviceEndpoints": {
7
5
  "api": "",
8
6
  "idp": ""
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
package/dist/cjs/auth.js CHANGED
@@ -1,7 +1,12 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
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
+ };
5
10
  var __copyProps = (to, from, except, desc) => {
6
11
  if (from && typeof from === "object" || typeof from === "function") {
7
12
  for (let key of __getOwnPropNames(from))
@@ -12,4 +17,11 @@ var __copyProps = (to, from, except, desc) => {
12
17
  };
13
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
19
  var auth_exports = {};
20
+ __export(auth_exports, {
21
+ TokenType: () => TokenType
22
+ });
15
23
  module.exports = __toCommonJS(auth_exports);
24
+ var TokenType = /* @__PURE__ */ ((TokenType2) => {
25
+ TokenType2["BEARER"] = "Bearer";
26
+ return TokenType2;
27
+ })(TokenType || {});
package/dist/cjs/form.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
package/dist/cjs/http.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Document</title>
8
+ </head>
9
+ <body></body>
10
+ </html>
package/dist/cjs/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
package/dist/cjs/loan.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,8 +1,6 @@
1
1
  {
2
2
  "appId": "lib-boilerplate",
3
- "brand": "primary",
4
3
  "activeEnv": "localhost",
5
- "hosted": false,
6
4
  "serviceEndpoints": {
7
5
  "api": "",
8
6
  "idp": ""
package/dist/esm/auth.js CHANGED
@@ -0,0 +1,7 @@
1
+ var TokenType = /* @__PURE__ */ ((TokenType2) => {
2
+ TokenType2["BEARER"] = "Bearer";
3
+ return TokenType2;
4
+ })(TokenType || {});
5
+ export {
6
+ TokenType
7
+ };
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Document</title>
8
+ </head>
9
+ <body></body>
10
+ </html>
@@ -57,7 +57,15 @@ export interface ApplicationContext {
57
57
  env: Environment;
58
58
  route: Route;
59
59
  }
60
+ /**
61
+ * The Application Object allows for access to application-level UI elements, behaviors and events
62
+ */
60
63
  export interface IApplication {
64
+ /**
65
+ * Gets descriptor for the Application
66
+ *
67
+ * @returns application descriptor
68
+ */
61
69
  getDescriptior(): Promise<AppInfo>;
62
70
  getApplicationContext(): Promise<ApplicationContext>;
63
71
  extend(extensionObj: ApplicationExtension): Promise<void>;
@@ -14,8 +14,22 @@ export interface User {
14
14
  clientId: string;
15
15
  email: string;
16
16
  }
17
+ export declare enum TokenType {
18
+ BEARER = "Bearer"
19
+ }
20
+ export interface PluginInfo {
21
+ clientId: string;
22
+ redirectUrl: string;
23
+ scope: TokenType;
24
+ }
25
+ export interface TokenInfo {
26
+ accessToken: string;
27
+ tokenType: TokenType;
28
+ apiBaseUrl: string;
29
+ }
17
30
  export interface IAuth {
18
31
  tokenUrl: string;
19
32
  createAuthCode(clientId: string): Promise<string>;
33
+ getAccessToken(appInfo: PluginInfo): Promise<TokenInfo>;
20
34
  getUser(): Promise<User>;
21
35
  }
@@ -1,14 +1,4 @@
1
- import { IAuth } from './auth.js';
2
- import { IApplication } from './application.js';
3
- import { IForm } from './form.js';
4
- import { IGlobal } from './global.js';
5
- import { IHttp } from './http.js';
6
- import { ILoan } from './loan.js';
7
- import { IModule } from './module.js';
8
- import { ISession } from './session.js';
9
- import { ITransaction } from './transaction.js';
10
- import { ITransactionTemplate } from './transactiontemplate.js';
11
1
  export interface IScript {
12
- getObject(name: string): Promise<IAuth | IApplication | IForm | IGlobal | IHttp | ILoan | IModule | ISession | ITransaction | ITransactionTemplate>;
2
+ getObject<T>(name: string): Promise<T>;
13
3
  subscribe(objName: string, eventName: string, listener: () => void | boolean): Promise<void>;
14
4
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@elliemae/pui-scripting-object",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
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
- "typings": "./dist/types/index.d.ts",
8
+ "typings": "./dist/types/lib/index.d.ts",
9
9
  "files": [
10
10
  "dist"
11
11
  ],
@@ -38,8 +38,10 @@
38
38
  "setup": "rimraf -r node_modules && rimraf pnpm-lock.yaml && pnpm i",
39
39
  "test": "pui-cli test -p",
40
40
  "test:fix": "pui-cli test -f",
41
- "test:watch": "jest watch",
41
+ "test:watch": "jest --watch",
42
+ "test:debug": "pui-cli test --debug",
42
43
  "test:staged": "jest --coverage --passWithNoTests --bail --findRelatedTests",
44
+ "tscheck": "pui-cli tscheck --files",
43
45
  "upgrade": "ncu -u && npm run setup",
44
46
  "prepare": "husky install"
45
47
  },
@@ -50,11 +52,11 @@
50
52
  "sonar56x": true
51
53
  },
52
54
  "devDependencies": {
53
- "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.4.2",
54
- "@elliemae/pui-cli": "6.19.0",
55
- "@types/styled-components": "~5.1.25",
55
+ "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.5.0",
56
+ "@elliemae/pui-cli": "7.0.0",
57
+ "@types/styled-components": "~5.1.26",
56
58
  "redux": "~4.2.0",
57
- "redux-saga": "~1.1.3",
59
+ "redux-saga": "~1.2.0",
58
60
  "styled-components": "~5.3.5"
59
61
  },
60
62
  "peerDependencies": {}