@equisoft/account-service-sdk-typescript 7.1.1-snapshot.20240625140250 → 7.1.1-snapshot.20240705134433

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.
@@ -11,6 +11,11 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { CreateOrUpdateOrganizationPayload, CreateOrganizationPayload, CreateOrganizationUserServiceOptionPayload, CreateOrganizationUserServicePayload, CreateRole, ListUserOrganizations, Organization, OrganizationCreated, OrganizationRoleAttributions, OrganizationSsoProvider, OrganizationUserServiceAssociation, RoleCreated, UpdateParentOrganizationPayload, UpsertServicePayload, UserAccountSearchResult } from '../models/index';
14
+ export interface ActivateUserServiceRequest {
15
+ uuid: string;
16
+ userUuid: string;
17
+ serviceCode: string;
18
+ }
14
19
  export interface AddServiceRequest {
15
20
  uuid: string;
16
21
  serviceCode: string;
@@ -38,6 +43,11 @@ export interface CreateServiceForUserRequest {
38
43
  serviceCode: string;
39
44
  createOrganizationUserServicePayload: CreateOrganizationUserServicePayload;
40
45
  }
46
+ export interface DeactivateUserServiceRequest {
47
+ uuid: string;
48
+ userUuid: string;
49
+ serviceCode: string;
50
+ }
41
51
  export interface DeleteOrganizationRequest {
42
52
  uuid: string;
43
53
  }
@@ -98,6 +108,14 @@ export interface UpdateParentOrganizationRequest {
98
108
  *
99
109
  */
100
110
  export declare class OrganizationApi extends runtime.BaseAPI {
111
+ /**
112
+ * Activate a service from a user for an organization. Does add service associations
113
+ */
114
+ activateUserServiceRaw(requestParameters: ActivateUserServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
115
+ /**
116
+ * Activate a service from a user for an organization. Does add service associations
117
+ */
118
+ activateUserService(requestParameters: ActivateUserServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
101
119
  /**
102
120
  * Add/update a service for an organization
103
121
  */
@@ -146,6 +164,14 @@ export declare class OrganizationApi extends runtime.BaseAPI {
146
164
  * Add a service to a user for an organization
147
165
  */
148
166
  createServiceForUser(requestParameters: CreateServiceForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
167
+ /**
168
+ * Deactivate a service from a user for an organization. Does add or remove service associations
169
+ */
170
+ deactivateUserServiceRaw(requestParameters: DeactivateUserServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
171
+ /**
172
+ * Deactivate a service from a user for an organization. Does add or remove service associations
173
+ */
174
+ deactivateUserService(requestParameters: DeactivateUserServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
149
175
  /**
150
176
  * Delete organization
151
177
  */
@@ -29,6 +29,47 @@ const index_1 = require("../models/index");
29
29
  *
30
30
  */
31
31
  class OrganizationApi extends runtime.BaseAPI {
32
+ /**
33
+ * Activate a service from a user for an organization. Does add service associations
34
+ */
35
+ activateUserServiceRaw(requestParameters, initOverrides) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
38
+ throw new runtime.RequiredError('uuid', 'Required parameter requestParameters.uuid was null or undefined when calling activateUserService.');
39
+ }
40
+ if (requestParameters.userUuid === null || requestParameters.userUuid === undefined) {
41
+ throw new runtime.RequiredError('userUuid', 'Required parameter requestParameters.userUuid was null or undefined when calling activateUserService.');
42
+ }
43
+ if (requestParameters.serviceCode === null || requestParameters.serviceCode === undefined) {
44
+ throw new runtime.RequiredError('serviceCode', 'Required parameter requestParameters.serviceCode was null or undefined when calling activateUserService.');
45
+ }
46
+ const queryParameters = {};
47
+ const headerParameters = {};
48
+ if (this.configuration && this.configuration.accessToken) {
49
+ // oauth required
50
+ const token = this.configuration.accessToken;
51
+ const tokenString = yield token("OAuth2", ["account:organization", "account:service"]);
52
+ if (tokenString) {
53
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
54
+ }
55
+ }
56
+ const response = yield this.request({
57
+ path: `/organizations/{uuid}/users/{userUuid}/services/{serviceCode}/activate`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))).replace(`{${"userUuid"}}`, encodeURIComponent(String(requestParameters.userUuid))).replace(`{${"serviceCode"}}`, encodeURIComponent(String(requestParameters.serviceCode))),
58
+ method: 'PUT',
59
+ headers: headerParameters,
60
+ query: queryParameters,
61
+ }, initOverrides);
62
+ return new runtime.VoidApiResponse(response);
63
+ });
64
+ }
65
+ /**
66
+ * Activate a service from a user for an organization. Does add service associations
67
+ */
68
+ activateUserService(requestParameters, initOverrides) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ yield this.activateUserServiceRaw(requestParameters, initOverrides);
71
+ });
72
+ }
32
73
  /**
33
74
  * Add/update a service for an organization
34
75
  */
