squarecommonblhelper 1.8.0 → 2.0.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/README.md +4 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/example.js +1 -8
- package/package.json +1 -1
- package/dist/utils.d.ts +0 -10
- package/dist/utils.js +0 -17
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/example.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GreetingCommonBL,
|
|
3
|
-
UtilsCommonBL,
|
|
4
|
-
AuthenticationCommonBL,
|
|
5
|
-
} from "./dist/index.js";
|
|
1
|
+
import { GreetingCommonBL, AuthenticationCommonBL } from "./dist/index.js";
|
|
6
2
|
|
|
7
3
|
let greetingCommonBL = new GreetingCommonBL();
|
|
8
4
|
console.log(await greetingCommonBL.createGreetingV0(true));
|
|
9
5
|
|
|
10
|
-
let utilsCommonBL = new UtilsCommonBL();
|
|
11
|
-
console.log(await utilsCommonBL.getAppIdV0("test"));
|
|
12
|
-
|
|
13
6
|
let authenticationCommonBL = new AuthenticationCommonBL();
|
|
14
7
|
console.log(
|
|
15
8
|
await authenticationCommonBL.generateAccessTokenV0("dummy_refresh_token")
|
package/package.json
CHANGED
package/dist/utils.d.ts
DELETED
package/dist/utils.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { fetchJSONData } from "squarecommons";
|
|
2
|
-
class UtilsCommonBL {
|
|
3
|
-
commonBLBaseURL;
|
|
4
|
-
constructor(commonBLBaseURL = "http://localhost:10110") {
|
|
5
|
-
this.commonBLBaseURL = commonBLBaseURL;
|
|
6
|
-
}
|
|
7
|
-
async getAppIdV0(appName) {
|
|
8
|
-
try {
|
|
9
|
-
const data = await fetchJSONData(this.commonBLBaseURL, "get_app_id/v0", "GET", undefined, undefined, { app_name: appName });
|
|
10
|
-
return data;
|
|
11
|
-
}
|
|
12
|
-
catch (error) {
|
|
13
|
-
throw error;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export { UtilsCommonBL };
|