@equisoft/equisoft-connect-sdk-typescript 13.53.1-snapshot.20260629144056 → 13.54.0

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.
@@ -313,6 +313,7 @@ docs/TasksVisibilityType.md
313
313
  docs/Translation.md
314
314
  docs/UsersApi.md
315
315
  docs/UsersCreateUserPayload.md
316
+ docs/UsersDeleteUserPayload.md
316
317
  docs/UsersListUsersResponse.md
317
318
  docs/UsersRole.md
318
319
  docs/UsersUpdateUserPayload.md
@@ -635,6 +636,7 @@ src/models/TasksTransferToCompletedResponse.ts
635
636
  src/models/TasksVisibilityType.ts
636
637
  src/models/Translation.ts
637
638
  src/models/UsersCreateUserPayload.ts
639
+ src/models/UsersDeleteUserPayload.ts
638
640
  src/models/UsersListUsersResponse.ts
639
641
  src/models/UsersRole.ts
640
642
  src/models/UsersUpdateUserPayload.ts
package/README.md CHANGED
@@ -64,6 +64,7 @@ All URIs are relative to *http://localhost*
64
64
  *ContactsApi* | [**listHouseholds**](docs/ContactsApi.md#listhouseholds) | **GET** /crm/api/v1/households | List household entries (EXPERIMENTAL)
65
65
  *ContactsApi* | [**patchContact**](docs/ContactsApi.md#patchcontact) | **PATCH** /crm/api/v1/contacts/{contactUuid} | Update a contact
66
66
  *DatabasesApi* | [**createUser**](docs/DatabasesApi.md#createuser) | **POST** /crm/api/v1/databases/{databaseUuid}/users | Create a user for the database
67
+ *DatabasesApi* | [**deleteUser**](docs/DatabasesApi.md#deleteuser) | **DELETE** /crm/api/v1/databases/{databaseUuid}/users/{userUuid} | Delete a user for the database
67
68
  *DatabasesApi* | [**getDatabase**](docs/DatabasesApi.md#getdatabase) | **GET** /crm/api/v1/databases/{databaseUuid} | Get a database
68
69
  *DatabasesApi* | [**getUser**](docs/DatabasesApi.md#getuser) | **GET** /crm/api/v1/databases/{databaseUuid}/users/{userId} | Get a database\'s user
69
70
  *DatabasesApi* | [**listDatabases**](docs/DatabasesApi.md#listdatabases) | **GET** /crm/api/v1/databases | List all databases
@@ -493,6 +494,7 @@ All URIs are relative to *http://localhost*
493
494
  - [TasksVisibilityType](docs/TasksVisibilityType.md)
494
495
  - [Translation](docs/Translation.md)
495
496
  - [UsersCreateUserPayload](docs/UsersCreateUserPayload.md)
497
+ - [UsersDeleteUserPayload](docs/UsersDeleteUserPayload.md)
496
498
  - [UsersListUsersResponse](docs/UsersListUsersResponse.md)
497
499
  - [UsersRole](docs/UsersRole.md)
498
500
  - [UsersUpdateUserPayload](docs/UsersUpdateUserPayload.md)
@@ -10,11 +10,16 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { DatabaseUpdateStatePayload, DatabasesDatabase, DatabasesListDatabasesResponse, UsersCreateUserPayload, UsersListUsersResponse, UsersUpdateUserPayload, UsersUser } from '../models/index';
13
+ import type { DatabaseUpdateStatePayload, DatabasesDatabase, DatabasesListDatabasesResponse, UsersCreateUserPayload, UsersDeleteUserPayload, UsersListUsersResponse, UsersUpdateUserPayload, UsersUser } from '../models/index';
14
14
  export interface CreateUserRequest {
15
15
  databaseUuid: string;
16
16
  usersCreateUserPayload: UsersCreateUserPayload;
17
17
  }
18
+ export interface DeleteUserRequest {
19
+ databaseUuid: string;
20
+ userUuid: string;
21
+ usersDeleteUserPayload: UsersDeleteUserPayload;
22
+ }
18
23
  export interface GetDatabaseRequest {
19
24
  databaseUuid: string;
20
25
  }
@@ -54,6 +59,18 @@ export declare class DatabasesApi extends runtime.BaseAPI {
54
59
  * Create a user for the database
55
60
  */
56
61
  createUser(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsersUser>;
62
+ /**
63
+ * Creates request options for deleteUser without sending the request
64
+ */
65
+ deleteUserRequestOpts(requestParameters: DeleteUserRequest): Promise<runtime.RequestOpts>;
66
+ /**
67
+ * Delete a user for the database
68
+ */
69
+ deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
70
+ /**
71
+ * Delete a user for the database
72
+ */
73
+ deleteUser(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
57
74
  /**
58
75
  * Creates request options for getDatabase without sending the request
59
76
  */
@@ -81,6 +81,61 @@ class DatabasesApi extends runtime.BaseAPI {
81
81
  return yield response.value();
82
82
  });
83
83
  }
84
+ /**
85
+ * Creates request options for deleteUser without sending the request
86
+ */
87
+ deleteUserRequestOpts(requestParameters) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ if (requestParameters['databaseUuid'] == null) {
90
+ throw new runtime.RequiredError('databaseUuid', 'Required parameter "databaseUuid" was null or undefined when calling deleteUser().');
91
+ }
92
+ if (requestParameters['userUuid'] == null) {
93
+ throw new runtime.RequiredError('userUuid', 'Required parameter "userUuid" was null or undefined when calling deleteUser().');
94
+ }
95
+ if (requestParameters['usersDeleteUserPayload'] == null) {
96
+ throw new runtime.RequiredError('usersDeleteUserPayload', 'Required parameter "usersDeleteUserPayload" was null or undefined when calling deleteUser().');
97
+ }
98
+ const queryParameters = {};
99
+ const headerParameters = {};
100
+ headerParameters['Content-Type'] = 'application/json';
101
+ if (this.configuration && this.configuration.accessToken) {
102
+ // oauth required
103
+ const token = this.configuration.accessToken;
104
+ const tokenString = yield token("OAuth2", ["crm:database", "crm:user"]);
105
+ if (tokenString) {
106
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
107
+ }
108
+ }
109
+ let urlPath = `/crm/api/v1/databases/{databaseUuid}/users/{userUuid}`;
110
+ urlPath = urlPath.replace(`{${"databaseUuid"}}`, encodeURIComponent(String(requestParameters['databaseUuid'])));
111
+ urlPath = urlPath.replace(`{${"userUuid"}}`, encodeURIComponent(String(requestParameters['userUuid'])));
112
+ return {
113
+ path: urlPath,
114
+ method: 'DELETE',
115
+ headers: headerParameters,
116
+ query: queryParameters,
117
+ body: (0, index_1.UsersDeleteUserPayloadToJSON)(requestParameters['usersDeleteUserPayload']),
118
+ };
119
+ });
120
+ }
121
+ /**
122
+ * Delete a user for the database
123
+ */
124
+ deleteUserRaw(requestParameters, initOverrides) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ const requestOptions = yield this.deleteUserRequestOpts(requestParameters);
127
+ const response = yield this.request(requestOptions, initOverrides);
128
+ return new runtime.VoidApiResponse(response);
129
+ });
130
+ }
131
+ /**
132
+ * Delete a user for the database
133
+ */
134
+ deleteUser(requestParameters, initOverrides) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ yield this.deleteUserRaw(requestParameters, initOverrides);
137
+ });
138
+ }
84
139
  /**
85
140
  * Creates request options for getDatabase without sending the request
86
141
  */