@@ -282,6 +323,47 @@ class OrganizationApi extends runtime.BaseAPI {
282
323
  yield this.createServiceForUserRaw(requestParameters, initOverrides);
283
324
  });
284
325
  }
326
+ /**
327
+ * Deactivate a service from a user for an organization. Does add or remove service associations
328
+ */
329
+ deactivateUserServiceRaw(requestParameters, initOverrides) {
330
+ return __awaiter(this, void 0, void 0, function* () {
331
+ if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
332
+ throw new runtime.RequiredError('uuid', 'Required parameter requestParameters.uuid was null or undefined when calling deactivateUserService.');
333
+ }
334
+ if (requestParameters.userUuid === null || requestParameters.userUuid === undefined) {
335
+ throw new runtime.RequiredError('userUuid', 'Required parameter requestParameters.userUuid was null or undefined when calling deactivateUserService.');
336
+ }
337
+ if (requestParameters.serviceCode === null || requestParameters.serviceCode === undefined) {
338
+ throw new runtime.RequiredError('serviceCode', 'Required parameter requestParameters.serviceCode was null or undefined when calling deactivateUserService.');
339
+ }
340
+ const queryParameters = {};
341
+ const headerParameters = {};
342
+ if (this.configuration && this.configuration.accessToken) {
343
+ // oauth required
344
+ const token = this.configuration.accessToken;
345
+ const tokenString = yield token("OAuth2", ["account:organization", "account:service"]);
346
+ if (tokenString) {
347
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
348
+ }
349
+ }
350
+ const response = yield this.request({
351
+ path: `/organizations/{uuid}/users/{userUuid}/services/{serviceCode}/deactivate`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))).replace(`{${"userUuid"}}`, encodeURIComponent(String(requestParameters.userUuid))).replace(`{${"serviceCode"}}`, encodeURIComponent(String(requestParameters.serviceCode))),
352
+ method: 'PUT',
353
+ headers: headerParameters,
354
+ query: queryParameters,
355
+ }, initOverrides);
356
+ return new runtime.VoidApiResponse(response);
357
+ });
358
+ }
359
+ /**
360
+ * Deactivate a service from a user for an organization. Does add or remove service associations
361
+ */
362
+ deactivateUserService(requestParameters, initOverrides) {
363
+ return __awaiter(this, void 0, void 0, function* () {
364
+ yield this.deactivateUserServiceRaw(requestParameters, initOverrides);
365
+ });
366
+ }
285
367
  /**
286
368
  * Delete organization
287
369
  */
