@equisoft/account-service-sdk-typescript 10.1.1-snapshot.20250929124127 → 10.1.1-snapshot.20251003124210

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.
@@ -33,6 +33,7 @@ src/models/LoginPayload.ts
33
33
  src/models/NewPasswordPayload.ts
34
34
  src/models/OAuthClient.ts
35
35
  src/models/OAuthClientListItem.ts
36
+ src/models/OAuthClientLoginPayload.ts
36
37
  src/models/OAuthClientPublicKey.ts
37
38
  src/models/OAuthClientUpdated.ts
38
39
  src/models/Organization.ts
@@ -10,10 +10,14 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { OAuthClient, OAuthClientListItem, OAuthClientUpdated, UpdateOAuthClientPayload } from '../models/index';
13
+ import type { OAuthClient, OAuthClientListItem, OAuthClientLoginPayload, OAuthClientUpdated, UpdateOAuthClientPayload } from '../models/index';
14
14
  export interface GetOAuthClientRequest {
15
15
  clientId: string;
16
16
  }
17
+ export interface LoginOAuthClientRequest {
18
+ clientId: string;
19
+ oAuthClientLoginPayload: OAuthClientLoginPayload;
20
+ }
17
21
  export interface UpdateOAuthClientRequest {
18
22
  clientId: string;
19
23
  updateOAuthClientPayload: UpdateOAuthClientPayload;
@@ -38,6 +42,14 @@ export declare class OAuthApi extends runtime.BaseAPI {
38
42
  * Get a list of all OAuth Clients.
39
43
  */
40
44
  listOAuthClients(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OAuthClientListItem>>;
45
+ /**
46
+ * OAuth Client login
47
+ */
48
+ loginOAuthClientRaw(requestParameters: LoginOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthClient>>;
49
+ /**
50
+ * OAuth Client login
51
+ */
52
+ loginOAuthClient(requestParameters: LoginOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthClient>;
41
53
  /**
42
54
  * Update an oauth client
43
55
  */
@@ -98,6 +98,47 @@ class OAuthApi extends runtime.BaseAPI {
98
98
  return yield response.value();
99
99
  });
100
100
  }
101
+ /**
102
+ * OAuth Client login
103
+ */
104
+ loginOAuthClientRaw(requestParameters, initOverrides) {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ if (requestParameters['clientId'] == null) {
107
+ throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling loginOAuthClient().');
108
+ }
109
+ if (requestParameters['oAuthClientLoginPayload'] == null) {
110
+ throw new runtime.RequiredError('oAuthClientLoginPayload', 'Required parameter "oAuthClientLoginPayload" was null or undefined when calling loginOAuthClient().');
111
+ }
112
+ const queryParameters = {};
113
+ const headerParameters = {};
114
+ headerParameters['Content-Type'] = 'application/json';
115
+ if (this.configuration && this.configuration.accessToken) {
116
+ // oauth required
117
+ const token = this.configuration.accessToken;
118
+ const tokenString = yield token("OAuth2", []);
119
+ if (tokenString) {
120
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
121
+ }
122
+ }
123
+ const response = yield this.request({
124
+ path: `/oauthClients/{clientId}/login`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters['clientId']))),
125
+ method: 'POST',
126
+ headers: headerParameters,
127
+ query: queryParameters,
128
+ body: (0, index_1.OAuthClientLoginPayloadToJSON)(requestParameters['oAuthClientLoginPayload']),
129
+ }, initOverrides);
130
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OAuthClientFromJSON)(jsonValue));
131
+ });
132
+ }
133
+ /**
134
+ * OAuth Client login
135
+ */
136
+ loginOAuthClient(requestParameters, initOverrides) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ const response = yield this.loginOAuthClientRaw(requestParameters, initOverrides);
139
+ return yield response.value();
140
+ });
141
+ }
101
142
  /**
102
143
  * Update an oauth client
103
144
  */
@@ -10,10 +10,14 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { OAuthClient, OAuthClientListItem, OAuthClientUpdated, UpdateOAuthClientPayload } from '../models/index';
13
+ import type { OAuthClient, OAuthClientListItem, OAuthClientLoginPayload, OAuthClientUpdated, UpdateOAuthClientPayload } from '../models/index';
14
14
  export interface GetOAuthClientRequest {
15
15
  clientId: string;
16
16
  }
