@equisoft/equisoft-connect-sdk-typescript 13.53.0 → 13.53.1-snapshot.20260615125727

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.
@@ -312,6 +312,7 @@ docs/TasksTransferToCompletedResponse.md
312
312
  docs/TasksVisibilityType.md
313
313
  docs/Translation.md
314
314
  docs/UsersApi.md
315
+ docs/UsersCreateUserPayload.md
315
316
  docs/UsersListUsersResponse.md
316
317
  docs/UsersRole.md
317
318
  docs/UsersUpdateUserPayload.md
@@ -633,6 +634,7 @@ src/models/TasksTask.ts
633
634
  src/models/TasksTransferToCompletedResponse.ts
634
635
  src/models/TasksVisibilityType.ts
635
636
  src/models/Translation.ts
637
+ src/models/UsersCreateUserPayload.ts
636
638
  src/models/UsersListUsersResponse.ts
637
639
  src/models/UsersRole.ts
638
640
  src/models/UsersUpdateUserPayload.ts
package/README.md CHANGED
@@ -63,6 +63,7 @@ All URIs are relative to *http://localhost*
63
63
  *ContactsApi* | [**listContactInvestment**](docs/ContactsApi.md#listcontactinvestment) | **GET** /crm/api/v1/contacts/{contactUuid}/investmentAccounts | List contact investments
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
+ *DatabasesApi* | [**createUser**](docs/DatabasesApi.md#createuser) | **POST** /crm/api/v1/databases/{databaseUuid}/users | Create a user for the database
66
67
  *DatabasesApi* | [**getDatabase**](docs/DatabasesApi.md#getdatabase) | **GET** /crm/api/v1/databases/{databaseUuid} | Get a database
67
68
  *DatabasesApi* | [**getUser**](docs/DatabasesApi.md#getuser) | **GET** /crm/api/v1/databases/{databaseUuid}/users/{userId} | Get a database\'s user
68
69
  *DatabasesApi* | [**listDatabases**](docs/DatabasesApi.md#listdatabases) | **GET** /crm/api/v1/databases | List all databases
@@ -491,6 +492,7 @@ All URIs are relative to *http://localhost*
491
492
  - [TasksTransferToCompletedResponse](docs/TasksTransferToCompletedResponse.md)
492
493
  - [TasksVisibilityType](docs/TasksVisibilityType.md)
493
494
  - [Translation](docs/Translation.md)
495
+ - [UsersCreateUserPayload](docs/UsersCreateUserPayload.md)
494
496
  - [UsersListUsersResponse](docs/UsersListUsersResponse.md)
495
497
  - [UsersRole](docs/UsersRole.md)
496
498
  - [UsersUpdateUserPayload](docs/UsersUpdateUserPayload.md)
@@ -10,7 +10,11 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { DatabaseUpdateStatePayload, DatabasesDatabase, DatabasesListDatabasesResponse, UsersListUsersResponse, UsersUpdateUserPayload, UsersUser } from '../models/index';
13
+ import type { DatabaseUpdateStatePayload, DatabasesDatabase, DatabasesListDatabasesResponse, UsersCreateUserPayload, UsersListUsersResponse, UsersUpdateUserPayload, UsersUser } from '../models/index';
14
+ export interface CreateUserRequest {
15
+ databaseUuid: string;
16
+ usersCreateUserPayload: UsersCreateUserPayload;
17
+ }
14
18
  export interface GetDatabaseRequest {
15
19
  databaseUuid: string;
16
20
  }
@@ -38,6 +42,18 @@ export interface UpdateUserRequest {
38
42
  *
39
43
  */
40
44
  export declare class DatabasesApi extends runtime.BaseAPI {
45
+ /**
46
+ * Creates request options for createUser without sending the request
47
+ */
48
+ createUserRequestOpts(requestParameters: CreateUserRequest): Promise<runtime.RequestOpts>;
49
+ /**
50
+ * Create a user for the database
51
+ */
52
+ createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsersUser>>;
53
+ /**
54
+ * Create a user for the database
55
+ */
56
+ createUser(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsersUser>;
41
57
  /**
42
58
  * Creates request options for getDatabase without sending the request
43
59
  */
@@ -29,6 +29,58 @@ const index_1 = require("../models/index");
29
29
  *
30
30
  */
31
31
  class DatabasesApi extends runtime.BaseAPI {
32
+ /**
33
+ * Creates request options for createUser without sending the request
34
+ */
35
+ createUserRequestOpts(requestParameters) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters['databaseUuid'] == null) {
38
+ throw new runtime.RequiredError('databaseUuid', 'Required parameter "databaseUuid" was null or undefined when calling createUser().');
39
+ }
40
+ if (requestParameters['usersCreateUserPayload'] == null) {
41
+ throw new runtime.RequiredError('usersCreateUserPayload', 'Required parameter "usersCreateUserPayload" was null or undefined when calling createUser().');
42
+ }
43
+ const queryParameters = {};
44
+ const headerParameters = {};
45
+ headerParameters['Content-Type'] = 'application/json';
46
+ if (this.configuration && this.configuration.accessToken) {
47
+ // oauth required
48
+ const token = this.configuration.accessToken;
49
+ const tokenString = yield token("OAuth2", ["crm:database", "crm:user"]);
50
+ if (tokenString) {
51
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
52
+ }
53
+ }
54
+ let urlPath = `/crm/api/v1/databases/{databaseUuid}/users`;
55
+ urlPath = urlPath.replace(`{${"databaseUuid"}}`, encodeURIComponent(String(requestParameters['databaseUuid'])));
56
+ return {
57
+ path: urlPath,
58
+ method: 'POST',
59
+ headers: headerParameters,
60
+ query: queryParameters,
61
+ body: (0, index_1.UsersCreateUserPayloadToJSON)(requestParameters['usersCreateUserPayload']),
62
+ };
63
+ });
64
+ }
65
+ /**
66
+ * Create a user for the database
67
+ */
68
+ createUserRaw(requestParameters, initOverrides) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ const requestOptions = yield this.createUserRequestOpts(requestParameters);
71
+ const response = yield this.request(requestOptions, initOverrides);
72
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UsersUserFromJSON)(jsonValue));
73
+ });
74
+ }
75
+ /**
76
+ * Create a user for the database
77
+ */
78
+ createUser(requestParameters, initOverrides) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ const response = yield this.createUserRaw(requestParameters, initOverrides);
81
+ return yield response.value();
82
+ });
83
+ }
32
84
  /**
33
85
  * Creates request options for getDatabase without sending the request
34
86
  */