@@ -11,6 +11,11 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { CreateOrUpdateOrganizationPayload, CreateOrganizationPayload, CreateOrganizationUserServiceOptionPayload, CreateOrganizationUserServicePayload, CreateRole, ListUserOrganizations, Organization, OrganizationCreated, OrganizationRoleAttributions, OrganizationSsoProvider, OrganizationUserServiceAssociation, RoleCreated, UpdateParentOrganizationPayload, UpsertServicePayload, UserAccountSearchResult } from '../models/index';
14
+ export interface ActivateUserServiceRequest {
15
+ uuid: string;
16
+ userUuid: string;
17
+ serviceCode: string;
18
+ }
14
19
  export interface AddServiceRequest {
15
20
  uuid: string;
16
21
  serviceCode: string;
@@ -38,6 +43,11 @@ export interface CreateServiceForUserRequest {
38
43
  serviceCode: string;
39
44
  createOrganizationUserServicePayload: CreateOrganizationUserServicePayload;
40
45
  }
46
+ export interface DeactivateUserServiceRequest {
47
+ uuid: string;
48
+ userUuid: string;
49
+ serviceCode: string;
50
+ }
41
51
  export interface DeleteOrganizationRequest {
42
52
  uuid: string;
43
53
  }
@@ -98,6 +108,14 @@ export interface UpdateParentOrganizationRequest {
98
108
  *
99
109
  */
100
110
  export declare class OrganizationApi extends runtime.BaseAPI {
111
+ /**
112
+ * Activate a service from a user for an organization. Does add service associations
113
+ */
114
+ activateUserServiceRaw(requestParameters: ActivateUserServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
115
+ /**
116
+ * Activate a service from a user for an organization. Does add service associations
117
+ */
118
+ activateUserService(requestParameters: ActivateUserServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
101
119
  /**
102
120
  * Add/update a service for an organization
103
121
  */
@@ -146,6 +164,14 @@ export declare class OrganizationApi extends runtime.BaseAPI {
146
164
  * Add a service to a user for an organization
147
165
  */
148
166
  createServiceForUser(requestParameters: CreateServiceForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
167
+ /**
168
+ * Deactivate a service from a user for an organization. Does add or remove service associations
169
+ */
170
+ deactivateUserServiceRaw(requestParameters: DeactivateUserServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
171
+ /**
172
+ * Deactivate a service from a user for an organization. Does add or remove service associations
173
+ */
174
+ deactivateUserService(requestParameters: DeactivateUserServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
149
175
  /**
150
176
  * Delete organization
151
177
  */
@@ -26,6 +26,47 @@ import { CreateOrUpdateOrganizationPayloadToJSON, CreateOrganizationPayloadToJSO
26
26
  *
27
27
  */
28
28
  export class OrganizationApi extends runtime.BaseAPI {
29
+ /**
30
+ * Activate a service from a user for an organization. Does add service associations
31
+ */
32
+ activateUserServiceRaw(requestParameters, initOverrides) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
35
+ throw new runtime.RequiredError('uuid', 'Required parameter requestParameters.uuid was null or undefined when calling activateUserService.');
36
+ }
37
+ if (requestParameters.userUuid === null || requestParameters.userUuid === undefined) {
38
+ throw new runtime.RequiredError('userUuid', 'Required parameter requestParameters.userUuid was null or undefined when calling activateUserService.');
39
+ }
40
+ if (requestParameters.serviceCode === null || requestParameters.serviceCode === undefined) {
41
+ throw new runtime.RequiredError('serviceCode', 'Required parameter requestParameters.serviceCode was null or undefined when calling activateUserService.');
42
+ }
43
+ const queryParameters = {};
44
+ const headerParameters = {};
45
+ if (this.configuration && this.configuration.accessToken) {
46
+ // oauth required
47
+ const token = this.configuration.accessToken;
48
+ const tokenString = yield token("OAuth2", ["account:organization", "account:service"]);
49
+ if (tokenString) {
50
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
51
+ }
52
+ }
53
+ const response = yield this.request({
54
+ path: `/organizations/{uuid}/users/{userUuid}/services/{serviceCode}/activate`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))).replace(`{${"userUuid"}}`, encodeURIComponent(String(requestParameters.userUuid))).replace(`{${"serviceCode"}}`, encodeURIComponent(String(requestParameters.serviceCode))),
55
+ method: 'PUT',
56
+ headers: headerParameters,
57
+ query: queryParameters,
58
+ }, initOverrides);
59
+ return new runtime.VoidApiResponse(response);
60
+ });
61
+ }
62
+ /**
63
+ * Activate a service from a user for an organization. Does add service associations
64
+ */
65
+ activateUserService(requestParameters, initOverrides) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ yield this.activateUserServiceRaw(requestParameters, initOverrides);
68
+ });
69
+ }
29
70
  /**
30
71
  * Add/update a service for an organization
31
72
  */
@@ -279,6 +320,47 @@ export class OrganizationApi extends runtime.BaseAPI {
279
320
  yield this.createServiceForUserRaw(requestParameters, initOverrides);
280
321
  });
281
322
  }