17
+ export interface LoginOAuthClientRequest {
18
+ clientId: string;
19
+ oAuthClientLoginPayload: OAuthClientLoginPayload;
20
+ }
17
21
  export interface UpdateOAuthClientRequest {
18
22
  clientId: string;
19
23
  updateOAuthClientPayload: UpdateOAuthClientPayload;
@@ -38,6 +42,14 @@ export declare class OAuthApi extends runtime.BaseAPI {
38
42
  * Get a list of all OAuth Clients.
39
43
  */
40
44
  listOAuthClients(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OAuthClientListItem>>;
45
+ /**
46
+ * OAuth Client login
47
+ */
48
+ loginOAuthClientRaw(requestParameters: LoginOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthClient>>;
49
+ /**
50
+ * OAuth Client login
51
+ */
52
+ loginOAuthClient(requestParameters: LoginOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthClient>;
41
53
  /**
42
54
  * Update an oauth client
43
55
  */
@@ -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 { OAuthClientFromJSON, OAuthClientListItemFromJSON, OAuthClientUpdatedFromJSON, UpdateOAuthClientPayloadToJSON, } from '../models/index';
24
+ import { OAuthClientFromJSON, OAuthClientListItemFromJSON, OAuthClientLoginPayloadToJSON, OAuthClientUpdatedFromJSON, UpdateOAuthClientPayloadToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -95,6 +95,47 @@ export class OAuthApi extends runtime.BaseAPI {
95
95
  return yield response.value();
96
96
  });
97
97
  }
98
+ /**
99
+ * OAuth Client login
100
+ */
101
+ loginOAuthClientRaw(requestParameters, initOverrides) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ if (requestParameters['clientId'] == null) {
104
+ throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling loginOAuthClient().');
105
+ }
106
+ if (requestParameters['oAuthClientLoginPayload'] == null) {
107
+ throw new runtime.RequiredError('oAuthClientLoginPayload', 'Required parameter "oAuthClientLoginPayload" was null or undefined when calling loginOAuthClient().');
108
+ }
109
+ const queryParameters = {};
110
+ const headerParameters = {};
111
+ headerParameters['Content-Type'] = 'application/json';
112
+ if (this.configuration && this.configuration.accessToken) {
113
+ // oauth required
114
+ const token = this.configuration.accessToken;
115
+ const tokenString = yield token("OAuth2", []);
116
+ if (tokenString) {
117
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
118
+ }
119
+ }
120
+ const response = yield this.request({
121
+ path: `/oauthClients/{clientId}/login`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters['clientId']))),
122
+ method: 'POST',
123
+ headers: headerParameters,
124
+ query: queryParameters,
125
+ body: OAuthClientLoginPayloadToJSON(requestParameters['oAuthClientLoginPayload']),
126
+ }, initOverrides);
127
+ return new runtime.JSONApiResponse(response, (jsonValue) => OAuthClientFromJSON(jsonValue));
128
+ });
129
+ }
130
+ /**
131
+ * OAuth Client login
132
+ */
133
+ loginOAuthClient(requestParameters, initOverrides) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ const response = yield this.loginOAuthClientRaw(requestParameters, initOverrides);
136
+ return yield response.value();
137
+ });
138
+ }
98
139
  /**
99
140
  * Update an oauth client
100
141
  */
@@ -51,6 +51,24 @@ export interface OAuthClientListItem {
51
51
  * @memberof OAuthClientListItem
52
52
  */
53
53
  scopes: Array<string>;
54
+ /**
55
+ *
56
+ * @type {boolean}
57
+ * @memberof OAuthClientListItem
58
+ */
59
+ system: boolean;
60
+ /**
61
+ *
62
+ * @type {boolean}
63
+ * @memberof OAuthClientListItem
64
+ */
65
+ serviceAccount: boolean;
66
+ /**
67
+ *
68
+ * @type {string}
69
+ * @memberof OAuthClientListItem
70
+ */
71
+ ssoProvider?: string | null;
54
72
  }
