@onhand-bi/sdk 0.1.4 → 0.1.6
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/constants/api/url.d.ts +4 -1
- package/controllers/client.d.ts +2 -2
- package/core/base-client.d.ts +13 -0
- package/core/cclient.d.ts +9 -14
- package/core/client.d.ts +4 -5
- package/environment.d.ts +3 -0
- package/helpers/response.d.ts +1 -1
- package/index.js +1 -1
- package/index.js.LICENSE.txt +9 -0
- package/index.node.d.ts +2 -0
- package/index.node.js +1 -1
- package/index.node.js.LICENSE.txt +9 -0
- package/models/cclient.d.ts +9 -9
- package/models/client.d.ts +0 -1
- package/package.json +1 -1
- package/services/cclient.d.ts +6 -6
- package/util/index.d.ts +1 -0
|
@@ -13,3 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
|
19
|
+
*
|
|
20
|
+
* @version 0.11.0
|
|
21
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
22
|
+
* @copyright Chen, Yi-Cyuan 2014-2024
|
|
23
|
+
* @license MIT
|
|
24
|
+
*/
|
package/models/cclient.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export type CClientCredential = {
|
|
2
|
-
email: string;
|
|
3
2
|
clientId: string;
|
|
4
|
-
|
|
3
|
+
clientToken: string;
|
|
5
4
|
};
|
|
6
|
-
export type
|
|
7
|
-
|
|
5
|
+
export type WithMessage<T> = {
|
|
6
|
+
message: string;
|
|
7
|
+
data: T;
|
|
8
8
|
};
|
|
9
9
|
export type CClientGetTokenResponse = {
|
|
10
|
-
|
|
11
|
-
expires_in: number;
|
|
12
|
-
token_type: string;
|
|
13
|
-
scope: string;
|
|
14
|
-
not_before_policy: number;
|
|
10
|
+
accessToken: string;
|
|
15
11
|
};
|
|
16
12
|
export type Token = {
|
|
17
13
|
user_id: string;
|
|
18
14
|
time: number;
|
|
19
15
|
};
|
|
16
|
+
export type KeycloakTokenResponse = {
|
|
17
|
+
access_token: string;
|
|
18
|
+
refresh_token: string;
|
|
19
|
+
};
|
package/models/client.d.ts
CHANGED
package/package.json
CHANGED
package/services/cclient.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CClientCredential,
|
|
1
|
+
import { CClientCredential, WithMessage, ReportModel, CClientGetTokenResponse, KeycloakTokenResponse } from '../models';
|
|
2
2
|
export declare class CClientService {
|
|
3
|
-
static
|
|
4
|
-
static
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
static
|
|
3
|
+
static getAccessToken(credential: CClientCredential): Promise<string>;
|
|
4
|
+
static getReports(token: string): Promise<WithMessage<ReportModel[]>>;
|
|
5
|
+
static getReportAccessToken(token: string, email: string): Promise<WithMessage<CClientGetTokenResponse>>;
|
|
6
|
+
static getRpt(realm: string, token: string): Promise<KeycloakTokenResponse>;
|
|
7
|
+
static refreshToken(realm: string, token: string): Promise<KeycloakTokenResponse>;
|
|
8
8
|
}
|
package/util/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const createTokenUrl: (realm: string) => string;
|