323
+ /**
324
+ * Deactivate a service from a user for an organization. Does add or remove service associations
325
+ */
326
+ deactivateUserServiceRaw(requestParameters, initOverrides) {
327
+ return __awaiter(this, void 0, void 0, function* () {
328
+ if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
329
+ throw new runtime.RequiredError('uuid', 'Required parameter requestParameters.uuid was null or undefined when calling deactivateUserService.');
330
+ }
331
+ if (requestParameters.userUuid === null || requestParameters.userUuid === undefined) {
332
+ throw new runtime.RequiredError('userUuid', 'Required parameter requestParameters.userUuid was null or undefined when calling deactivateUserService.');
333
+ }
334
+ if (requestParameters.serviceCode === null || requestParameters.serviceCode === undefined) {
335
+ throw new runtime.RequiredError('serviceCode', 'Required parameter requestParameters.serviceCode was null or undefined when calling deactivateUserService.');
336
+ }
337
+ const queryParameters = {};
338
+ const headerParameters = {};
339
+ if (this.configuration && this.configuration.accessToken) {
340
+ // oauth required
341
+ const token = this.configuration.accessToken;
342
+ const tokenString = yield token("OAuth2", ["account:organization", "account:service"]);
343
+ if (tokenString) {
344
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
345
+ }
346
+ }
347
+ const response = yield this.request({
348
+ path: `/organizations/{uuid}/users/{userUuid}/services/{serviceCode}/deactivate`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))).replace(`{${"userUuid"}}`, encodeURIComponent(String(requestParameters.userUuid))).replace(`{${"serviceCode"}}`, encodeURIComponent(String(requestParameters.serviceCode))),
349
+ method: 'PUT',
350
+ headers: headerParameters,
351
+ query: queryParameters,
352
+ }, initOverrides);
353
+ return new runtime.VoidApiResponse(response);
354
+ });
355
+ }
356
+ /**
357
+ * Deactivate a service from a user for an organization. Does add or remove service associations
358
+ */
359
+ deactivateUserService(requestParameters, initOverrides) {
360
+ return __awaiter(this, void 0, void 0, function* () {
361
+ yield this.deactivateUserServiceRaw(requestParameters, initOverrides);
362
+ });
363
+ }
282
364
  /**
283
365
  * Delete organization
284
366
  */