@@ -10,7 +10,11 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { DatabaseUpdateStatePayload, DatabasesDatabase, DatabasesListDatabasesResponse, UsersListUsersResponse, UsersUpdateUserPayload, UsersUser } from '../models/index';
13
+ import type { DatabaseUpdateStatePayload, DatabasesDatabase, DatabasesListDatabasesResponse, UsersCreateUserPayload, UsersListUsersResponse, UsersUpdateUserPayload, UsersUser } from '../models/index';
14
+ export interface CreateUserRequest {
15
+ databaseUuid: string;
16
+ usersCreateUserPayload: UsersCreateUserPayload;
17
+ }
14
18
  export interface GetDatabaseRequest {
15
19
  databaseUuid: string;
16
20
  }
@@ -38,6 +42,18 @@ export interface UpdateUserRequest {
38
42
  *
39
43
  */
40
44
  export declare class DatabasesApi extends runtime.BaseAPI {
45
+ /**
46
+ * Creates request options for createUser without sending the request
47
+ */
48
+ createUserRequestOpts(requestParameters: CreateUserRequest): Promise<runtime.RequestOpts>;
49
+ /**
50
+ * Create a user for the database
51
+ */
52
+ createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsersUser>>;
53
+ /**
54
+ * Create a user for the database
55
+ */
56
+ createUser(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsersUser>;
41
57
  /**
42
58
  * Creates request options for getDatabase without sending the request
43
59
  */
@@ -21,11 +21,63 @@ 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, UsersListUsersResponseFromJSON, UsersUpdateUserPayloadToJSON, UsersUserFromJSON, } from '../models/index';
24
+ import { DatabaseUpdateStatePayloadToJSON, DatabasesDatabaseFromJSON, DatabasesListDatabasesResponseFromJSON, UsersCreateUserPayloadToJSON, UsersListUsersResponseFromJSON, UsersUpdateUserPayloadToJSON, UsersUserFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
28
28
  export class DatabasesApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for createUser without sending the request
31
+ */
32
+ createUserRequestOpts(requestParameters) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['databaseUuid'] == null) {
35
+ throw new runtime.RequiredError('databaseUuid', 'Required parameter "databaseUuid" was null or undefined when calling createUser().');
36
+ }
37
+ if (requestParameters['usersCreateUserPayload'] == null) {
38
+ throw new runtime.RequiredError('usersCreateUserPayload', 'Required parameter "usersCreateUserPayload" was null or undefined when calling createUser().');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ headerParameters['Content-Type'] = 'application/json';
43
+ if (this.configuration && this.configuration.accessToken) {
44
+ // oauth required
45
+ const token = this.configuration.accessToken;
46
+ const tokenString = yield token("OAuth2", ["crm:database", "crm:user"]);
47
+ if (tokenString) {
48
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
49
+ }
50
+ }
51
+ let urlPath = `/crm/api/v1/databases/{databaseUuid}/users`;
52
+ urlPath = urlPath.replace(`{${"databaseUuid"}}`, encodeURIComponent(String(requestParameters['databaseUuid'])));
53
+ return {
54
+ path: urlPath,
55
+ method: 'POST',
56
+ headers: headerParameters,
57
+ query: queryParameters,
58
+ body: UsersCreateUserPayloadToJSON(requestParameters['usersCreateUserPayload']),
59
+ };
60
+ });
61
+ }
62
+ /**
63
+ * Create a user for the database
64
+ */
65
+ createUserRaw(requestParameters, initOverrides) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ const requestOptions = yield this.createUserRequestOpts(requestParameters);
68
+ const response = yield this.request(requestOptions, initOverrides);
69
+ return new runtime.JSONApiResponse(response, (jsonValue) => UsersUserFromJSON(jsonValue));
70
+ });
71
+ }
72
+ /**
73
+ * Create a user for the database
74
+ */
75
+ createUser(requestParameters, initOverrides) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ const response = yield this.createUserRaw(requestParameters, initOverrides);
78
+ return yield response.value();
79
+ });
80
+ }
29
81
  /**
30
82
  * Creates request options for getDatabase without sending the request
31
83
  */