55
73
  /**
56
74
  * Check if a given object implements the OAuthClientListItem interface.
@@ -27,6 +27,10 @@ export function instanceOfOAuthClientListItem(value) {
27
27
  return false;
28
28
  if (!('scopes' in value) || value['scopes'] === undefined)
29
29
  return false;
30
+ if (!('system' in value) || value['system'] === undefined)
31
+ return false;
32
+ if (!('serviceAccount' in value) || value['serviceAccount'] === undefined)
33
+ return false;
30
34
  return true;
31
35
  }
32
36
  export function OAuthClientListItemFromJSON(json) {
@@ -43,6 +47,9 @@ export function OAuthClientListItemFromJSONTyped(json, ignoreDiscriminator) {
43
47
  'redirectUris': json['redirectUris'],
44
48
  'grantTypes': json['grantTypes'],
45
49
  'scopes': json['scopes'],
50
+ 'system': json['system'],
51
+ 'serviceAccount': json['serviceAccount'],
52
+ 'ssoProvider': json['ssoProvider'] == null ? undefined : json['ssoProvider'],
46
53
  };
47
54
  }
48
55
  export function OAuthClientListItemToJSON(json) {
@@ -59,5 +66,8 @@ export function OAuthClientListItemToJSONTyped(value, ignoreDiscriminator = fals
59
66
  'redirectUris': value['redirectUris'],
60
67
  'grantTypes': value['grantTypes'],
61
68
  'scopes': value['scopes'],
69
+ 'system': value['system'],
70
+ 'serviceAccount': value['serviceAccount'],
71
+ 'ssoProvider': value['ssoProvider'],
62
72
  };
63
73
  }
@@ -0,0 +1,32 @@
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.1.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
+ /**
13
+ * A request to authenticate an oauth client
14
+ * @export
15
+ * @interface OAuthClientLoginPayload
16
+ */
17
+ export interface OAuthClientLoginPayload {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof OAuthClientLoginPayload
22
+ */
23
+ clientSecret: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the OAuthClientLoginPayload interface.
27
+ */
28
+ export declare function instanceOfOAuthClientLoginPayload(value: object): value is OAuthClientLoginPayload;
29
+ export declare function OAuthClientLoginPayloadFromJSON(json: any): OAuthClientLoginPayload;
30
+ export declare function OAuthClientLoginPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthClientLoginPayload;
31
+ export declare function OAuthClientLoginPayloadToJSON(json: any): OAuthClientLoginPayload;
32
+ export declare function OAuthClientLoginPayloadToJSONTyped(value?: OAuthClientLoginPayload | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,43 @@
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.1.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
+ * Check if a given object implements the OAuthClientLoginPayload interface.
16
+ */
17
+ export function instanceOfOAuthClientLoginPayload(value) {
18
+ if (!('clientSecret' in value) || value['clientSecret'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function OAuthClientLoginPayloadFromJSON(json) {
23
+ return OAuthClientLoginPayloadFromJSONTyped(json, false);
24
+ }
25
+ export function OAuthClientLoginPayloadFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'clientSecret': json['clientSecret'],
31
+ };
32
+ }
33
+ export function OAuthClientLoginPayloadToJSON(json) {
34
+ return OAuthClientLoginPayloadToJSONTyped(json, false);
35
+ }
36
+ export function OAuthClientLoginPayloadToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'clientSecret': value['clientSecret'],
42
+ };
43
+ }
@@ -20,6 +20,7 @@ export * from './LoginPayload';
20
20
  export * from './NewPasswordPayload';
21
21
  export * from './OAuthClient';
22
22
  export * from './OAuthClientListItem';
23
+ export * from './OAuthClientLoginPayload';
23
24
  export * from './OAuthClientPublicKey';
24
25
  export * from './OAuthClientUpdated';
25
26
  export * from './Organization';
@@ -22,6 +22,7 @@ export * from './LoginPayload';
22
22
  export * from './NewPasswordPayload';
23
23
  export * from './OAuthClient';
24
24
  export * from './OAuthClientListItem';
25
+ export * from './OAuthClientLoginPayload';
25
26
  export * from './OAuthClientPublicKey';
26
27
  export * from './OAuthClientUpdated';
27
28
  export * from './Organization';
@@ -51,6 +51,24 @@ export interface OAuthClientListItem {
51
51
  * @memberof OAuthClientListItem
52
52
  */
53
53
  scopes: Array<string>;
54
+ /**
55
+ *
56
+ * @type {boolean}
57
+ * @memberof OAuthClientListItem
58
+ */
59
+ system: boolean;
60
+ /**
61
+ *
62
+ * @type {boolean}
63
+ * @memberof OAuthClientListItem
64
+ */
65
+ serviceAccount: boolean;
66
+ /**
67
+ *
68
+ * @type {string}
69
+ * @memberof OAuthClientListItem
70
+ */
71
+ ssoProvider?: string | null;
54
72
  }
55
73
  /**
56
74
  * Check if a given object implements the OAuthClientListItem interface.
@@ -34,6 +34,10 @@ function instanceOfOAuthClientListItem(value) {
34
34
  return false;
35
35
  if (!('scopes' in value) || value['scopes'] === undefined)
36
36
  return false;
37
+ if (!('system' in value) || value['system'] === undefined)
38
+ return false;
39
+ if (!('serviceAccount' in value) || value['serviceAccount'] === undefined)
40
+ return false;
37
41
  return true;
38
42
  }
39
43
  function OAuthClientListItemFromJSON(json) {
@@ -50,6 +54,9 @@ function OAuthClientListItemFromJSONTyped(json, ignoreDiscriminator) {
50
54
  'redirectUris': json['redirectUris'],
51
55
  'grantTypes': json['grantTypes'],
52
56
  'scopes': json['scopes'],
57
+ 'system': json['system'],
58
+ 'serviceAccount': json['serviceAccount'],
59
+ 'ssoProvider': json['ssoProvider'] == null ? undefined : json['ssoProvider'],
53
60
  };
54
61
  }
55
62
  function OAuthClientListItemToJSON(json) {
@@ -66,5 +73,8 @@ function OAuthClientListItemToJSONTyped(value, ignoreDiscriminator = false) {
66
73
  'redirectUris': value['redirectUris'],
67
74
  'grantTypes': value['grantTypes'],
68
75
  'scopes': value['scopes'],
76
+ 'system': value['system'],
77
+ 'serviceAccount': value['serviceAccount'],
78
+ 'ssoProvider': value['ssoProvider'],
69
79
  };
70
80
  }
@@ -0,0 +1,32 @@
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.1.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
+ /**
13
+ * A request to authenticate an oauth client
14
+ * @export
15
+ * @interface OAuthClientLoginPayload
16
+ */
17
+ export interface OAuthClientLoginPayload {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof OAuthClientLoginPayload
22
+ */
23
+ clientSecret: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the OAuthClientLoginPayload interface.
27
+ */
28
+ export declare function instanceOfOAuthClientLoginPayload(value: object): value is OAuthClientLoginPayload;
29
+ export declare function OAuthClientLoginPayloadFromJSON(json: any): OAuthClientLoginPayload;
30
+ export declare function OAuthClientLoginPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthClientLoginPayload;
31
+ export declare function OAuthClientLoginPayloadToJSON(json: any): OAuthClientLoginPayload;
32
+ export declare function OAuthClientLoginPayloadToJSONTyped(value?: OAuthClientLoginPayload | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.1.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.instanceOfOAuthClientLoginPayload = instanceOfOAuthClientLoginPayload;
17
+ exports.OAuthClientLoginPayloadFromJSON = OAuthClientLoginPayloadFromJSON;
18
+ exports.OAuthClientLoginPayloadFromJSONTyped = OAuthClientLoginPayloadFromJSONTyped;
19
+ exports.OAuthClientLoginPayloadToJSON = OAuthClientLoginPayloadToJSON;
20
+ exports.OAuthClientLoginPayloadToJSONTyped = OAuthClientLoginPayloadToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the OAuthClientLoginPayload interface.
23
+ */
24
+ function instanceOfOAuthClientLoginPayload(value) {
25
+ if (!('clientSecret' in value) || value['clientSecret'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function OAuthClientLoginPayloadFromJSON(json) {
30
+ return OAuthClientLoginPayloadFromJSONTyped(json, false);
31
+ }
32
+ function OAuthClientLoginPayloadFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'clientSecret': json['clientSecret'],
38
+ };
39
+ }
40
+ function OAuthClientLoginPayloadToJSON(json) {
41
+ return OAuthClientLoginPayloadToJSONTyped(json, false);
42
+ }
43
+ function OAuthClientLoginPayloadToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'clientSecret': value['clientSecret'],
49
+ };
50
+ }
@@ -20,6 +20,7 @@ export * from './LoginPayload';
20
20
  export * from './NewPasswordPayload';
21
21
  export * from './OAuthClient';
22
22
  export * from './OAuthClientListItem';
23
+ export * from './OAuthClientLoginPayload';
23
24
  export * from './OAuthClientPublicKey';
24
25
  export * from './OAuthClientUpdated';
25
26
  export * from './Organization';
@@ -38,6 +38,7 @@ __exportStar(require("./LoginPayload"), exports);
38
38
  __exportStar(require("./NewPasswordPayload"), exports);
39
39
  __exportStar(require("./OAuthClient"), exports);
40
40
  __exportStar(require("./OAuthClientListItem"), exports);
41
+ __exportStar(require("./OAuthClientLoginPayload"), exports);
41
42
  __exportStar(require("./OAuthClientPublicKey"), exports);
42
43
  __exportStar(require("./OAuthClientUpdated"), exports);
43
44
  __exportStar(require("./Organization"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equisoft/account-service-sdk-typescript",
3
- "version": "10.1.1-snapshot.20250929124127",
3
+ "version": "10.1.1-snapshot.20251003124210",
4
4
  "description": "OpenAPI client for @equisoft/account-service-sdk-typescript",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -18,6 +18,7 @@ import type {
18
18
  ErrorPayload,
19
19
  OAuthClient,
20
20
  OAuthClientListItem,
21
+ OAuthClientLoginPayload,
21
22
  OAuthClientUpdated,
22
23
  UpdateOAuthClientPayload,
23
24
  } from '../models/index';
@@ -28,6 +29,8 @@ import {
28
29
  OAuthClientToJSON,
29
30
  OAuthClientListItemFromJSON,
30
31
  OAuthClientListItemToJSON,
32
+ OAuthClientLoginPayloadFromJSON,
33
+ OAuthClientLoginPayloadToJSON,
31
34
  OAuthClientUpdatedFromJSON,
32
35
  OAuthClientUpdatedToJSON,
33
36
  UpdateOAuthClientPayloadFromJSON,
@@ -38,6 +41,11 @@ export interface GetOAuthClientRequest {
38
41
  clientId: string;
39
42
  }
40
43
 
44
+ export interface LoginOAuthClientRequest {
45
+ clientId: string;
46
+ oAuthClientLoginPayload: OAuthClientLoginPayload;
47
+ }
48
+
41
49
  export interface UpdateOAuthClientRequest {
42
50
  clientId: string;
43
51
  updateOAuthClientPayload: UpdateOAuthClientPayload;
@@ -125,6 +133,58 @@ export class OAuthApi extends runtime.BaseAPI {
125
133
  return await response.value();
126
134
  }
127
135
 
136
+ /**
137
+ * OAuth Client login
138
+ */
139
+ async loginOAuthClientRaw(requestParameters: LoginOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthClient>> {
140
+ if (requestParameters['clientId'] == null) {
141
+ throw new runtime.RequiredError(
142
+ 'clientId',
143
+ 'Required parameter "clientId" was null or undefined when calling loginOAuthClient().'
144
+ );
145
+ }
146
+
147
+ if (requestParameters['oAuthClientLoginPayload'] == null) {
148
+ throw new runtime.RequiredError(
149
+ 'oAuthClientLoginPayload',
150
+ 'Required parameter "oAuthClientLoginPayload" was null or undefined when calling loginOAuthClient().'
151
+ );
152
+ }
153
+
154
+ const queryParameters: any = {};
155
+
156
+ const headerParameters: runtime.HTTPHeaders = {};
157
+
158
+ headerParameters['Content-Type'] = 'application/json';
159
+
160
+ if (this.configuration && this.configuration.accessToken) {
161
+ // oauth required
162
+ const token = this.configuration.accessToken;
163
+ const tokenString = await token("OAuth2", []);
164
+ if (tokenString) {
165
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
166
+ }
167
+ }
168
+
169
+ const response = await this.request({
170
+ path: `/oauthClients/{clientId}/login`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters['clientId']))),
171
+ method: 'POST',
172
+ headers: headerParameters,
173
+ query: queryParameters,
174
+ body: OAuthClientLoginPayloadToJSON(requestParameters['oAuthClientLoginPayload']),
175
+ }, initOverrides);
176
+
177
+ return new runtime.JSONApiResponse(response, (jsonValue) => OAuthClientFromJSON(jsonValue));
178
+ }
179
+
180
+ /**
181
+ * OAuth Client login
182
+ */
183
+ async loginOAuthClient(requestParameters: LoginOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthClient> {
184
+ const response = await this.loginOAuthClientRaw(requestParameters, initOverrides);
185
+ return await response.value();
186
+ }
187
+
128
188
  /**
129
189
  * Update an oauth client
130
190
  */
@@ -55,6 +55,24 @@ export interface OAuthClientListItem {
55
55
  * @memberof OAuthClientListItem
56
56
  */
57
57
  scopes: Array<string>;
58
+ /**
59
+ *
60
+ * @type {boolean}
61
+ * @memberof OAuthClientListItem
62
+ */
63
+ system: boolean;
64
+ /**
65
+ *
66
+ * @type {boolean}
67
+ * @memberof OAuthClientListItem
68
+ */
69
+ serviceAccount: boolean;
70
+ /**
71
+ *
72
+ * @type {string}
73
+ * @memberof OAuthClientListItem
74
+ */
75
+ ssoProvider?: string | null;
58
76
  }
59
77
 
60
78
  /**
@@ -67,6 +85,8 @@ export function instanceOfOAuthClientListItem(value: object): value is OAuthClie
67
85
  if (!('redirectUris' in value) || value['redirectUris'] === undefined) return false;
68
86
  if (!('grantTypes' in value) || value['grantTypes'] === undefined) return false;
69
87
  if (!('scopes' in value) || value['scopes'] === undefined) return false;
88
+ if (!('system' in value) || value['system'] === undefined) return false;
89
+ if (!('serviceAccount' in value) || value['serviceAccount'] === undefined) return false;
70
90
  return true;
71
91
  }
72
92
 
@@ -86,6 +106,9 @@ export function OAuthClientListItemFromJSONTyped(json: any, ignoreDiscriminator:
86
106
  'redirectUris': json['redirectUris'],
87
107
  'grantTypes': json['grantTypes'],
88
108
  'scopes': json['scopes'],
109
+ 'system': json['system'],
110
+ 'serviceAccount': json['serviceAccount'],
111
+ 'ssoProvider': json['ssoProvider'] == null ? undefined : json['ssoProvider'],
89
112
  };
90
113
  }
91
114
 
@@ -106,6 +129,9 @@ export function OAuthClientListItemToJSONTyped(value?: OAuthClientListItem | nul
106
129
  'redirectUris': value['redirectUris'],
107
130
  'grantTypes': value['grantTypes'],
108
131
  'scopes': value['scopes'],
132
+ 'system': value['system'],
133
+ 'serviceAccount': value['serviceAccount'],
134
+ 'ssoProvider': value['ssoProvider'],
109
135
  };
110
136
  }
111
137
 
@@ -0,0 +1,66 @@
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.1.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
+ /**
17
+ * A request to authenticate an oauth client
18
+ * @export
19
+ * @interface OAuthClientLoginPayload
20
+ */
21
+ export interface OAuthClientLoginPayload {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof OAuthClientLoginPayload
26
+ */
27
+ clientSecret: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the OAuthClientLoginPayload interface.
32
+ */
33
+ export function instanceOfOAuthClientLoginPayload(value: object): value is OAuthClientLoginPayload {
34
+ if (!('clientSecret' in value) || value['clientSecret'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function OAuthClientLoginPayloadFromJSON(json: any): OAuthClientLoginPayload {
39
+ return OAuthClientLoginPayloadFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function OAuthClientLoginPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthClientLoginPayload {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'clientSecret': json['clientSecret'],
49
+ };
50
+ }
51
+
52
+ export function OAuthClientLoginPayloadToJSON(json: any): OAuthClientLoginPayload {
53
+ return OAuthClientLoginPayloadToJSONTyped(json, false);
54
+ }
55
+
56
+ export function OAuthClientLoginPayloadToJSONTyped(value?: OAuthClientLoginPayload | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'clientSecret': value['clientSecret'],
64
+ };
65
+ }
66
+
@@ -22,6 +22,7 @@ export * from './LoginPayload';
22
22
  export * from './NewPasswordPayload';
23
23
  export * from './OAuthClient';
24
24
  export * from './OAuthClientListItem';
25
+ export * from './OAuthClientLoginPayload';
25
26
  export * from './OAuthClientPublicKey';
26
27
  export * from './OAuthClientUpdated';
27
28
  export * from './Organization';