@@ -27,6 +27,12 @@ export interface UserServiceAssociation {
27
27
  * @memberof UserServiceAssociation
28
28
  */
29
29
  code: string;
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof UserServiceAssociation
34
+ */
35
+ active: boolean;
30
36
  /**
31
37
  *
32
38
  * @type {string}
@@ -19,6 +19,7 @@ export function instanceOfUserServiceAssociation(value) {
19
19
  let isInstance = true;
20
20
  isInstance = isInstance && "organizationUuid" in value;
21
21
  isInstance = isInstance && "code" in value;
22
+ isInstance = isInstance && "active" in value;
22
23
  return isInstance;
23
24
  }
24
25
  export function UserServiceAssociationFromJSON(json) {
@@ -31,6 +32,7 @@ export function UserServiceAssociationFromJSONTyped(json, ignoreDiscriminator) {
31
32
  return {
32
33
  'organizationUuid': json['organizationUuid'],
33
34
  'code': json['code'],
35
+ 'active': json['active'],
34
36
  'externalId': !exists(json, 'externalId') ? undefined : json['externalId'],
35
37
  'options': !exists(json, 'options') ? undefined : json['options'],
36
38
  };
@@ -45,6 +47,7 @@ export function UserServiceAssociationToJSON(value) {
45
47
  return {
46
48
  'organizationUuid': value.organizationUuid,
47
49
  'code': value.code,
50
+ 'active': value.active,
48
51
  'externalId': value.externalId,
49
52
  'options': value.options,
50
53
  };
@@ -27,6 +27,12 @@ export interface UserServiceAssociation {
27
27
  * @memberof UserServiceAssociation
28
28
  */
29
29
  code: string;
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof UserServiceAssociation
34
+ */
35
+ active: boolean;
30
36
  /**
31
37
  *
32
38
  * @type {string}
@@ -22,6 +22,7 @@ function instanceOfUserServiceAssociation(value) {
22
22
  let isInstance = true;
23
23
  isInstance = isInstance && "organizationUuid" in value;
24
24
  isInstance = isInstance && "code" in value;
25
+ isInstance = isInstance && "active" in value;
25
26
  return isInstance;
26
27
  }
27
28
  exports.instanceOfUserServiceAssociation = instanceOfUserServiceAssociation;
@@ -36,6 +37,7 @@ function UserServiceAssociationFromJSONTyped(json, ignoreDiscriminator) {
36
37
  return {
37
38
  'organizationUuid': json['organizationUuid'],
38
39
  'code': json['code'],
40
+ 'active': json['active'],
39
41
  'externalId': !(0, runtime_1.exists)(json, 'externalId') ? undefined : json['externalId'],
40
42
  'options': !(0, runtime_1.exists)(json, 'options') ? undefined : json['options'],
41
43
  };
@@ -51,6 +53,7 @@ function UserServiceAssociationToJSON(value) {
51
53
  return {
52
54
  'organizationUuid': value.organizationUuid,
53
55
  'code': value.code,
56
+ 'active': value.active,
54
57
  'externalId': value.externalId,
55
58
  'options': value.options,
56
59
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equisoft/account-service-sdk-typescript",
3
- "version": "7.1.1-snapshot.20240625140250",
3
+ "version": "7.1.1-snapshot.20240705134433",
4
4
  "description": "OpenAPI client for @equisoft/account-service-sdk-typescript",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -67,6 +67,12 @@ import {
67
67
  UserAccountSearchResultToJSON,
68
68
  } from '../models/index';
69
69
 
70
+ export interface ActivateUserServiceRequest {
71
+ uuid: string;
72
+ userUuid: string;
73
+ serviceCode: string;
74
+ }
75
+
70
76
  export interface AddServiceRequest {
71
77
  uuid: string;
72
78
  serviceCode: string;
@@ -100,6 +106,12 @@ export interface CreateServiceForUserRequest {
100
106
  createOrganizationUserServicePayload: CreateOrganizationUserServicePayload;
101
107
  }
102
108
 
109
+ export interface DeactivateUserServiceRequest {
110
+ uuid: string;
111
+ userUuid: string;
112
+ serviceCode: string;
113
+ }
114
+
103
115
  export interface DeleteOrganizationRequest {
104
116
  uuid: string;
105
117
  }
@@ -174,6 +186,52 @@ export interface UpdateParentOrganizationRequest {
174
186
  */
175
187
  export class OrganizationApi extends runtime.BaseAPI {
176
188
 
189
+ /**
190
+ * Activate a service from a user for an organization. Does add service associations
191
+ */
192
+ async activateUserServiceRaw(requestParameters: ActivateUserServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
193
+ if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
194
+ throw new runtime.RequiredError('uuid','Required parameter requestParameters.uuid was null or undefined when calling activateUserService.');
195
+ }
196
+
197
+ if (requestParameters.userUuid === null || requestParameters.userUuid === undefined) {
198
+ throw new runtime.RequiredError('userUuid','Required parameter requestParameters.userUuid was null or undefined when calling activateUserService.');
199
+ }
200
+
201
+ if (requestParameters.serviceCode === null || requestParameters.serviceCode === undefined) {
202
+ throw new runtime.RequiredError('serviceCode','Required parameter requestParameters.serviceCode was null or undefined when calling activateUserService.');
203
+ }
204
+
205
+ const queryParameters: any = {};
206
+
207
+ const headerParameters: runtime.HTTPHeaders = {};
208
+
209
+ if (this.configuration && this.configuration.accessToken) {
210
+ // oauth required
211
+ const token = this.configuration.accessToken;
212
+ const tokenString = await token("OAuth2", ["account:organization", "account:service"]);
213
+ if (tokenString) {
214
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
215
+ }
216
+ }
217
+
218
+ const response = await this.request({
219
+ path: `/organizations/{uuid}/users/{userUuid}/services/{serviceCode}/activate`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))).replace(`{${"userUuid"}}`, encodeURIComponent(String(requestParameters.userUuid))).replace(`{${"serviceCode"}}`, encodeURIComponent(String(requestParameters.serviceCode))),
220
+ method: 'PUT',
221
+ headers: headerParameters,
222
+ query: queryParameters,
223
+ }, initOverrides);
224
+
225
+ return new runtime.VoidApiResponse(response);
226
+ }
227
+
228
+ /**
229
+ * Activate a service from a user for an organization. Does add service associations
230
+ */
231
+ async activateUserService(requestParameters: ActivateUserServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
232
+ await this.activateUserServiceRaw(requestParameters, initOverrides);
233
+ }
234
+
177
235
  /**
178
236
  * Add/update a service for an organization
179
237
  */