@@ -0,0 +1,44 @@
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 UsersCreateUserPayload
16
+ */
17
+ export interface UsersCreateUserPayload {
18
+ /**
19
+ * UserAccount UUID to bind user on
20
+ * @type {string}
21
+ * @memberof UsersCreateUserPayload
22
+ */
23
+ userAccountUuid: string;
24
+ /**
25
+ * User role
26
+ * @type {string}
27
+ * @memberof UsersCreateUserPayload
28
+ */
29
+ role: string;
30
+ /**
31
+ * Maximum number of concurrent access for the user. If not provided, it will default to 1.
32
+ * @type {number}
33
+ * @memberof UsersCreateUserPayload
34
+ */
35
+ maxConcurrentAccess?: number | null;
36
+ }
37
+ /**
38
+ * Check if a given object implements the UsersCreateUserPayload interface.
39
+ */
40
+ export declare function instanceOfUsersCreateUserPayload(value: object): value is UsersCreateUserPayload;
41
+ export declare function UsersCreateUserPayloadFromJSON(json: any): UsersCreateUserPayload;
42
+ export declare function UsersCreateUserPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsersCreateUserPayload;
43
+ export declare function UsersCreateUserPayloadToJSON(json: any): UsersCreateUserPayload;
44
+ export declare function UsersCreateUserPayloadToJSONTyped(value?: UsersCreateUserPayload | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,49 @@
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 UsersCreateUserPayload interface.
16
+ */
17
+ export function instanceOfUsersCreateUserPayload(value) {
18
+ if (!('userAccountUuid' in value) || value['userAccountUuid'] === undefined)
19
+ return false;
20
+ if (!('role' in value) || value['role'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function UsersCreateUserPayloadFromJSON(json) {
25
+ return UsersCreateUserPayloadFromJSONTyped(json, false);
26
+ }
27
+ export function UsersCreateUserPayloadFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'userAccountUuid': json['userAccountUuid'],
33
+ 'role': json['role'],
34
+ 'maxConcurrentAccess': json['maxConcurrentAccess'] == null ? undefined : json['maxConcurrentAccess'],
35
+ };
36
+ }
37
+ export function UsersCreateUserPayloadToJSON(json) {
38
+ return UsersCreateUserPayloadToJSONTyped(json, false);
39
+ }
40
+ export function UsersCreateUserPayloadToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'userAccountUuid': value['userAccountUuid'],
46
+ 'role': value['role'],
47
+ 'maxConcurrentAccess': value['maxConcurrentAccess'],
48
+ };
49
+ }
@@ -292,6 +292,7 @@ export * from './TasksTask';
292
292
  export * from './TasksTransferToCompletedResponse';
