@equisoft/account-service-sdk-typescript 10.2.1-snapshot.20251028170339 → 10.2.1-snapshot.20251028194403
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 +1 -0
- package/dist/apis/OAuthApi.d.ts +12 -1
- package/dist/apis/OAuthApi.js +38 -0
- package/dist/esm/apis/OAuthApi.d.ts +12 -1
- package/dist/esm/apis/OAuthApi.js +39 -1
- package/dist/esm/models/CreateOAuthClientPayload.d.ts +56 -0
- package/dist/esm/models/CreateOAuthClientPayload.js +59 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/CreateOAuthClientPayload.d.ts +56 -0
- package/dist/models/CreateOAuthClientPayload.js +66 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/OAuthApi.ts +52 -0
- package/src/models/CreateOAuthClientPayload.ts +102 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -14,6 +14,7 @@ src/index.ts
|
|
|
14
14
|
src/models/AddOAuthClientSecretPayload.ts
|
|
15
15
|
src/models/ApplyPermissionsPayload.ts
|
|
16
16
|
src/models/AuthenticationUserAccount.ts
|
|
17
|
+
src/models/CreateOAuthClientPayload.ts
|
|
17
18
|
src/models/CreateOrUpdateOrganizationPayload.ts
|
|
18
19
|
src/models/CreateOrUpdatePermissionPayload.ts
|
|
19
20
|
src/models/CreateOrganizationPayload.ts
|
package/dist/apis/OAuthApi.d.ts
CHANGED
|
@@ -10,11 +10,14 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AddOAuthClientSecretPayload, OAuthClient, OAuthClientListItem, OAuthClientLoginPayload, OAuthClientUpdated, UpdateOAuthClientPayload } from '../models/index';
|
|
13
|
+
import type { AddOAuthClientSecretPayload, CreateOAuthClientPayload, OAuthClient, OAuthClientListItem, OAuthClientLoginPayload, OAuthClientUpdated, UpdateOAuthClientPayload } from '../models/index';
|
|
14
14
|
export interface AddOAuthClientSecretRequest {
|
|
15
15
|
clientId: string;
|
|
16
16
|
addOAuthClientSecretPayload: AddOAuthClientSecretPayload;
|
|
17
17
|
}
|
|
18
|
+
export interface CreateOAuthClientRequest {
|
|
19
|
+
createOAuthClientPayload: CreateOAuthClientPayload;
|
|
20
|
+
}
|
|
18
21
|
export interface DeleteOAuthClientRequest {
|
|
19
22
|
clientId: string;
|
|
20
23
|
}
|
|
@@ -48,6 +51,14 @@ export declare class OAuthApi extends runtime.BaseAPI {
|
|
|
48
51
|
* Add a secret to an OAuth client.
|
|
49
52
|
*/
|
|
50
53
|
addOAuthClientSecret(requestParameters: AddOAuthClientSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthClient>;
|
|
54
|
+
/**
|
|
55
|
+
* Create a new OAuth Client.
|
|
56
|
+
*/
|
|
57
|
+
createOAuthClientRaw(requestParameters: CreateOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthClient>>;
|
|
58
|
+
/**
|
|
59
|
+
* Create a new OAuth Client.
|
|
60
|
+
*/
|
|
61
|
+
createOAuthClient(requestParameters: CreateOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthClient>;
|
|
51
62
|
/**
|
|
52
63
|
* Delete OAuth client
|
|
53
64
|
*/
|
package/dist/apis/OAuthApi.js
CHANGED
|
@@ -70,6 +70,44 @@ class OAuthApi extends runtime.BaseAPI {
|
|
|
70
70
|
return yield response.value();
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Create a new OAuth Client.
|
|
75
|
+
*/
|
|
76
|
+
createOAuthClientRaw(requestParameters, initOverrides) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
if (requestParameters['createOAuthClientPayload'] == null) {
|
|
79
|
+
throw new runtime.RequiredError('createOAuthClientPayload', 'Required parameter "createOAuthClientPayload" was null or undefined when calling createOAuthClient().');
|
|
80
|
+
}
|
|
81
|
+
const queryParameters = {};
|
|
82
|
+
const headerParameters = {};
|
|
83
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
84
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
85
|
+
// oauth required
|
|
86
|
+
const token = this.configuration.accessToken;
|
|
87
|
+
const tokenString = yield token("OAuth2", ["account:oauthClient"]);
|
|
88
|
+
if (tokenString) {
|
|
89
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const response = yield this.request({
|
|
93
|
+
path: `/oauthClients`,
|
|
94
|
+
method: 'POST',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
body: (0, index_1.CreateOAuthClientPayloadToJSON)(requestParameters['createOAuthClientPayload']),
|
|
98
|
+
}, initOverrides);
|
|
99
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OAuthClientFromJSON)(jsonValue));
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Create a new OAuth Client.
|
|
104
|
+
*/
|
|
105
|
+
createOAuthClient(requestParameters, initOverrides) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
const response = yield this.createOAuthClientRaw(requestParameters, initOverrides);
|
|
108
|
+
return yield response.value();
|
|
109
|
+
});
|
|
110
|
+
}
|
|
73
111
|
/**
|
|
74
112
|
* Delete OAuth client
|
|
75
113
|
*/
|
|
@@ -10,11 +10,14 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AddOAuthClientSecretPayload, OAuthClient, OAuthClientListItem, OAuthClientLoginPayload, OAuthClientUpdated, UpdateOAuthClientPayload } from '../models/index';
|
|
13
|
+
import type { AddOAuthClientSecretPayload, CreateOAuthClientPayload, OAuthClient, OAuthClientListItem, OAuthClientLoginPayload, OAuthClientUpdated, UpdateOAuthClientPayload } from '../models/index';
|
|
14
14
|
export interface AddOAuthClientSecretRequest {
|
|
15
15
|
clientId: string;
|
|
16
16
|
addOAuthClientSecretPayload: AddOAuthClientSecretPayload;
|
|
17
17
|
}
|
|
18
|
+
export interface CreateOAuthClientRequest {
|
|
19
|
+
createOAuthClientPayload: CreateOAuthClientPayload;
|
|
20
|
+
}
|
|
18
21
|
export interface DeleteOAuthClientRequest {
|
|
19
22
|
clientId: string;
|
|
20
23
|
}
|
|
@@ -48,6 +51,14 @@ export declare class OAuthApi extends runtime.BaseAPI {
|
|
|
48
51
|
* Add a secret to an OAuth client.
|
|
49
52
|
*/
|
|
50
53
|
addOAuthClientSecret(requestParameters: AddOAuthClientSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthClient>;
|
|
54
|
+
/**
|
|
55
|
+
* Create a new OAuth Client.
|
|
56
|
+
*/
|
|
57
|
+
createOAuthClientRaw(requestParameters: CreateOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthClient>>;
|
|
58
|
+
/**
|
|
59
|
+
* Create a new OAuth Client.
|
|
60
|
+
*/
|
|
61
|
+
createOAuthClient(requestParameters: CreateOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthClient>;
|
|
51
62
|
/**
|
|
52
63
|
* Delete OAuth client
|
|
53
64
|
*/
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { AddOAuthClientSecretPayloadToJSON, OAuthClientFromJSON, OAuthClientListItemFromJSON, OAuthClientLoginPayloadToJSON, OAuthClientUpdatedFromJSON, UpdateOAuthClientPayloadToJSON, } from '../models/index';
|
|
24
|
+
import { AddOAuthClientSecretPayloadToJSON, CreateOAuthClientPayloadToJSON, OAuthClientFromJSON, OAuthClientListItemFromJSON, OAuthClientLoginPayloadToJSON, OAuthClientUpdatedFromJSON, UpdateOAuthClientPayloadToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -67,6 +67,44 @@ export class OAuthApi extends runtime.BaseAPI {
|
|
|
67
67
|
return yield response.value();
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Create a new OAuth Client.
|
|
72
|
+
*/
|
|
73
|
+
createOAuthClientRaw(requestParameters, initOverrides) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
if (requestParameters['createOAuthClientPayload'] == null) {
|
|
76
|
+
throw new runtime.RequiredError('createOAuthClientPayload', 'Required parameter "createOAuthClientPayload" was null or undefined when calling createOAuthClient().');
|
|
77
|
+
}
|
|
78
|
+
const queryParameters = {};
|
|
79
|
+
const headerParameters = {};
|
|
80
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
81
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
82
|
+
// oauth required
|
|
83
|
+
const token = this.configuration.accessToken;
|
|
84
|
+
const tokenString = yield token("OAuth2", ["account:oauthClient"]);
|
|
85
|
+
if (tokenString) {
|
|
86
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const response = yield this.request({
|
|
90
|
+
path: `/oauthClients`,
|
|
91
|
+
method: 'POST',
|
|
92
|
+
headers: headerParameters,
|
|
93
|
+
query: queryParameters,
|
|
94
|
+
body: CreateOAuthClientPayloadToJSON(requestParameters['createOAuthClientPayload']),
|
|
95
|
+
}, initOverrides);
|
|
96
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => OAuthClientFromJSON(jsonValue));
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Create a new OAuth Client.
|
|
101
|
+
*/
|
|
102
|
+
createOAuthClient(requestParameters, initOverrides) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
const response = yield this.createOAuthClientRaw(requestParameters, initOverrides);
|
|
105
|
+
return yield response.value();
|
|
106
|
+
});
|
|
107
|
+
}
|
|
70
108
|
/**
|
|
71
109
|
* Delete OAuth client
|
|
72
110
|
*/
|
|
@@ -0,0 +1,56 @@
|
|
|
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: 10.2.2-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
|
+
/**
|
|
13
|
+
* Payload schema for creating a new OAuth client
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CreateOAuthClientPayload
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateOAuthClientPayload {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateOAuthClientPayload
|
|
22
|
+
*/
|
|
23
|
+
displayName: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Array<string>}
|
|
27
|
+
* @memberof CreateOAuthClientPayload
|
|
28
|
+
*/
|
|
29
|
+
redirectUris: Array<string>;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<string>}
|
|
33
|
+
* @memberof CreateOAuthClientPayload
|
|
34
|
+
*/
|
|
35
|
+
grantTypes: Array<string>;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Array<string>}
|
|
39
|
+
* @memberof CreateOAuthClientPayload
|
|
40
|
+
*/
|
|
41
|
+
scopes: Array<string>;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreateOAuthClientPayload
|
|
46
|
+
*/
|
|
47
|
+
ownerOrganizationUuid: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the CreateOAuthClientPayload interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfCreateOAuthClientPayload(value: object): value is CreateOAuthClientPayload;
|
|
53
|
+
export declare function CreateOAuthClientPayloadFromJSON(json: any): CreateOAuthClientPayload;
|
|
54
|
+
export declare function CreateOAuthClientPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateOAuthClientPayload;
|
|
55
|
+
export declare function CreateOAuthClientPayloadToJSON(json: any): CreateOAuthClientPayload;
|
|
56
|
+
export declare function CreateOAuthClientPayloadToJSONTyped(value?: CreateOAuthClientPayload | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,59 @@
|
|
|
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: 10.2.2-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
|
+
* Check if a given object implements the CreateOAuthClientPayload interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfCreateOAuthClientPayload(value) {
|
|
18
|
+
if (!('displayName' in value) || value['displayName'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('redirectUris' in value) || value['redirectUris'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('grantTypes' in value) || value['grantTypes'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('scopes' in value) || value['scopes'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('ownerOrganizationUuid' in value) || value['ownerOrganizationUuid'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
export function CreateOAuthClientPayloadFromJSON(json) {
|
|
31
|
+
return CreateOAuthClientPayloadFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
export function CreateOAuthClientPayloadFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'displayName': json['displayName'],
|
|
39
|
+
'redirectUris': json['redirectUris'],
|
|
40
|
+
'grantTypes': json['grantTypes'],
|
|
41
|
+
'scopes': json['scopes'],
|
|
42
|
+
'ownerOrganizationUuid': json['ownerOrganizationUuid'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function CreateOAuthClientPayloadToJSON(json) {
|
|
46
|
+
return CreateOAuthClientPayloadToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
export function CreateOAuthClientPayloadToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'displayName': value['displayName'],
|
|
54
|
+
'redirectUris': value['redirectUris'],
|
|
55
|
+
'grantTypes': value['grantTypes'],
|
|
56
|
+
'scopes': value['scopes'],
|
|
57
|
+
'ownerOrganizationUuid': value['ownerOrganizationUuid'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './AddOAuthClientSecretPayload';
|
|
2
2
|
export * from './ApplyPermissionsPayload';
|
|
3
3
|
export * from './AuthenticationUserAccount';
|
|
4
|
+
export * from './CreateOAuthClientPayload';
|
|
4
5
|
export * from './CreateOrUpdateOrganizationPayload';
|
|
5
6
|
export * from './CreateOrUpdatePermissionPayload';
|
|
6
7
|
export * from './CreateOrganizationPayload';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export * from './AddOAuthClientSecretPayload';
|
|
4
4
|
export * from './ApplyPermissionsPayload';
|
|
5
5
|
export * from './AuthenticationUserAccount';
|
|
6
|
+
export * from './CreateOAuthClientPayload';
|
|
6
7
|
export * from './CreateOrUpdateOrganizationPayload';
|
|
7
8
|
export * from './CreateOrUpdatePermissionPayload';
|
|
8
9
|
export * from './CreateOrganizationPayload';
|
|
@@ -0,0 +1,56 @@
|
|
|
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: 10.2.2-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
|
+
/**
|
|
13
|
+
* Payload schema for creating a new OAuth client
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CreateOAuthClientPayload
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateOAuthClientPayload {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateOAuthClientPayload
|
|
22
|
+
*/
|
|
23
|
+
displayName: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Array<string>}
|
|
27
|
+
* @memberof CreateOAuthClientPayload
|
|
28
|
+
*/
|
|
29
|
+
redirectUris: Array<string>;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<string>}
|
|
33
|
+
* @memberof CreateOAuthClientPayload
|
|
34
|
+
*/
|
|
35
|
+
grantTypes: Array<string>;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Array<string>}
|
|
39
|
+
* @memberof CreateOAuthClientPayload
|
|
40
|
+
*/
|
|
41
|
+
scopes: Array<string>;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreateOAuthClientPayload
|
|
46
|
+
*/
|
|
47
|
+
ownerOrganizationUuid: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the CreateOAuthClientPayload interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfCreateOAuthClientPayload(value: object): value is CreateOAuthClientPayload;
|
|
53
|
+
export declare function CreateOAuthClientPayloadFromJSON(json: any): CreateOAuthClientPayload;
|
|
54
|
+
export declare function CreateOAuthClientPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateOAuthClientPayload;
|
|
55
|
+
export declare function CreateOAuthClientPayloadToJSON(json: any): CreateOAuthClientPayload;
|
|
56
|
+
export declare function CreateOAuthClientPayloadToJSONTyped(value?: CreateOAuthClientPayload | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,66 @@
|
|
|
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: 10.2.2-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.instanceOfCreateOAuthClientPayload = instanceOfCreateOAuthClientPayload;
|
|
17
|
+
exports.CreateOAuthClientPayloadFromJSON = CreateOAuthClientPayloadFromJSON;
|
|
18
|
+
exports.CreateOAuthClientPayloadFromJSONTyped = CreateOAuthClientPayloadFromJSONTyped;
|
|
19
|
+
exports.CreateOAuthClientPayloadToJSON = CreateOAuthClientPayloadToJSON;
|
|
20
|
+
exports.CreateOAuthClientPayloadToJSONTyped = CreateOAuthClientPayloadToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the CreateOAuthClientPayload interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfCreateOAuthClientPayload(value) {
|
|
25
|
+
if (!('displayName' in value) || value['displayName'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('redirectUris' in value) || value['redirectUris'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('grantTypes' in value) || value['grantTypes'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('scopes' in value) || value['scopes'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('ownerOrganizationUuid' in value) || value['ownerOrganizationUuid'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
function CreateOAuthClientPayloadFromJSON(json) {
|
|
38
|
+
return CreateOAuthClientPayloadFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
function CreateOAuthClientPayloadFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if (json == null) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'displayName': json['displayName'],
|
|
46
|
+
'redirectUris': json['redirectUris'],
|
|
47
|
+
'grantTypes': json['grantTypes'],
|
|
48
|
+
'scopes': json['scopes'],
|
|
49
|
+
'ownerOrganizationUuid': json['ownerOrganizationUuid'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function CreateOAuthClientPayloadToJSON(json) {
|
|
53
|
+
return CreateOAuthClientPayloadToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function CreateOAuthClientPayloadToJSONTyped(value, ignoreDiscriminator = false) {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'displayName': value['displayName'],
|
|
61
|
+
'redirectUris': value['redirectUris'],
|
|
62
|
+
'grantTypes': value['grantTypes'],
|
|
63
|
+
'scopes': value['scopes'],
|
|
64
|
+
'ownerOrganizationUuid': value['ownerOrganizationUuid'],
|
|
65
|
+
};
|
|
66
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './AddOAuthClientSecretPayload';
|
|
2
2
|
export * from './ApplyPermissionsPayload';
|
|
3
3
|
export * from './AuthenticationUserAccount';
|
|
4
|
+
export * from './CreateOAuthClientPayload';
|
|
4
5
|
export * from './CreateOrUpdateOrganizationPayload';
|
|
5
6
|
export * from './CreateOrUpdatePermissionPayload';
|
|
6
7
|
export * from './CreateOrganizationPayload';
|
package/dist/models/index.js
CHANGED
|
@@ -19,6 +19,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
__exportStar(require("./AddOAuthClientSecretPayload"), exports);
|
|
20
20
|
__exportStar(require("./ApplyPermissionsPayload"), exports);
|
|
21
21
|
__exportStar(require("./AuthenticationUserAccount"), exports);
|
|
22
|
+
__exportStar(require("./CreateOAuthClientPayload"), exports);
|
|
22
23
|
__exportStar(require("./CreateOrUpdateOrganizationPayload"), exports);
|
|
23
24
|
__exportStar(require("./CreateOrUpdatePermissionPayload"), exports);
|
|
24
25
|
__exportStar(require("./CreateOrganizationPayload"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equisoft/account-service-sdk-typescript",
|
|
3
|
-
"version": "10.2.1-snapshot.
|
|
3
|
+
"version": "10.2.1-snapshot.20251028194403",
|
|
4
4
|
"description": "OpenAPI client for @equisoft/account-service-sdk-typescript",
|
|
5
5
|
"author": "OpenAPI-Generator",
|
|
6
6
|
"repository": {
|
package/src/apis/OAuthApi.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
AddOAuthClientSecretPayload,
|
|
19
|
+
CreateOAuthClientPayload,
|
|
19
20
|
ErrorPayload,
|
|
20
21
|
OAuthClient,
|
|
21
22
|
OAuthClientListItem,
|
|
@@ -26,6 +27,8 @@ import type {
|
|
|
26
27
|
import {
|
|
27
28
|
AddOAuthClientSecretPayloadFromJSON,
|
|
28
29
|
AddOAuthClientSecretPayloadToJSON,
|
|
30
|
+
CreateOAuthClientPayloadFromJSON,
|
|
31
|
+
CreateOAuthClientPayloadToJSON,
|
|
29
32
|
ErrorPayloadFromJSON,
|
|
30
33
|
ErrorPayloadToJSON,
|
|
31
34
|
OAuthClientFromJSON,
|
|
@@ -45,6 +48,10 @@ export interface AddOAuthClientSecretRequest {
|
|
|
45
48
|
addOAuthClientSecretPayload: AddOAuthClientSecretPayload;
|
|
46
49
|
}
|
|
47
50
|
|
|
51
|
+
export interface CreateOAuthClientRequest {
|
|
52
|
+
createOAuthClientPayload: CreateOAuthClientPayload;
|
|
53
|
+
}
|
|
54
|
+
|
|
48
55
|
export interface DeleteOAuthClientRequest {
|
|
49
56
|
clientId: string;
|
|
50
57
|
}
|
|
@@ -129,6 +136,51 @@ export class OAuthApi extends runtime.BaseAPI {
|
|
|
129
136
|
return await response.value();
|
|
130
137
|
}
|
|
131
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Create a new OAuth Client.
|
|
141
|
+
*/
|
|
142
|
+
async createOAuthClientRaw(requestParameters: CreateOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthClient>> {
|
|
143
|
+
if (requestParameters['createOAuthClientPayload'] == null) {
|
|
144
|
+
throw new runtime.RequiredError(
|
|
145
|
+
'createOAuthClientPayload',
|
|
146
|
+
'Required parameter "createOAuthClientPayload" was null or undefined when calling createOAuthClient().'
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const queryParameters: any = {};
|
|
151
|
+
|
|
152
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
153
|
+
|
|
154
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
155
|
+
|
|
156
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
157
|
+
// oauth required
|
|
158
|
+
const token = this.configuration.accessToken;
|
|
159
|
+
const tokenString = await token("OAuth2", ["account:oauthClient"]);
|
|
160
|
+
if (tokenString) {
|
|
161
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const response = await this.request({
|
|
166
|
+
path: `/oauthClients`,
|
|
167
|
+
method: 'POST',
|
|
168
|
+
headers: headerParameters,
|
|
169
|
+
query: queryParameters,
|
|
170
|
+
body: CreateOAuthClientPayloadToJSON(requestParameters['createOAuthClientPayload']),
|
|
171
|
+
}, initOverrides);
|
|
172
|
+
|
|
173
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => OAuthClientFromJSON(jsonValue));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Create a new OAuth Client.
|
|
178
|
+
*/
|
|
179
|
+
async createOAuthClient(requestParameters: CreateOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthClient> {
|
|
180
|
+
const response = await this.createOAuthClientRaw(requestParameters, initOverrides);
|
|
181
|
+
return await response.value();
|
|
182
|
+
}
|
|
183
|
+
|
|
132
184
|
/**
|
|
133
185
|
* Delete OAuth client
|
|
134
186
|
*/
|
|
@@ -0,0 +1,102 @@
|
|
|
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: 10.2.2-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
|
+
/**
|
|
17
|
+
* Payload schema for creating a new OAuth client
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CreateOAuthClientPayload
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateOAuthClientPayload {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CreateOAuthClientPayload
|
|
26
|
+
*/
|
|
27
|
+
displayName: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {Array<string>}
|
|
31
|
+
* @memberof CreateOAuthClientPayload
|
|
32
|
+
*/
|
|
33
|
+
redirectUris: Array<string>;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {Array<string>}
|
|
37
|
+
* @memberof CreateOAuthClientPayload
|
|
38
|
+
*/
|
|
39
|
+
grantTypes: Array<string>;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {Array<string>}
|
|
43
|
+
* @memberof CreateOAuthClientPayload
|
|
44
|
+
*/
|
|
45
|
+
scopes: Array<string>;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof CreateOAuthClientPayload
|
|
50
|
+
*/
|
|
51
|
+
ownerOrganizationUuid: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the CreateOAuthClientPayload interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfCreateOAuthClientPayload(value: object): value is CreateOAuthClientPayload {
|
|
58
|
+
if (!('displayName' in value) || value['displayName'] === undefined) return false;
|
|
59
|
+
if (!('redirectUris' in value) || value['redirectUris'] === undefined) return false;
|
|
60
|
+
if (!('grantTypes' in value) || value['grantTypes'] === undefined) return false;
|
|
61
|
+
if (!('scopes' in value) || value['scopes'] === undefined) return false;
|
|
62
|
+
if (!('ownerOrganizationUuid' in value) || value['ownerOrganizationUuid'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function CreateOAuthClientPayloadFromJSON(json: any): CreateOAuthClientPayload {
|
|
67
|
+
return CreateOAuthClientPayloadFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function CreateOAuthClientPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateOAuthClientPayload {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'displayName': json['displayName'],
|
|
77
|
+
'redirectUris': json['redirectUris'],
|
|
78
|
+
'grantTypes': json['grantTypes'],
|
|
79
|
+
'scopes': json['scopes'],
|
|
80
|
+
'ownerOrganizationUuid': json['ownerOrganizationUuid'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function CreateOAuthClientPayloadToJSON(json: any): CreateOAuthClientPayload {
|
|
85
|
+
return CreateOAuthClientPayloadToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function CreateOAuthClientPayloadToJSONTyped(value?: CreateOAuthClientPayload | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'displayName': value['displayName'],
|
|
96
|
+
'redirectUris': value['redirectUris'],
|
|
97
|
+
'grantTypes': value['grantTypes'],
|
|
98
|
+
'scopes': value['scopes'],
|
|
99
|
+
'ownerOrganizationUuid': value['ownerOrganizationUuid'],
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export * from './AddOAuthClientSecretPayload';
|
|
4
4
|
export * from './ApplyPermissionsPayload';
|
|
5
5
|
export * from './AuthenticationUserAccount';
|
|
6
|
+
export * from './CreateOAuthClientPayload';
|
|
6
7
|
export * from './CreateOrUpdateOrganizationPayload';
|
|
7
8
|
export * from './CreateOrUpdatePermissionPayload';
|
|
8
9
|
export * from './CreateOrganizationPayload';
|