@@ -460,6 +518,52 @@ export class OrganizationApi extends runtime.BaseAPI {
460
518
  await this.createServiceForUserRaw(requestParameters, initOverrides);
461
519
  }
462
520
 
521
+ /**
522
+ * Deactivate a service from a user for an organization. Does add or remove service associations
523
+ */
524
+ async deactivateUserServiceRaw(requestParameters: DeactivateUserServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
525
+ if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
526
+ throw new runtime.RequiredError('uuid','Required parameter requestParameters.uuid was null or undefined when calling deactivateUserService.');
527
+ }
528
+
529
+ if (requestParameters.userUuid === null || requestParameters.userUuid === undefined) {
530
+ throw new runtime.RequiredError('userUuid','Required parameter requestParameters.userUuid was null or undefined when calling deactivateUserService.');
531
+ }
532
+
533
+ if (requestParameters.serviceCode === null || requestParameters.serviceCode === undefined) {
534
+ throw new runtime.RequiredError('serviceCode','Required parameter requestParameters.serviceCode was null or undefined when calling deactivateUserService.');
535
+ }
536
+
537
+ const queryParameters: any = {};
538
+
539
+ const headerParameters: runtime.HTTPHeaders = {};
540
+
541
+ if (this.configuration && this.configuration.accessToken) {
542
+ // oauth required
543
+ const token = this.configuration.accessToken;
544
+ const tokenString = await token("OAuth2", ["account:organization", "account:service"]);
545
+ if (tokenString) {
546
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
547
+ }
548
+ }
549
+
550
+ const response = await this.request({
551
+ path: `/organizations/{uuid}/users/{userUuid}/services/{serviceCode}/deactivate`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))).replace(`{${"userUuid"}}`, encodeURIComponent(String(requestParameters.userUuid))).replace(`{${"serviceCode"}}`, encodeURIComponent(String(requestParameters.serviceCode))),
552
+ method: 'PUT',
553
+ headers: headerParameters,
554
+ query: queryParameters,
555
+ }, initOverrides);
556
+
557
+ return new runtime.VoidApiResponse(response);
558
+ }
559
+
560
+ /**
561
+ * Deactivate a service from a user for an organization. Does add or remove service associations
562
+ */
563
+ async deactivateUserService(requestParameters: DeactivateUserServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
564
+ await this.deactivateUserServiceRaw(requestParameters, initOverrides);
565
+ }
566
+
463
567
  /**
464
568
  * Delete organization
465
569
  */
@@ -31,6 +31,12 @@ export interface UserServiceAssociation {
31
31
  * @memberof UserServiceAssociation
32
32
  */
33
33
  code: string;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof UserServiceAssociation
38
+ */
39
+ active: boolean;
34
40
  /**
35
41
  *
36
42
  * @type {string}
@@ -52,6 +58,7 @@ export function instanceOfUserServiceAssociation(value: object): boolean {
52
58
  let isInstance = true;
53
59
  isInstance = isInstance && "organizationUuid" in value;
54
60
  isInstance = isInstance && "code" in value;
61
+ isInstance = isInstance && "active" in value;
55
62
 
56
63
  return isInstance;
57
64
  }
@@ -68,6 +75,7 @@ export function UserServiceAssociationFromJSONTyped(json: any, ignoreDiscriminat
68
75
 
69
76
  'organizationUuid': json['organizationUuid'],
70
77
  'code': json['code'],
78
+ 'active': json['active'],
71
79
  'externalId': !exists(json, 'externalId') ? undefined : json['externalId'],
72
80
  'options': !exists(json, 'options') ? undefined : json['options'],
73
81
  };
@@ -84,6 +92,7 @@ export function UserServiceAssociationToJSON(value?: UserServiceAssociation | nu
84
92
 
85
93
  'organizationUuid': value.organizationUuid,
86
94
  'code': value.code,
95
+ 'active': value.active,
87
96
  'externalId': value.externalId,
88
97
  'options': value.options,
89
98
  };