293
293
  export * from './TasksVisibilityType';
294
294
  export * from './Translation';
295
+ export * from './UsersCreateUserPayload';
295
296
  export * from './UsersListUsersResponse';
296
297
  export * from './UsersRole';
297
298
  export * from './UsersUpdateUserPayload';
@@ -294,6 +294,7 @@ export * from './TasksTask';
294
294
  export * from './TasksTransferToCompletedResponse';
295
295
  export * from './TasksVisibilityType';
296
296
  export * from './Translation';
297
+ export * from './UsersCreateUserPayload';
297
298
  export * from './UsersListUsersResponse';
298
299
  export * from './UsersRole';
299
300
  export * from './UsersUpdateUserPayload';
@@ -0,0 +1,44 @@
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 UsersCreateUserPayload
16
+ */
17
+ export interface UsersCreateUserPayload {
18
+ /**
19
+ * UserAccount UUID to bind user on
20
+ * @type {string}
21
+ * @memberof UsersCreateUserPayload
22
+ */
23
+ userAccountUuid: string;
24
+ /**
25
+ * User role
26
+ * @type {string}
27
+ * @memberof UsersCreateUserPayload
28
+ */
29
+ role: string;
30
+ /**
31
+ * Maximum number of concurrent access for the user. If not provided, it will default to 1.
32
+ * @type {number}
33
+ * @memberof UsersCreateUserPayload
34
+ */
35
+ maxConcurrentAccess?: number | null;
36
+ }
37
+ /**
38
+ * Check if a given object implements the UsersCreateUserPayload interface.
39
+ */
40
+ export declare function instanceOfUsersCreateUserPayload(value: object): value is UsersCreateUserPayload;
41
+ export declare function UsersCreateUserPayloadFromJSON(json: any): UsersCreateUserPayload;
42
+ export declare function UsersCreateUserPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsersCreateUserPayload;
43
+ export declare function UsersCreateUserPayloadToJSON(json: any): UsersCreateUserPayload;
44
+ export declare function UsersCreateUserPayloadToJSONTyped(value?: UsersCreateUserPayload | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,56 @@
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.instanceOfUsersCreateUserPayload = instanceOfUsersCreateUserPayload;
17
+ exports.UsersCreateUserPayloadFromJSON = UsersCreateUserPayloadFromJSON;
18
+ exports.UsersCreateUserPayloadFromJSONTyped = UsersCreateUserPayloadFromJSONTyped;
19
+ exports.UsersCreateUserPayloadToJSON = UsersCreateUserPayloadToJSON;
20
+ exports.UsersCreateUserPayloadToJSONTyped = UsersCreateUserPayloadToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the UsersCreateUserPayload interface.
23
+ */
24
+ function instanceOfUsersCreateUserPayload(value) {
25
+ if (!('userAccountUuid' in value) || value['userAccountUuid'] === undefined)
26
+ return false;
27
+ if (!('role' in value) || value['role'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function UsersCreateUserPayloadFromJSON(json) {
32
+ return UsersCreateUserPayloadFromJSONTyped(json, false);
33
+ }
34
+ function UsersCreateUserPayloadFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'userAccountUuid': json['userAccountUuid'],
40
+ 'role': json['role'],
41
+ 'maxConcurrentAccess': json['maxConcurrentAccess'] == null ? undefined : json['maxConcurrentAccess'],
42
+ };
43
+ }
44
+ function UsersCreateUserPayloadToJSON(json) {
45
+ return UsersCreateUserPayloadToJSONTyped(json, false);
46
+ }
47
+ function UsersCreateUserPayloadToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'userAccountUuid': value['userAccountUuid'],
53
+ 'role': value['role'],
54
+ 'maxConcurrentAccess': value['maxConcurrentAccess'],
55
+ };
56
+ }
@@ -292,6 +292,7 @@ export * from './TasksTask';
292
292
  export * from './TasksTransferToCompletedResponse';