@@ -10,11 +10,16 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { DatabaseUpdateStatePayload, DatabasesDatabase, DatabasesListDatabasesResponse, UsersCreateUserPayload, UsersListUsersResponse, UsersUpdateUserPayload, UsersUser } from '../models/index';
13
+ import type { DatabaseUpdateStatePayload, DatabasesDatabase, DatabasesListDatabasesResponse, UsersCreateUserPayload, UsersDeleteUserPayload, UsersListUsersResponse, UsersUpdateUserPayload, UsersUser } from '../models/index';
14
14
  export interface CreateUserRequest {
15
15
  databaseUuid: string;
16
16
  usersCreateUserPayload: UsersCreateUserPayload;
17
17
  }
18
+ export interface DeleteUserRequest {
19
+ databaseUuid: string;
20
+ userUuid: string;
21
+ usersDeleteUserPayload: UsersDeleteUserPayload;
22
+ }
18
23
  export interface GetDatabaseRequest {
19
24
  databaseUuid: string;
20
25
  }
@@ -54,6 +59,18 @@ export declare class DatabasesApi extends runtime.BaseAPI {
54
59
  * Create a user for the database
55
60
  */
56
61
  createUser(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsersUser>;
62
+ /**
63
+ * Creates request options for deleteUser without sending the request
64
+ */
65
+ deleteUserRequestOpts(requestParameters: DeleteUserRequest): Promise<runtime.RequestOpts>;
66
+ /**
67
+ * Delete a user for the database
68
+ */
69
+ deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
70
+ /**
71
+ * Delete a user for the database
72
+ */
73
+ deleteUser(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
57
74
  /**
58
75
  * Creates request options for getDatabase without sending the request
59
76
  */
@@ -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 { DatabaseUpdateStatePayloadToJSON, DatabasesDatabaseFromJSON, DatabasesListDatabasesResponseFromJSON, UsersCreateUserPayloadToJSON, UsersListUsersResponseFromJSON, UsersUpdateUserPayloadToJSON, UsersUserFromJSON, } from '../models/index';
24
+ import { DatabaseUpdateStatePayloadToJSON, DatabasesDatabaseFromJSON, DatabasesListDatabasesResponseFromJSON, UsersCreateUserPayloadToJSON, UsersDeleteUserPayloadToJSON, UsersListUsersResponseFromJSON, UsersUpdateUserPayloadToJSON, UsersUserFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -78,6 +78,61 @@ export class DatabasesApi extends runtime.BaseAPI {
78
78
  return yield response.value();
79
79
  });
80
80
  }
81
+ /**
82
+ * Creates request options for deleteUser without sending the request
83
+ */
84
+ deleteUserRequestOpts(requestParameters) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ if (requestParameters['databaseUuid'] == null) {
87
+ throw new runtime.RequiredError('databaseUuid', 'Required parameter "databaseUuid" was null or undefined when calling deleteUser().');
88
+ }
89
+ if (requestParameters['userUuid'] == null) {
90
+ throw new runtime.RequiredError('userUuid', 'Required parameter "userUuid" was null or undefined when calling deleteUser().');
91
+ }
92
+ if (requestParameters['usersDeleteUserPayload'] == null) {
93
+ throw new runtime.RequiredError('usersDeleteUserPayload', 'Required parameter "usersDeleteUserPayload" was null or undefined when calling deleteUser().');
94
+ }
95
+ const queryParameters = {};
96
+ const headerParameters = {};
97
+ headerParameters['Content-Type'] = 'application/json';
98
+ if (this.configuration && this.configuration.accessToken) {
99
+ // oauth required
100
+ const token = this.configuration.accessToken;
101
+ const tokenString = yield token("OAuth2", ["crm:database", "crm:user"]);
102
+ if (tokenString) {
103
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
104
+ }
105
+ }
106
+ let urlPath = `/crm/api/v1/databases/{databaseUuid}/users/{userUuid}`;
107
+ urlPath = urlPath.replace(`{${"databaseUuid"}}`, encodeURIComponent(String(requestParameters['databaseUuid'])));
108
+ urlPath = urlPath.replace(`{${"userUuid"}}`, encodeURIComponent(String(requestParameters['userUuid'])));
109
+ return {
110
+ path: urlPath,
111
+ method: 'DELETE',
112
+ headers: headerParameters,
113
+ query: queryParameters,
114
+ body: UsersDeleteUserPayloadToJSON(requestParameters['usersDeleteUserPayload']),
115
+ };
116
+ });
117
+ }
118
+ /**
119
+ * Delete a user for the database
120
+ */
121
+ deleteUserRaw(requestParameters, initOverrides) {
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ const requestOptions = yield this.deleteUserRequestOpts(requestParameters);
124
+ const response = yield this.request(requestOptions, initOverrides);
125
+ return new runtime.VoidApiResponse(response);
126
+ });
127
+ }
128
+ /**
129
+ * Delete a user for the database
130
+ */
131
+ deleteUser(requestParameters, initOverrides) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ yield this.deleteUserRaw(requestParameters, initOverrides);
134
+ });
135
+ }
81
136
  /**
82
137
  * Creates request options for getDatabase without sending the request
83
138
  */
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Equisoft /connect API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: latest
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
+ *
14
+ * @export
15
+ * @interface UsersDeleteUserPayload
16
+ */
17
+ export interface UsersDeleteUserPayload {
18
+ /**
19
+ * User UUID to move deleted user data
20
+ * @type {string}
21
+ * @memberof UsersDeleteUserPayload
22
+ */
23
+ replaceByUserUuid?: string | null;
24
+ }
25
+ /**
26
+ * Check if a given object implements the UsersDeleteUserPayload interface.
27
+ */
28
+ export declare function instanceOfUsersDeleteUserPayload(value: object): value is UsersDeleteUserPayload;
29
+ export declare function UsersDeleteUserPayloadFromJSON(json: any): UsersDeleteUserPayload;
30
+ export declare function UsersDeleteUserPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsersDeleteUserPayload;
31
+ export declare function UsersDeleteUserPayloadToJSON(json: any): UsersDeleteUserPayload;
32
+ export declare function UsersDeleteUserPayloadToJSONTyped(value?: UsersDeleteUserPayload | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,41 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Equisoft /connect API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: latest
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 UsersDeleteUserPayload interface.
16
+ */
17
+ export function instanceOfUsersDeleteUserPayload(value) {
18
+ return true;
19
+ }
20
+ export function UsersDeleteUserPayloadFromJSON(json) {
21
+ return UsersDeleteUserPayloadFromJSONTyped(json, false);
22
+ }
23
+ export function UsersDeleteUserPayloadFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'replaceByUserUuid': json['replaceByUserUuid'] == null ? undefined : json['replaceByUserUuid'],
29
+ };
30
+ }
31
+ export function UsersDeleteUserPayloadToJSON(json) {
32
+ return UsersDeleteUserPayloadToJSONTyped(json, false);
33
+ }
34
+ export function UsersDeleteUserPayloadToJSONTyped(value, ignoreDiscriminator = false) {
35
+ if (value == null) {
36
+ return value;
37
+ }
38
+ return {
39
+ 'replaceByUserUuid': value['replaceByUserUuid'],
40
+ };
41
+ }
@@ -293,6 +293,7 @@ export * from './TasksTransferToCompletedResponse';
293
293
  export * from './TasksVisibilityType';
