@equisoft/account-service-sdk-typescript 9.6.1-snapshot.20250610182740 → 9.6.1-snapshot.20250612170000
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/.openapi-generator/FILES +2 -0
- package/dist/apis/SessionApi.d.ts +23 -1
- package/dist/apis/SessionApi.js +74 -0
- package/dist/esm/apis/SessionApi.d.ts +23 -1
- package/dist/esm/apis/SessionApi.js +75 -1
- package/dist/esm/models/SearchSessionResult.d.ts +103 -0
- package/dist/esm/models/SearchSessionResult.js +84 -0
- package/dist/esm/models/SearchSessionResults.d.ts +33 -0
- package/dist/esm/models/SearchSessionResults.js +44 -0
- package/dist/esm/models/SessionPayload.d.ts +2 -2
- package/dist/esm/models/SessionPayload.js +3 -1
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/SearchSessionResult.d.ts +103 -0
- package/dist/models/SearchSessionResult.js +91 -0
- package/dist/models/SearchSessionResults.d.ts +33 -0
- package/dist/models/SearchSessionResults.js +51 -0
- package/dist/models/SessionPayload.d.ts +2 -2
- package/dist/models/SessionPayload.js +3 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
- package/src/apis/SessionApi.ts +98 -0
- package/src/models/SearchSessionResult.ts +186 -0
- package/src/models/SearchSessionResults.ts +74 -0
- package/src/models/SessionPayload.ts +4 -3
- package/src/models/index.ts +2 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User account and session management
|
|
3
|
+
* Provides HTTP endpoints to manage User Accounts and User Sessions.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 9.6.1-SNAPSHOT
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { SessionState } from './SessionState';
|
|
13
|
+
import type { User } from './User';
|
|
14
|
+
import type { SsoProvider } from './SsoProvider';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface SearchSessionResult
|
|
19
|
+
*/
|
|
20
|
+
export interface SearchSessionResult {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof SearchSessionResult
|
|
25
|
+
*/
|
|
26
|
+
uuid: string;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {SessionState}
|
|
30
|
+
* @memberof SearchSessionResult
|
|
31
|
+
*/
|
|
32
|
+
state: SessionState;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {Date}
|
|
36
|
+
* @memberof SearchSessionResult
|
|
37
|
+
*/
|
|
38
|
+
created: Date;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {Date}
|
|
42
|
+
* @memberof SearchSessionResult
|
|
43
|
+
*/
|
|
44
|
+
suspend: Date;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {Date}
|
|
48
|
+
* @memberof SearchSessionResult
|
|
49
|
+
*/
|
|
50
|
+
expire: Date;
|
|
51
|
+
/**
|
|
52
|
+
* Indicate the domain name the session cookie was emitted for.
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof SearchSessionResult
|
|
55
|
+
*/
|
|
56
|
+
cookieDomain: string;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {User}
|
|
60
|
+
* @memberof SearchSessionResult
|
|
61
|
+
*/
|
|
62
|
+
user: User;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {User}
|
|
66
|
+
* @memberof SearchSessionResult
|
|
67
|
+
*/
|
|
68
|
+
actor?: User | null;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {SsoProvider}
|
|
72
|
+
* @memberof SearchSessionResult
|
|
73
|
+
*/
|
|
74
|
+
sso?: SsoProvider | null;
|
|
75
|
+
/**
|
|
76
|
+
* Session is enabled for Equisoft/Connect and is accounted for concurrent access.
|
|
77
|
+
* @type {boolean}
|
|
78
|
+
* @memberof SearchSessionResult
|
|
79
|
+
*/
|
|
80
|
+
enabledForEquisoftConnect: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Indicate that the session is initiated from a mobile device.
|
|
83
|
+
* @type {boolean}
|
|
84
|
+
* @memberof SearchSessionResult
|
|
85
|
+
*/
|
|
86
|
+
mobile: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Claims and assertions received from an external source (SSO).
|
|
89
|
+
* @type {{ [key: string]: string; }}
|
|
90
|
+
* @memberof SearchSessionResult
|
|
91
|
+
*/
|
|
92
|
+
externalClaims?: {
|
|
93
|
+
[key: string]: string;
|
|
94
|
+
} | null;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Check if a given object implements the SearchSessionResult interface.
|
|
98
|
+
*/
|
|
99
|
+
export declare function instanceOfSearchSessionResult(value: object): value is SearchSessionResult;
|
|
100
|
+
export declare function SearchSessionResultFromJSON(json: any): SearchSessionResult;
|
|
101
|
+
export declare function SearchSessionResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchSessionResult;
|
|
102
|
+
export declare function SearchSessionResultToJSON(json: any): SearchSessionResult;
|
|
103
|
+
export declare function SearchSessionResultToJSONTyped(value?: SearchSessionResult | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* User account and session management
|
|
6
|
+
* Provides HTTP endpoints to manage User Accounts and User Sessions.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 9.6.1-SNAPSHOT
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfSearchSessionResult = instanceOfSearchSessionResult;
|
|
17
|
+
exports.SearchSessionResultFromJSON = SearchSessionResultFromJSON;
|
|
18
|
+
exports.SearchSessionResultFromJSONTyped = SearchSessionResultFromJSONTyped;
|
|
19
|
+
exports.SearchSessionResultToJSON = SearchSessionResultToJSON;
|
|
20
|
+
exports.SearchSessionResultToJSONTyped = SearchSessionResultToJSONTyped;
|
|
21
|
+
const SessionState_1 = require("./SessionState");
|
|
22
|
+
const User_1 = require("./User");
|
|
23
|
+
const SsoProvider_1 = require("./SsoProvider");
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the SearchSessionResult interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfSearchSessionResult(value) {
|
|
28
|
+
if (!('uuid' in value) || value['uuid'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('state' in value) || value['state'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('created' in value) || value['created'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('suspend' in value) || value['suspend'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('expire' in value) || value['expire'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('cookieDomain' in value) || value['cookieDomain'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('user' in value) || value['user'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('enabledForEquisoftConnect' in value) || value['enabledForEquisoftConnect'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('mobile' in value) || value['mobile'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
function SearchSessionResultFromJSON(json) {
|
|
49
|
+
return SearchSessionResultFromJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function SearchSessionResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
52
|
+
if (json == null) {
|
|
53
|
+
return json;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'uuid': json['uuid'],
|
|
57
|
+
'state': (0, SessionState_1.SessionStateFromJSON)(json['state']),
|
|
58
|
+
'created': (new Date(json['created'])),
|
|
59
|
+
'suspend': (new Date(json['suspend'])),
|
|
60
|
+
'expire': (new Date(json['expire'])),
|
|
61
|
+
'cookieDomain': json['cookieDomain'],
|
|
62
|
+
'user': (0, User_1.UserFromJSON)(json['user']),
|
|
63
|
+
'actor': json['actor'] == null ? undefined : (0, User_1.UserFromJSON)(json['actor']),
|
|
64
|
+
'sso': json['sso'] == null ? undefined : (0, SsoProvider_1.SsoProviderFromJSON)(json['sso']),
|
|
65
|
+
'enabledForEquisoftConnect': json['enabledForEquisoftConnect'],
|
|
66
|
+
'mobile': json['mobile'],
|
|
67
|
+
'externalClaims': json['externalClaims'] == null ? undefined : json['externalClaims'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function SearchSessionResultToJSON(json) {
|
|
71
|
+
return SearchSessionResultToJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
function SearchSessionResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
74
|
+
if (value == null) {
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
'uuid': value['uuid'],
|
|
79
|
+
'state': (0, SessionState_1.SessionStateToJSON)(value['state']),
|
|
80
|
+
'created': ((value['created']).toISOString()),
|
|
81
|
+
'suspend': ((value['suspend']).toISOString()),
|
|
82
|
+
'expire': ((value['expire']).toISOString()),
|
|
83
|
+
'cookieDomain': value['cookieDomain'],
|
|
84
|
+
'user': (0, User_1.UserToJSON)(value['user']),
|
|
85
|
+
'actor': (0, User_1.UserToJSON)(value['actor']),
|
|
86
|
+
'sso': (0, SsoProvider_1.SsoProviderToJSON)(value['sso']),
|
|
87
|
+
'enabledForEquisoftConnect': value['enabledForEquisoftConnect'],
|
|
88
|
+
'mobile': value['mobile'],
|
|
89
|
+
'externalClaims': value['externalClaims'],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User account and session management
|
|
3
|
+
* Provides HTTP endpoints to manage User Accounts and User Sessions.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 9.6.1-SNAPSHOT
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { SearchSessionResult } from './SearchSessionResult';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SearchSessionResults
|
|
17
|
+
*/
|
|
18
|
+
export interface SearchSessionResults {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<SearchSessionResult>}
|
|
22
|
+
* @memberof SearchSessionResults
|
|
23
|
+
*/
|
|
24
|
+
sessions: Array<SearchSessionResult>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the SearchSessionResults interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfSearchSessionResults(value: object): value is SearchSessionResults;
|
|
30
|
+
export declare function SearchSessionResultsFromJSON(json: any): SearchSessionResults;
|
|
31
|
+
export declare function SearchSessionResultsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchSessionResults;
|
|
32
|
+
export declare function SearchSessionResultsToJSON(json: any): SearchSessionResults;
|
|
33
|
+
export declare function SearchSessionResultsToJSONTyped(value?: SearchSessionResults | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* User account and session management
|
|
6
|
+
* Provides HTTP endpoints to manage User Accounts and User Sessions.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 9.6.1-SNAPSHOT
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfSearchSessionResults = instanceOfSearchSessionResults;
|
|
17
|
+
exports.SearchSessionResultsFromJSON = SearchSessionResultsFromJSON;
|
|
18
|
+
exports.SearchSessionResultsFromJSONTyped = SearchSessionResultsFromJSONTyped;
|
|
19
|
+
exports.SearchSessionResultsToJSON = SearchSessionResultsToJSON;
|
|
20
|
+
exports.SearchSessionResultsToJSONTyped = SearchSessionResultsToJSONTyped;
|
|
21
|
+
const SearchSessionResult_1 = require("./SearchSessionResult");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the SearchSessionResults interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfSearchSessionResults(value) {
|
|
26
|
+
if (!('sessions' in value) || value['sessions'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function SearchSessionResultsFromJSON(json) {
|
|
31
|
+
return SearchSessionResultsFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function SearchSessionResultsFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'sessions': (json['sessions'].map(SearchSessionResult_1.SearchSessionResultFromJSON)),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function SearchSessionResultsToJSON(json) {
|
|
42
|
+
return SearchSessionResultsToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function SearchSessionResultsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'sessions': (value['sessions'].map(SearchSessionResult_1.SearchSessionResultToJSON)),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -47,11 +47,11 @@ export interface SessionPayload {
|
|
|
47
47
|
*/
|
|
48
48
|
mobileDevice?: boolean | null;
|
|
49
49
|
/**
|
|
50
|
-
* Indicate the domain name the session cookie was emitted for.
|
|
50
|
+
* Indicate the domain name the session cookie was emitted for.
|
|
51
51
|
* @type {string}
|
|
52
52
|
* @memberof SessionPayload
|
|
53
53
|
*/
|
|
54
|
-
cookieDomain
|
|
54
|
+
cookieDomain: string;
|
|
55
55
|
/**
|
|
56
56
|
* Claims and assertions received from an external source (SSO).
|
|
57
57
|
* @type {{ [key: string]: string; }}
|
|
@@ -27,6 +27,8 @@ function instanceOfSessionPayload(value) {
|
|
|
27
27
|
return false;
|
|
28
28
|
if (!('enable' in value) || value['enable'] === undefined)
|
|
29
29
|
return false;
|
|
30
|
+
if (!('cookieDomain' in value) || value['cookieDomain'] === undefined)
|
|
31
|
+
return false;
|
|
30
32
|
return true;
|
|
31
33
|
}
|
|
32
34
|
function SessionPayloadFromJSON(json) {
|
|
@@ -42,7 +44,7 @@ function SessionPayloadFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
44
|
'sso': json['sso'] == null ? undefined : (0, SsoProvider_1.SsoProviderFromJSON)(json['sso']),
|
|
43
45
|
'publicComputer': json['publicComputer'] == null ? undefined : json['publicComputer'],
|
|
44
46
|
'mobileDevice': json['mobileDevice'] == null ? undefined : json['mobileDevice'],
|
|
45
|
-
'cookieDomain': json['cookieDomain']
|
|
47
|
+
'cookieDomain': json['cookieDomain'],
|
|
46
48
|
'externalClaims': json['externalClaims'] == null ? undefined : json['externalClaims'],
|
|
47
49
|
};
|
|
48
50
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ export * from './PermissionResourceType';
|
|
|
43
43
|
export * from './Role';
|
|
44
44
|
export * from './RoleCreated';
|
|
45
45
|
export * from './RolesOnOrganization';
|
|
46
|
+
export * from './SearchSessionResult';
|
|
47
|
+
export * from './SearchSessionResults';
|
|
46
48
|
export * from './SendResetPasswordLinkPayload';
|
|
47
49
|
export * from './SendSignupInvitationPayload';
|
|
48
50
|
export * from './ServiceAccountCreationSchema';
|
package/dist/models/index.js
CHANGED
|
@@ -61,6 +61,8 @@ __exportStar(require("./PermissionResourceType"), exports);
|
|
|
61
61
|
__exportStar(require("./Role"), exports);
|
|
62
62
|
__exportStar(require("./RoleCreated"), exports);
|
|
63
63
|
__exportStar(require("./RolesOnOrganization"), exports);
|
|
64
|
+
__exportStar(require("./SearchSessionResult"), exports);
|
|
65
|
+
__exportStar(require("./SearchSessionResults"), exports);
|
|
64
66
|
__exportStar(require("./SendResetPasswordLinkPayload"), exports);
|
|
65
67
|
__exportStar(require("./SendSignupInvitationPayload"), exports);
|
|
66
68
|
__exportStar(require("./ServiceAccountCreationSchema"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equisoft/account-service-sdk-typescript",
|
|
3
|
-
"version": "9.6.1-snapshot.
|
|
3
|
+
"version": "9.6.1-snapshot.20250612170000",
|
|
4
4
|
"description": "OpenAPI client for @equisoft/account-service-sdk-typescript",
|
|
5
5
|
"author": "OpenAPI-Generator",
|
|
6
6
|
"repository": {
|
package/src/apis/SessionApi.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
EnableEquisoftConnectPayload,
|
|
19
19
|
ErrorPayload,
|
|
20
20
|
ImpersonatePayload,
|
|
21
|
+
SearchSessionResults,
|
|
21
22
|
Session,
|
|
22
23
|
SessionPayload,
|
|
23
24
|
SsoToken,
|
|
@@ -29,6 +30,8 @@ import {
|
|
|
29
30
|
ErrorPayloadToJSON,
|
|
30
31
|
ImpersonatePayloadFromJSON,
|
|
31
32
|
ImpersonatePayloadToJSON,
|
|
33
|
+
SearchSessionResultsFromJSON,
|
|
34
|
+
SearchSessionResultsToJSON,
|
|
32
35
|
SessionFromJSON,
|
|
33
36
|
SessionToJSON,
|
|
34
37
|
SessionPayloadFromJSON,
|
|
@@ -75,10 +78,18 @@ export interface ImpersonateRequest {
|
|
|
75
78
|
impersonatePayload: ImpersonatePayload;
|
|
76
79
|
}
|
|
77
80
|
|
|
81
|
+
export interface KeepAliveRequest {
|
|
82
|
+
uuid: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
78
85
|
export interface RevertIdentityRequest {
|
|
79
86
|
uuid: string;
|
|
80
87
|
}
|
|
81
88
|
|
|
89
|
+
export interface SearchSessionsRequest {
|
|
90
|
+
uuid: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
82
93
|
export interface SetSessionSsoTokenRequest {
|
|
83
94
|
uuid: string;
|
|
84
95
|
tokenId: string;
|
|
@@ -536,6 +547,47 @@ export class SessionApi extends runtime.BaseAPI {
|
|
|
536
547
|
return await response.value();
|
|
537
548
|
}
|
|
538
549
|
|
|
550
|
+
/**
|
|
551
|
+
* Keep a session from expiring from inactivity.
|
|
552
|
+
*/
|
|
553
|
+
async keepAliveRaw(requestParameters: KeepAliveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
554
|
+
if (requestParameters['uuid'] == null) {
|
|
555
|
+
throw new runtime.RequiredError(
|
|
556
|
+
'uuid',
|
|
557
|
+
'Required parameter "uuid" was null or undefined when calling keepAlive().'
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
const queryParameters: any = {};
|
|
562
|
+
|
|
563
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
564
|
+
|
|
565
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
566
|
+
// oauth required
|
|
567
|
+
const token = this.configuration.accessToken;
|
|
568
|
+
const tokenString = await token("OAuth2", ["account:session"]);
|
|
569
|
+
if (tokenString) {
|
|
570
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
const response = await this.request({
|
|
575
|
+
path: `/sessions/{uuid}/keepAlive`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
576
|
+
method: 'POST',
|
|
577
|
+
headers: headerParameters,
|
|
578
|
+
query: queryParameters,
|
|
579
|
+
}, initOverrides);
|
|
580
|
+
|
|
581
|
+
return new runtime.VoidApiResponse(response);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Keep a session from expiring from inactivity.
|
|
586
|
+
*/
|
|
587
|
+
async keepAlive(requestParameters: KeepAliveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
588
|
+
await this.keepAliveRaw(requestParameters, initOverrides);
|
|
589
|
+
}
|
|
590
|
+
|
|
539
591
|
/**
|
|
540
592
|
* Revert an impersonated session to the context of the \"admin\" user who initiated the impersonation.
|
|
541
593
|
*/
|
|
@@ -578,6 +630,52 @@ export class SessionApi extends runtime.BaseAPI {
|
|
|
578
630
|
return await response.value();
|
|
579
631
|
}
|
|
580
632
|
|
|
633
|
+
/**
|
|
634
|
+
* Search for sessions corresponding to given criteria.
|
|
635
|
+
*/
|
|
636
|
+
async searchSessionsRaw(requestParameters: SearchSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SearchSessionResults>> {
|
|
637
|
+
if (requestParameters['uuid'] == null) {
|
|
638
|
+
throw new runtime.RequiredError(
|
|
639
|
+
'uuid',
|
|
640
|
+
'Required parameter "uuid" was null or undefined when calling searchSessions().'
|
|
641
|
+
);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
const queryParameters: any = {};
|
|
645
|
+
|
|
646
|
+
if (requestParameters['uuid'] != null) {
|
|
647
|
+
queryParameters['uuid'] = requestParameters['uuid'];
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
651
|
+
|
|
652
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
653
|
+
// oauth required
|
|
654
|
+
const token = this.configuration.accessToken;
|
|
655
|
+
const tokenString = await token("OAuth2", []);
|
|
656
|
+
if (tokenString) {
|
|
657
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
const response = await this.request({
|
|
662
|
+
path: `/sessions`,
|
|
663
|
+
method: 'GET',
|
|
664
|
+
headers: headerParameters,
|
|
665
|
+
query: queryParameters,
|
|
666
|
+
}, initOverrides);
|
|
667
|
+
|
|
668
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SearchSessionResultsFromJSON(jsonValue));
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* Search for sessions corresponding to given criteria.
|
|
673
|
+
*/
|
|
674
|
+
async searchSessions(requestParameters: SearchSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SearchSessionResults> {
|
|
675
|
+
const response = await this.searchSessionsRaw(requestParameters, initOverrides);
|
|
676
|
+
return await response.value();
|
|
677
|
+
}
|
|
678
|
+
|
|
581
679
|
/**
|
|
582
680
|
* Store a sso token for the session for a given id/name/type
|
|
583
681
|
*/
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* User account and session management
|
|
5
|
+
* Provides HTTP endpoints to manage User Accounts and User Sessions.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 9.6.1-SNAPSHOT
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { SessionState } from './SessionState';
|
|
17
|
+
import {
|
|
18
|
+
SessionStateFromJSON,
|
|
19
|
+
SessionStateFromJSONTyped,
|
|
20
|
+
SessionStateToJSON,
|
|
21
|
+
SessionStateToJSONTyped,
|
|
22
|
+
} from './SessionState';
|
|
23
|
+
import type { User } from './User';
|
|
24
|
+
import {
|
|
25
|
+
UserFromJSON,
|
|
26
|
+
UserFromJSONTyped,
|
|
27
|
+
UserToJSON,
|
|
28
|
+
UserToJSONTyped,
|
|
29
|
+
} from './User';
|
|
30
|
+
import type { SsoProvider } from './SsoProvider';
|
|
31
|
+
import {
|
|
32
|
+
SsoProviderFromJSON,
|
|
33
|
+
SsoProviderFromJSONTyped,
|
|
34
|
+
SsoProviderToJSON,
|
|
35
|
+
SsoProviderToJSONTyped,
|
|
36
|
+
} from './SsoProvider';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @export
|
|
41
|
+
* @interface SearchSessionResult
|
|
42
|
+
*/
|
|
43
|
+
export interface SearchSessionResult {
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof SearchSessionResult
|
|
48
|
+
*/
|
|
49
|
+
uuid: string;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {SessionState}
|
|
53
|
+
* @memberof SearchSessionResult
|
|
54
|
+
*/
|
|
55
|
+
state: SessionState;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {Date}
|
|
59
|
+
* @memberof SearchSessionResult
|
|
60
|
+
*/
|
|
61
|
+
created: Date;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {Date}
|
|
65
|
+
* @memberof SearchSessionResult
|
|
66
|
+
*/
|
|
67
|
+
suspend: Date;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {Date}
|
|
71
|
+
* @memberof SearchSessionResult
|
|
72
|
+
*/
|
|
73
|
+
expire: Date;
|
|
74
|
+
/**
|
|
75
|
+
* Indicate the domain name the session cookie was emitted for.
|
|
76
|
+
* @type {string}
|
|
77
|
+
* @memberof SearchSessionResult
|
|
78
|
+
*/
|
|
79
|
+
cookieDomain: string;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @type {User}
|
|
83
|
+
* @memberof SearchSessionResult
|
|
84
|
+
*/
|
|
85
|
+
user: User;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @type {User}
|
|
89
|
+
* @memberof SearchSessionResult
|
|
90
|
+
*/
|
|
91
|
+
actor?: User | null;
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @type {SsoProvider}
|
|
95
|
+
* @memberof SearchSessionResult
|
|
96
|
+
*/
|
|
97
|
+
sso?: SsoProvider | null;
|
|
98
|
+
/**
|
|
99
|
+
* Session is enabled for Equisoft/Connect and is accounted for concurrent access.
|
|
100
|
+
* @type {boolean}
|
|
101
|
+
* @memberof SearchSessionResult
|
|
102
|
+
*/
|
|
103
|
+
enabledForEquisoftConnect: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Indicate that the session is initiated from a mobile device.
|
|
106
|
+
* @type {boolean}
|
|
107
|
+
* @memberof SearchSessionResult
|
|
108
|
+
*/
|
|
109
|
+
mobile: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Claims and assertions received from an external source (SSO).
|
|
112
|
+
* @type {{ [key: string]: string; }}
|
|
113
|
+
* @memberof SearchSessionResult
|
|
114
|
+
*/
|
|
115
|
+
externalClaims?: { [key: string]: string; } | null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Check if a given object implements the SearchSessionResult interface.
|
|
122
|
+
*/
|
|
123
|
+
export function instanceOfSearchSessionResult(value: object): value is SearchSessionResult {
|
|
124
|
+
if (!('uuid' in value) || value['uuid'] === undefined) return false;
|
|
125
|
+
if (!('state' in value) || value['state'] === undefined) return false;
|
|
126
|
+
if (!('created' in value) || value['created'] === undefined) return false;
|
|
127
|
+
if (!('suspend' in value) || value['suspend'] === undefined) return false;
|
|
128
|
+
if (!('expire' in value) || value['expire'] === undefined) return false;
|
|
129
|
+
if (!('cookieDomain' in value) || value['cookieDomain'] === undefined) return false;
|
|
130
|
+
if (!('user' in value) || value['user'] === undefined) return false;
|
|
131
|
+
if (!('enabledForEquisoftConnect' in value) || value['enabledForEquisoftConnect'] === undefined) return false;
|
|
132
|
+
if (!('mobile' in value) || value['mobile'] === undefined) return false;
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function SearchSessionResultFromJSON(json: any): SearchSessionResult {
|
|
137
|
+
return SearchSessionResultFromJSONTyped(json, false);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function SearchSessionResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchSessionResult {
|
|
141
|
+
if (json == null) {
|
|
142
|
+
return json;
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
|
|
146
|
+
'uuid': json['uuid'],
|
|
147
|
+
'state': SessionStateFromJSON(json['state']),
|
|
148
|
+
'created': (new Date(json['created'])),
|
|
149
|
+
'suspend': (new Date(json['suspend'])),
|
|
150
|
+
'expire': (new Date(json['expire'])),
|
|
151
|
+
'cookieDomain': json['cookieDomain'],
|
|
152
|
+
'user': UserFromJSON(json['user']),
|
|
153
|
+
'actor': json['actor'] == null ? undefined : UserFromJSON(json['actor']),
|
|
154
|
+
'sso': json['sso'] == null ? undefined : SsoProviderFromJSON(json['sso']),
|
|
155
|
+
'enabledForEquisoftConnect': json['enabledForEquisoftConnect'],
|
|
156
|
+
'mobile': json['mobile'],
|
|
157
|
+
'externalClaims': json['externalClaims'] == null ? undefined : json['externalClaims'],
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function SearchSessionResultToJSON(json: any): SearchSessionResult {
|
|
162
|
+
return SearchSessionResultToJSONTyped(json, false);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export function SearchSessionResultToJSONTyped(value?: SearchSessionResult | null, ignoreDiscriminator: boolean = false): any {
|
|
166
|
+
if (value == null) {
|
|
167
|
+
return value;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return {
|
|
171
|
+
|
|
172
|
+
'uuid': value['uuid'],
|
|
173
|
+
'state': SessionStateToJSON(value['state']),
|
|
174
|
+
'created': ((value['created']).toISOString()),
|
|
175
|
+
'suspend': ((value['suspend']).toISOString()),
|
|
176
|
+
'expire': ((value['expire']).toISOString()),
|
|
177
|
+
'cookieDomain': value['cookieDomain'],
|
|
178
|
+
'user': UserToJSON(value['user']),
|
|
179
|
+
'actor': UserToJSON(value['actor']),
|
|
180
|
+
'sso': SsoProviderToJSON(value['sso']),
|
|
181
|
+
'enabledForEquisoftConnect': value['enabledForEquisoftConnect'],
|
|
182
|
+
'mobile': value['mobile'],
|
|
183
|
+
'externalClaims': value['externalClaims'],
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|