293
293
  export * from './TasksVisibilityType';
294
294
  export * from './Translation';
295
+ export * from './UsersCreateUserPayload';
295
296
  export * from './UsersListUsersResponse';
296
297
  export * from './UsersRole';
297
298
  export * from './UsersUpdateUserPayload';
@@ -310,6 +310,7 @@ __exportStar(require("./TasksTask"), exports);
310
310
  __exportStar(require("./TasksTransferToCompletedResponse"), exports);
311
311
  __exportStar(require("./TasksVisibilityType"), exports);
312
312
  __exportStar(require("./Translation"), exports);
313
+ __exportStar(require("./UsersCreateUserPayload"), exports);
313
314
  __exportStar(require("./UsersListUsersResponse"), exports);
314
315
  __exportStar(require("./UsersRole"), exports);
315
316
  __exportStar(require("./UsersUpdateUserPayload"), exports);
@@ -4,6 +4,7 @@ All URIs are relative to *http://localhost*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
+ | [**createUser**](DatabasesApi.md#createuser) | **POST** /crm/api/v1/databases/{databaseUuid}/users | Create a user for the database |
7
8
  | [**getDatabase**](DatabasesApi.md#getdatabase) | **GET** /crm/api/v1/databases/{databaseUuid} | Get a database |
8
9
  | [**getUser**](DatabasesApi.md#getuser) | **GET** /crm/api/v1/databases/{databaseUuid}/users/{userId} | Get a database\&#39;s user |
9
10
  | [**listDatabases**](DatabasesApi.md#listdatabases) | **GET** /crm/api/v1/databases | List all databases |
@@ -13,6 +14,81 @@ All URIs are relative to *http://localhost*
13
14
 
14
15
 
15
16
 
17
+ ## createUser
18
+
19
+ > UsersUser createUser(databaseUuid, usersCreateUserPayload)
20
+
21
+ Create a user for the database
22
+
23
+ ### Example
24
+
25
+ ```ts
26
+ import {
27
+ Configuration,
28
+ DatabasesApi,
29
+ } from '@equisoft/equisoft-connect-sdk-typescript';
30
+ import type { CreateUserRequest } from '@equisoft/equisoft-connect-sdk-typescript';
31
+
32
+ async function example() {
33
+ console.log("🚀 Testing @equisoft/equisoft-connect-sdk-typescript SDK...");
34
+ const config = new Configuration({
35
+ // To configure OAuth2 access token for authorization: OAuth2 accessCode
36
+ accessToken: "YOUR ACCESS TOKEN",
37
+ });
38
+ const api = new DatabasesApi(config);
39
+
40
+ const body = {
41
+ // string | Database unique identifier.
42
+ databaseUuid: databaseUuid_example,
43
+ // UsersCreateUserPayload
44
+ usersCreateUserPayload: ...,
45
+ } satisfies CreateUserRequest;
46
+
47
+ try {
48
+ const data = await api.createUser(body);
49
+ console.log(data);
50
+ } catch (error) {
51
+ console.error(error);
52
+ }
53
+ }
54
+
55
+ // Run the test
56
+ example().catch(console.error);
57
+ ```
58
+
59
+ ### Parameters
60
+
61
+
62
+ | Name | Type | Description | Notes |
63
+ |------------- | ------------- | ------------- | -------------|
64
+ | **databaseUuid** | `string` | Database unique identifier. | [Defaults to `undefined`] |
65
+ | **usersCreateUserPayload** | [UsersCreateUserPayload](UsersCreateUserPayload.md) | | |
66
+
67
+ ### Return type
68
+
69
+ [**UsersUser**](UsersUser.md)
70
+
71
+ ### Authorization
72
+
73
+ [OAuth2 accessCode](../README.md#OAuth2-accessCode)
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: `application/json`
78
+ - **Accept**: `application/json`
79
+
80
+
81
+ ### HTTP response details
82
+ | Status code | Description | Response headers |
83
+ |-------------|-------------|------------------|
84
+ | **201** | Created | - |
85
+ | **401** | Unauthorized | - |
86
+ | **404** | Not Found | - |
87
+ | **500** | Internal Server Error | - |
88
+
89
+ [[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
+
16
92
  ## getDatabase
17
93
 
18
94
  > DatabasesDatabase getDatabase(databaseUuid)
@@ -0,0 +1,38 @@
1
+
2
+ # UsersCreateUserPayload
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `userAccountUuid` | string
10
+ `role` | string
11
+ `maxConcurrentAccess` | number
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { UsersCreateUserPayload } from '@equisoft/equisoft-connect-sdk-typescript'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "userAccountUuid": null,
21
+ "role": null,
22
+ "maxConcurrentAccess": null,
23
+ } satisfies UsersCreateUserPayload
24
+
25
+ console.log(example)
26
+
27
+ // Convert the instance to a JSON string
28
+ const exampleJSON: string = JSON.stringify(example)
29
+ console.log(exampleJSON)
30
+
31
+ // Parse the JSON string back to an object
32
+ const exampleParsed = JSON.parse(exampleJSON) as UsersCreateUserPayload
33
+ console.log(exampleParsed)
34
+ ```
35
+
36
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
37
+
38
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equisoft/equisoft-connect-sdk-typescript",
3
- "version": "13.53.0",
3
+ "version": "13.53.1-snapshot.20260615125727",
4
4
  "description": "OpenAPI client for @equisoft/equisoft-connect-sdk-typescript",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -19,6 +19,7 @@ import type {
19
19
  DatabasesDatabase,
20
20
  DatabasesListDatabasesResponse,
21
21
  ErrorResponse,
22
+ UsersCreateUserPayload,
22
23
  UsersListUsersResponse,
23
24
  UsersUpdateUserPayload,
24
25
  UsersUser,
@@ -32,6 +33,8 @@ import {
32
33
  DatabasesListDatabasesResponseToJSON,
33
34
  ErrorResponseFromJSON,
34
35
  ErrorResponseToJSON,
36
+ UsersCreateUserPayloadFromJSON,
37
+ UsersCreateUserPayloadToJSON,
35
38
  UsersListUsersResponseFromJSON,
36
39
  UsersListUsersResponseToJSON,
37
40
  UsersUpdateUserPayloadFromJSON,
@@ -40,6 +43,11 @@ import {
40
43
  UsersUserToJSON,
41
44
  } from '../models/index';
42
45
 
46
+ export interface CreateUserRequest {
47
+ databaseUuid: string;
48
+ usersCreateUserPayload: UsersCreateUserPayload;
49
+ }
50
+
43
51
  export interface GetDatabaseRequest {
44
52
  databaseUuid: string;
45
53
  }
@@ -74,6 +82,70 @@ export interface UpdateUserRequest {
74
82
  */
75
83
  export class DatabasesApi extends runtime.BaseAPI {
76
84
 
85
+ /**
86
+ * Creates request options for createUser without sending the request
87
+ */
88
+ async createUserRequestOpts(requestParameters: CreateUserRequest): Promise<runtime.RequestOpts> {
89
+ if (requestParameters['databaseUuid'] == null) {
90
+ throw new runtime.RequiredError(
91
+ 'databaseUuid',
92
+ 'Required parameter "databaseUuid" was null or undefined when calling createUser().'
93
+ );
94
+ }
95
+
96
+ if (requestParameters['usersCreateUserPayload'] == null) {
97
+ throw new runtime.RequiredError(
98
+ 'usersCreateUserPayload',
99
+ 'Required parameter "usersCreateUserPayload" was null or undefined when calling createUser().'
100
+ );
101
+ }
102
+
103
+ const queryParameters: any = {};
104
+
105
+ const headerParameters: runtime.HTTPHeaders = {};
106
+
107
+ headerParameters['Content-Type'] = 'application/json';
108
+
109
+ if (this.configuration && this.configuration.accessToken) {
110
+ // oauth required
111
+ const token = this.configuration.accessToken;
112
+ const tokenString = await token("OAuth2", ["crm:database", "crm:user"]);
113
+ if (tokenString) {
114
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
115
+ }
116
+ }
117
+
118
+
119
+ let urlPath = `/crm/api/v1/databases/{databaseUuid}/users`;
120
+ urlPath = urlPath.replace(`{${"databaseUuid"}}`, encodeURIComponent(String(requestParameters['databaseUuid'])));
121
+
122
+ return {
123
+ path: urlPath,
124
+ method: 'POST',
125
+ headers: headerParameters,
126
+ query: queryParameters,
127
+ body: UsersCreateUserPayloadToJSON(requestParameters['usersCreateUserPayload']),
128
+ };
129
+ }
130
+
131
+ /**
132
+ * Create a user for the database
133
+ */
134
+ async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsersUser>> {
135
+ const requestOptions = await this.createUserRequestOpts(requestParameters);
136
+ const response = await this.request(requestOptions, initOverrides);
137
+
138
+ return new runtime.JSONApiResponse(response, (jsonValue) => UsersUserFromJSON(jsonValue));
139
+ }
140
+
141
+ /**
142
+ * Create a user for the database
143
+ */
144
+ async createUser(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsersUser> {
145
+ const response = await this.createUserRaw(requestParameters, initOverrides);
146
+ return await response.value();
147
+ }
148
+
77
149
  /**
78
150
  * Creates request options for getDatabase without sending the request
79
151
  */
@@ -0,0 +1,83 @@
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 UsersCreateUserPayload
20
+ */
21
+ export interface UsersCreateUserPayload {
22
+ /**
23
+ * UserAccount UUID to bind user on
24
+ * @type {string}
25
+ * @memberof UsersCreateUserPayload
26
+ */
27
+ userAccountUuid: string;
28
+ /**
29
+ * User role
30
+ * @type {string}
31
+ * @memberof UsersCreateUserPayload
32
+ */
33
+ role: string;
34
+ /**
35
+ * Maximum number of concurrent access for the user. If not provided, it will default to 1.
36
+ * @type {number}
37
+ * @memberof UsersCreateUserPayload
38
+ */
39
+ maxConcurrentAccess?: number | null;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the UsersCreateUserPayload interface.
44
+ */
45
+ export function instanceOfUsersCreateUserPayload(value: object): value is UsersCreateUserPayload {
46
+ if (!('userAccountUuid' in value) || value['userAccountUuid'] === undefined) return false;
47
+ if (!('role' in value) || value['role'] === undefined) return false;
48
+ return true;
49
+ }
50
+
51
+ export function UsersCreateUserPayloadFromJSON(json: any): UsersCreateUserPayload {
52
+ return UsersCreateUserPayloadFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function UsersCreateUserPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsersCreateUserPayload {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'userAccountUuid': json['userAccountUuid'],
62
+ 'role': json['role'],
63
+ 'maxConcurrentAccess': json['maxConcurrentAccess'] == null ? undefined : json['maxConcurrentAccess'],
64
+ };
65
+ }
66
+
67
+ export function UsersCreateUserPayloadToJSON(json: any): UsersCreateUserPayload {
68
+ return UsersCreateUserPayloadToJSONTyped(json, false);
69
+ }
70
+
71
+ export function UsersCreateUserPayloadToJSONTyped(value?: UsersCreateUserPayload | null, ignoreDiscriminator: boolean = false): any {
72
+ if (value == null) {
73
+ return value;
74
+ }
75
+
76
+ return {
77
+
78
+ 'userAccountUuid': value['userAccountUuid'],
79
+ 'role': value['role'],
80
+ 'maxConcurrentAccess': value['maxConcurrentAccess'],
81
+ };
82
+ }
83
+
@@ -294,6 +294,7 @@ export * from './TasksTask';
294
294
  export * from './TasksTransferToCompletedResponse';
295
295
  export * from './TasksVisibilityType';
296
296
  export * from './Translation';
297
+ export * from './UsersCreateUserPayload';
297
298
  export * from './UsersListUsersResponse';
298
299
  export * from './UsersRole';
299
300
  export * from './UsersUpdateUserPayload';