294
294
  export * from './Translation';
295
295
  export * from './UsersCreateUserPayload';
296
+ export * from './UsersDeleteUserPayload';
296
297
  export * from './UsersListUsersResponse';
297
298
  export * from './UsersRole';
298
299
  export * from './UsersUpdateUserPayload';
@@ -295,6 +295,7 @@ export * from './TasksTransferToCompletedResponse';
295
295
  export * from './TasksVisibilityType';
296
296
  export * from './Translation';
297
297
  export * from './UsersCreateUserPayload';
298
+ export * from './UsersDeleteUserPayload';
298
299
  export * from './UsersListUsersResponse';
299
300
  export * from './UsersRole';
300
301
  export * from './UsersUpdateUserPayload';
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Equisoft /connect API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: latest
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
+ *
14
+ * @export
15
+ * @interface UsersDeleteUserPayload
16
+ */
17
+ export interface UsersDeleteUserPayload {
18
+ /**
19
+ * User UUID to move deleted user data
20
+ * @type {string}
21
+ * @memberof UsersDeleteUserPayload
22
+ */
23
+ replaceByUserUuid?: string | null;
24
+ }
25
+ /**
26
+ * Check if a given object implements the UsersDeleteUserPayload interface.
27
+ */
28
+ export declare function instanceOfUsersDeleteUserPayload(value: object): value is UsersDeleteUserPayload;
29
+ export declare function UsersDeleteUserPayloadFromJSON(json: any): UsersDeleteUserPayload;
30
+ export declare function UsersDeleteUserPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsersDeleteUserPayload;
31
+ export declare function UsersDeleteUserPayloadToJSON(json: any): UsersDeleteUserPayload;
32
+ export declare function UsersDeleteUserPayloadToJSONTyped(value?: UsersDeleteUserPayload | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Equisoft /connect API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: latest
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.instanceOfUsersDeleteUserPayload = instanceOfUsersDeleteUserPayload;
17
+ exports.UsersDeleteUserPayloadFromJSON = UsersDeleteUserPayloadFromJSON;
18
+ exports.UsersDeleteUserPayloadFromJSONTyped = UsersDeleteUserPayloadFromJSONTyped;
19
+ exports.UsersDeleteUserPayloadToJSON = UsersDeleteUserPayloadToJSON;
20
+ exports.UsersDeleteUserPayloadToJSONTyped = UsersDeleteUserPayloadToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the UsersDeleteUserPayload interface.
23
+ */
24
+ function instanceOfUsersDeleteUserPayload(value) {
25
+ return true;
26
+ }
27
+ function UsersDeleteUserPayloadFromJSON(json) {
28
+ return UsersDeleteUserPayloadFromJSONTyped(json, false);
29
+ }
30
+ function UsersDeleteUserPayloadFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'replaceByUserUuid': json['replaceByUserUuid'] == null ? undefined : json['replaceByUserUuid'],
36
+ };
37
+ }
38
+ function UsersDeleteUserPayloadToJSON(json) {
39
+ return UsersDeleteUserPayloadToJSONTyped(json, false);
40
+ }
41
+ function UsersDeleteUserPayloadToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'replaceByUserUuid': value['replaceByUserUuid'],
47
+ };
48
+ }
@@ -293,6 +293,7 @@ export * from './TasksTransferToCompletedResponse';
293
293
  export * from './TasksVisibilityType';
