@onhand-bi/sdk 0.1.12 → 0.1.14
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 +1 -0
- package/controllers/client.d.ts +18 -1
- package/core/storage/base-storage.d.ts +6 -0
- package/core/storage/cookie-storage.d.ts +7 -0
- package/core/storage/local-storage.d.ts +7 -0
- package/core/token-manager/base-token-manager.d.ts +1 -0
- package/core/token-manager/internal-token-manager.d.ts +3 -1
- package/core/token-manager/microsoft-token-manager.d.ts +10 -0
- package/index.js +1 -1
- package/index.node.js +1 -1
- package/models/cclient.d.ts +12 -1
- package/package.json +1 -1
- package/services/cclient.d.ts +4 -3
package/models/cclient.d.ts
CHANGED
|
@@ -13,7 +13,18 @@ export type Token = {
|
|
|
13
13
|
user_id: string;
|
|
14
14
|
time: number;
|
|
15
15
|
};
|
|
16
|
-
export type
|
|
16
|
+
export type TokenResponse = {
|
|
17
17
|
access_token: string;
|
|
18
18
|
refresh_token: string;
|
|
19
|
+
expires_in: number;
|
|
20
|
+
refresh_expires_in: number;
|
|
21
|
+
token_type: string;
|
|
22
|
+
'not-before-policy': number;
|
|
23
|
+
session_state: string;
|
|
24
|
+
scope: string;
|
|
19
25
|
};
|
|
26
|
+
export type TokenExchangeRequest = {
|
|
27
|
+
issuer: 'microsoft';
|
|
28
|
+
token: string;
|
|
29
|
+
};
|
|
30
|
+
export type IssuerType = 'microsoft' | 'keycloak';
|
package/package.json
CHANGED
package/services/cclient.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { CClientCredential, WithMessage, ReportModel, CClientGetTokenResponse,
|
|
1
|
+
import { CClientCredential, WithMessage, ReportModel, CClientGetTokenResponse, TokenResponse } from '../models';
|
|
2
2
|
export declare class CClientService {
|
|
3
3
|
static getAccessToken(credential: CClientCredential): Promise<string>;
|
|
4
4
|
static getReports(token: string): Promise<WithMessage<ReportModel[]>>;
|
|
5
5
|
static getReportAccessToken(token: string, email: string): Promise<WithMessage<CClientGetTokenResponse>>;
|
|
6
|
-
static
|
|
7
|
-
static
|
|
6
|
+
static exchangeToken(issuer: 'microsoft', token: string): Promise<TokenResponse>;
|
|
7
|
+
static getPermissionToken(realm: string, token: string): Promise<TokenResponse>;
|
|
8
|
+
static refreshToken(realm: string, token: string): Promise<TokenResponse>;
|
|
8
9
|
}
|