@arsedizioni/ars-utils 18.2.332 → 18.2.334
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/clipper.common/common/definitions.d.ts +4 -1
- package/clipper.common/common/services/clipper.service.d.ts +22 -2
- package/core/definitions.d.ts +9 -0
- package/esm2022/clipper.common/common/definitions.mjs +1 -1
- package/esm2022/clipper.common/common/services/clipper.service.mjs +76 -3
- package/esm2022/core/definitions.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +75 -2
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SendToDialogResult } from '@arsedizioni/ars-utils/ui.application';
|
|
2
|
-
import { LoginResult, NameValueItem } from '@arsedizioni/ars-utils/core';
|
|
2
|
+
import { LoginResult, LoginResult2, NameValueItem } from '@arsedizioni/ars-utils/core';
|
|
3
3
|
import { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';
|
|
4
4
|
import { Signal } from '@angular/core';
|
|
5
5
|
export declare enum ClipperSelectionMode {
|
|
@@ -125,6 +125,9 @@ export interface ClipperUserInfo {
|
|
|
125
125
|
export interface ClipperLoginResult extends LoginResult<ClipperUserInfo> {
|
|
126
126
|
settings?: ClipperChannelSettings[] | null;
|
|
127
127
|
}
|
|
128
|
+
export interface ClipperLoginResult2 extends LoginResult2<ClipperUserInfo> {
|
|
129
|
+
settings?: ClipperChannelSettings[] | null;
|
|
130
|
+
}
|
|
128
131
|
export interface ClipperLoginInfo {
|
|
129
132
|
context: ClipperUserInfo;
|
|
130
133
|
complianceContext?: any | null;
|
|
@@ -2,7 +2,7 @@ import { OnDestroy, Signal } from '@angular/core';
|
|
|
2
2
|
import { ApiResult, FolderTree, NameValueItem } from '@arsedizioni/ars-utils/core';
|
|
3
3
|
import { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';
|
|
4
4
|
import { Observable, Subscription } from 'rxjs';
|
|
5
|
-
import { ClipperDashboard, ClipperDocumentInfo, ClipperDocumentStructure, ClipperDocumentUpdateStateParams, ClipperExportDocumentsParams, ClipperLoginInfo, ClipperLoginResult, ClipperModule, ClipperOTPInfo, ClipperQueryArsEventsParams, ClipperQueryArsEventsResult, ClipperReferencesSearchParams, ClipperSearchFacetsResult, ClipperSearchParams, ClipperSearchResult, ClipperSendDocumentsByEmailParams, ClipperTaxonomyParams, ClipperUserLink, ClipperUserSearch } from '../definitions';
|
|
5
|
+
import { ClipperDashboard, ClipperDocumentInfo, ClipperDocumentStructure, ClipperDocumentUpdateStateParams, ClipperExportDocumentsParams, ClipperLoginInfo, ClipperLoginResult, ClipperLoginResult2, ClipperModule, ClipperOTPInfo, ClipperQueryArsEventsParams, ClipperQueryArsEventsResult, ClipperReferencesSearchParams, ClipperSearchFacetsResult, ClipperSearchParams, ClipperSearchResult, ClipperSendDocumentsByEmailParams, ClipperTaxonomyParams, ClipperUserLink, ClipperUserSearch } from '../definitions';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class ClipperService implements OnDestroy {
|
|
8
8
|
private readonly REFRESH_INTERVAL;
|
|
@@ -41,13 +41,19 @@ export declare class ClipperService implements OnDestroy {
|
|
|
41
41
|
*/
|
|
42
42
|
private setToken;
|
|
43
43
|
/**
|
|
44
|
+
* Set JWT tokens
|
|
45
|
+
* @param valur : token
|
|
46
|
+
*/
|
|
47
|
+
private setToken2;
|
|
48
|
+
/**
|
|
44
49
|
* Enable JWT token auto refresh
|
|
45
50
|
*/
|
|
46
51
|
private enableTokenRefresh;
|
|
47
52
|
/**
|
|
48
53
|
* Return current JWT token
|
|
54
|
+
* @param refresh: true to get the refresh token. Default is false.
|
|
49
55
|
*/
|
|
50
|
-
getToken(): string;
|
|
56
|
+
getToken(refresh?: boolean): string;
|
|
51
57
|
/**
|
|
52
58
|
* Perform login
|
|
53
59
|
* @param email: the optioanl email if using OAuth2
|
|
@@ -58,6 +64,16 @@ export declare class ClipperService implements OnDestroy {
|
|
|
58
64
|
* @returns: the login result
|
|
59
65
|
*/
|
|
60
66
|
login(email?: string | null | undefined, password?: string | null | undefined, remember?: boolean | null | undefined, oauth?: LoginOAuthType | null | undefined, oauthAccessToken?: string | null | undefined): Observable<ApiResult<ClipperLoginResult>>;
|
|
67
|
+
/**
|
|
68
|
+
* Perform login
|
|
69
|
+
* @param email: the optioanl email if using OAuth2
|
|
70
|
+
* @parma password: the optional password if using OAuth2
|
|
71
|
+
* @param remember: remember credentials
|
|
72
|
+
* @param oauth: the optional open authentication supported
|
|
73
|
+
* @param oauthAccessToken: the optional OAuth2 access token
|
|
74
|
+
* @returns: the login result
|
|
75
|
+
*/
|
|
76
|
+
login2(email?: string | null | undefined, password?: string | null | undefined, remember?: boolean | null | undefined, oauth?: LoginOAuthType | null | undefined, oauthAccessToken?: string | null | undefined): Observable<ApiResult<ClipperLoginResult2>>;
|
|
61
77
|
/**
|
|
62
78
|
* Perform logout
|
|
63
79
|
*/
|
|
@@ -75,6 +91,10 @@ export declare class ClipperService implements OnDestroy {
|
|
|
75
91
|
*/
|
|
76
92
|
private refresh;
|
|
77
93
|
/**
|
|
94
|
+
* Perform token refresh
|
|
95
|
+
*/
|
|
96
|
+
refresh2(): Observable<void>;
|
|
97
|
+
/**
|
|
78
98
|
* Get a new one time password
|
|
79
99
|
* @param id: the optional repository id
|
|
80
100
|
*/
|
package/core/definitions.d.ts
CHANGED
|
@@ -149,3 +149,12 @@ export interface LoginResult<T> extends ApiResult<boolean> {
|
|
|
149
149
|
context: T;
|
|
150
150
|
token: string;
|
|
151
151
|
}
|
|
152
|
+
export interface TokenInfo {
|
|
153
|
+
token: string;
|
|
154
|
+
expires: Date;
|
|
155
|
+
}
|
|
156
|
+
export interface LoginResult2<T> extends ApiResult<boolean> {
|
|
157
|
+
context: T;
|
|
158
|
+
tokenInfo: TokenInfo;
|
|
159
|
+
refreshTokenInfo: TokenInfo;
|
|
160
|
+
}
|