294
294
  export * from './Translation';
295
295
  export * from './UsersCreateUserPayload';
296
+ export * from './UsersDeleteUserPayload';
296
297
  export * from './UsersListUsersResponse';
297
298
  export * from './UsersRole';
298
299
  export * from './UsersUpdateUserPayload';
@@ -311,6 +311,7 @@ __exportStar(require("./TasksTransferToCompletedResponse"), exports);
311
311
  __exportStar(require("./TasksVisibilityType"), exports);
312
312
  __exportStar(require("./Translation"), exports);
313
313
  __exportStar(require("./UsersCreateUserPayload"), exports);
314
+ __exportStar(require("./UsersDeleteUserPayload"), exports);
314
315
  __exportStar(require("./UsersListUsersResponse"), exports);
315
316
  __exportStar(require("./UsersRole"), exports);
316
317
  __exportStar(require("./UsersUpdateUserPayload"), exports);
@@ -5,6 +5,7 @@ All URIs are relative to *http://localhost*
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
7
  | [**createUser**](DatabasesApi.md#createuser) | **POST** /crm/api/v1/databases/{databaseUuid}/users | Create a user for the database |
8
+ | [**deleteUser**](DatabasesApi.md#deleteuser) | **DELETE** /crm/api/v1/databases/{databaseUuid}/users/{userUuid} | Delete a user for the database |
8
9
  | [**getDatabase**](DatabasesApi.md#getdatabase) | **GET** /crm/api/v1/databases/{databaseUuid} | Get a database |
9
10
  | [**getUser**](DatabasesApi.md#getuser) | **GET** /crm/api/v1/databases/{databaseUuid}/users/{userId} | Get a database\&#39;s user |
10
11
  | [**listDatabases**](DatabasesApi.md#listdatabases) | **GET** /crm/api/v1/databases | List all databases |
@@ -89,6 +90,84 @@ example().catch(console.error);
89
90
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
90
91
 
91
92
 
93
+ ## deleteUser
94
+
95
+ > deleteUser(databaseUuid, userUuid, usersDeleteUserPayload)
96
+
97
+ Delete a user for the database
98
+
99
+ ### Example
100
+
101
+ ```ts
102
+ import {
103
+ Configuration,
104
+ DatabasesApi,
105
+ } from '@equisoft/equisoft-connect-sdk-typescript';
106
+ import type { DeleteUserRequest } from '@equisoft/equisoft-connect-sdk-typescript';
107
+
108
+ async function example() {
109
+ console.log("🚀 Testing @equisoft/equisoft-connect-sdk-typescript SDK...");
110
+ const config = new Configuration({
111
+ // To configure OAuth2 access token for authorization: OAuth2 accessCode
112
+ accessToken: "YOUR ACCESS TOKEN",
113
+ });
114
+ const api = new DatabasesApi(config);
115
+
116
+ const body = {
117
+ // string | Database unique identifier.
118
+ databaseUuid: databaseUuid_example,
119
+ // string | User uuid.
120
+ userUuid: userUuid_example,
121
+ // UsersDeleteUserPayload
122
+ usersDeleteUserPayload: ...,
123
+ } satisfies DeleteUserRequest;
124
+
125
+ try {
126
+ const data = await api.deleteUser(body);
127
+ console.log(data);
128
+ } catch (error) {
129
+ console.error(error);
130
+ }
131
+ }
132
+
133
+ // Run the test
134
+ example().catch(console.error);
135
+ ```
136
+
137
+ ### Parameters
138
+
139
+
140
+ | Name | Type | Description | Notes |
141
+ |------------- | ------------- | ------------- | -------------|
142
+ | **databaseUuid** | `string` | Database unique identifier. | [Defaults to `undefined`] |
143
+ | **userUuid** | `string` | User uuid. | [Defaults to `undefined`] |
144
+ | **usersDeleteUserPayload** | [UsersDeleteUserPayload](UsersDeleteUserPayload.md) | | |
145
+
146
+ ### Return type
147
+
148
+ `void` (Empty response body)
149
+
150
+ ### Authorization
151
+
152
+ [OAuth2 accessCode](../README.md#OAuth2-accessCode)
153
+
154
+ ### HTTP request headers
155
+
156
+ - **Content-Type**: `application/json`
157
+ - **Accept**: `application/json`
158
+
159
+
160
+ ### HTTP response details
161
+ | Status code | Description | Response headers |
162
+ |-------------|-------------|------------------|
163
+ | **204** | No Content | - |
164
+ | **401** | Unauthorized | - |
165
+ | **404** | Not Found | - |
166
+ | **500** | Internal Server Error | - |
167
+
168
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
169
+
170
+
92
171
  ## getDatabase
93
172
 
94
173
  > DatabasesDatabase getDatabase(databaseUuid)
@@ -0,0 +1,34 @@
1
+
2
+ # UsersDeleteUserPayload
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `replaceByUserUuid` | string
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { UsersDeleteUserPayload } from '@equisoft/equisoft-connect-sdk-typescript'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "replaceByUserUuid": null,
19
+ } satisfies UsersDeleteUserPayload
20
+
21
+ console.log(example)
22
+
23
+ // Convert the instance to a JSON string
24
+ const exampleJSON: string = JSON.stringify(example)
25
+ console.log(exampleJSON)
26
+
27
+ // Parse the JSON string back to an object
28
+ const exampleParsed = JSON.parse(exampleJSON) as UsersDeleteUserPayload
29
+ console.log(exampleParsed)
30
+ ```
31
+
32
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
+
34
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equisoft/equisoft-connect-sdk-typescript",
3
- "version": "13.53.1-snapshot.20260629144056",
3
+ "version": "13.54.0",
4
4
  "description": "OpenAPI client for @equisoft/equisoft-connect-sdk-typescript",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -20,6 +20,7 @@ import type {
20
20
  DatabasesListDatabasesResponse,
21
21
  ErrorResponse,
22
22
  UsersCreateUserPayload,
23
+ UsersDeleteUserPayload,
23
24
  UsersListUsersResponse,
24
25
  UsersUpdateUserPayload,
25
26
  UsersUser,
@@ -35,6 +36,8 @@ import {
35
36
  ErrorResponseToJSON,
36
37
  UsersCreateUserPayloadFromJSON,
37
38
  UsersCreateUserPayloadToJSON,
39
+ UsersDeleteUserPayloadFromJSON,
40
+ UsersDeleteUserPayloadToJSON,
38
41
  UsersListUsersResponseFromJSON,
39
42
  UsersListUsersResponseToJSON,
40
43
  UsersUpdateUserPayloadFromJSON,
@@ -48,6 +51,12 @@ export interface CreateUserRequest {
48
51
  usersCreateUserPayload: UsersCreateUserPayload;
49
52
  }
50
53
 
54
+ export interface DeleteUserRequest {
55
+ databaseUuid: string;
56
+ userUuid: string;
57
+ usersDeleteUserPayload: UsersDeleteUserPayload;
58
+ }
59
+
51
60
  export interface GetDatabaseRequest {
52
61
  databaseUuid: string;
53
62
  }
@@ -146,6 +155,77 @@ export class DatabasesApi extends runtime.BaseAPI {
146
155
  return await response.value();
147
156
  }
148
157
 
158
+ /**
159
+ * Creates request options for deleteUser without sending the request
160
+ */
161
+ async deleteUserRequestOpts(requestParameters: DeleteUserRequest): Promise<runtime.RequestOpts> {
162
+ if (requestParameters['databaseUuid'] == null) {
163
+ throw new runtime.RequiredError(
164
+ 'databaseUuid',
165
+ 'Required parameter "databaseUuid" was null or undefined when calling deleteUser().'
166
+ );
167
+ }
168
+
169
+ if (requestParameters['userUuid'] == null) {
170
+ throw new runtime.RequiredError(
171
+ 'userUuid',
172
+ 'Required parameter "userUuid" was null or undefined when calling deleteUser().'
173
+ );
174
+ }
175
+
176
+ if (requestParameters['usersDeleteUserPayload'] == null) {
177
+ throw new runtime.RequiredError(
178
+ 'usersDeleteUserPayload',
179
+ 'Required parameter "usersDeleteUserPayload" was null or undefined when calling deleteUser().'
180
+ );
181
+ }
182
+
183
+ const queryParameters: any = {};
184
+
185
+ const headerParameters: runtime.HTTPHeaders = {};
186
+
187
+ headerParameters['Content-Type'] = 'application/json';
188
+
189
+ if (this.configuration && this.configuration.accessToken) {
190
+ // oauth required
191
+ const token = this.configuration.accessToken;
192
+ const tokenString = await token("OAuth2", ["crm:database", "crm:user"]);
193
+ if (tokenString) {
194
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
195
+ }
196
+ }
197
+
198
+
199
+ let urlPath = `/crm/api/v1/databases/{databaseUuid}/users/{userUuid}`;
200
+ urlPath = urlPath.replace(`{${"databaseUuid"}}`, encodeURIComponent(String(requestParameters['databaseUuid'])));
201
+ urlPath = urlPath.replace(`{${"userUuid"}}`, encodeURIComponent(String(requestParameters['userUuid'])));
202
+
203
+ return {
204
+ path: urlPath,
205
+ method: 'DELETE',
206
+ headers: headerParameters,
207
+ query: queryParameters,
208
+ body: UsersDeleteUserPayloadToJSON(requestParameters['usersDeleteUserPayload']),
209
+ };
210
+ }
211
+
212
+ /**
213
+ * Delete a user for the database
214
+ */
215
+ async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
216
+ const requestOptions = await this.deleteUserRequestOpts(requestParameters);
217
+ const response = await this.request(requestOptions, initOverrides);
218
+
219
+ return new runtime.VoidApiResponse(response);
220
+ }
221
+
222
+ /**
223
+ * Delete a user for the database
224
+ */
225
+ async deleteUser(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
226
+ await this.deleteUserRaw(requestParameters, initOverrides);
227
+ }
228
+
149
229
  /**
150
230
  * Creates request options for getDatabase without sending the request
151
231
  */
@@ -0,0 +1,65 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Equisoft /connect API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: latest
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
+ *
18
+ * @export
19
+ * @interface UsersDeleteUserPayload
20
+ */
21
+ export interface UsersDeleteUserPayload {
22
+ /**
23
+ * User UUID to move deleted user data
24
+ * @type {string}
25
+ * @memberof UsersDeleteUserPayload
26
+ */
27
+ replaceByUserUuid?: string | null;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the UsersDeleteUserPayload interface.
32
+ */
33
+ export function instanceOfUsersDeleteUserPayload(value: object): value is UsersDeleteUserPayload {
34
+ return true;
35
+ }
36
+
37
+ export function UsersDeleteUserPayloadFromJSON(json: any): UsersDeleteUserPayload {
38
+ return UsersDeleteUserPayloadFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function UsersDeleteUserPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsersDeleteUserPayload {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'replaceByUserUuid': json['replaceByUserUuid'] == null ? undefined : json['replaceByUserUuid'],
48
+ };
49
+ }
50
+
51
+ export function UsersDeleteUserPayloadToJSON(json: any): UsersDeleteUserPayload {
52
+ return UsersDeleteUserPayloadToJSONTyped(json, false);
53
+ }
54
+
55
+ export function UsersDeleteUserPayloadToJSONTyped(value?: UsersDeleteUserPayload | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'replaceByUserUuid': value['replaceByUserUuid'],
63
+ };
64
+ }
65
+
@@ -295,6 +295,7 @@ export * from './TasksTransferToCompletedResponse';
295
295
  export * from './TasksVisibilityType';
296
296
  export * from './Translation';
297
297
  export * from './UsersCreateUserPayload';
298
+ export * from './UsersDeleteUserPayload';
298
299
  export * from './UsersListUsersResponse';
299
300
  export * from './UsersRole';
300
301
  export * from './UsersUpdateUserPayload';