@equisoft/equisoft-connect-sdk-typescript 13.55.0 → 13.55.1-snapshot.20260728143041
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +2 -0
- package/README.md +2 -0
- package/dist/apis/DatabasesApi.d.ts +16 -1
- package/dist/apis/DatabasesApi.js +48 -0
- package/dist/esm/apis/DatabasesApi.d.ts +16 -1
- package/dist/esm/apis/DatabasesApi.js +49 -1
- package/dist/esm/models/DatabaseState.d.ts +1 -0
- package/dist/esm/models/DatabaseState.js +1 -0
- package/dist/esm/models/DatabasesCreateDatabasePayload.d.ts +50 -0
- package/dist/esm/models/DatabasesCreateDatabasePayload.js +53 -0
- package/dist/esm/models/DatabasesDatabase.d.ts +0 -6
- package/dist/esm/models/DatabasesDatabase.js +0 -4
- package/dist/esm/models/LegacyProvisioningOrganizationPayload.d.ts +0 -78
- package/dist/esm/models/LegacyProvisioningOrganizationPayload.js +0 -26
- package/dist/esm/models/LegacyProvisioningUserPayload.d.ts +0 -6
- package/dist/esm/models/LegacyProvisioningUserPayload.js +0 -2
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/DatabaseState.d.ts +1 -0
- package/dist/models/DatabaseState.js +1 -0
- package/dist/models/DatabasesCreateDatabasePayload.d.ts +50 -0
- package/dist/models/DatabasesCreateDatabasePayload.js +60 -0
- package/dist/models/DatabasesDatabase.d.ts +0 -6
- package/dist/models/DatabasesDatabase.js +0 -4
- package/dist/models/LegacyProvisioningOrganizationPayload.d.ts +0 -78
- package/dist/models/LegacyProvisioningOrganizationPayload.js +0 -26
- package/dist/models/LegacyProvisioningUserPayload.d.ts +0 -6
- package/dist/models/LegacyProvisioningUserPayload.js +0 -2
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/DatabasesApi.md +74 -0
- package/docs/DatabasesCreateDatabasePayload.md +40 -0
- package/docs/DatabasesDatabase.md +0 -2
- package/docs/LegacyProvisioningOrganizationPayload.md +0 -26
- package/docs/LegacyProvisioningUserPayload.md +0 -2
- package/package.json +1 -1
- package/src/apis/DatabasesApi.ts +63 -0
- package/src/models/DatabaseState.ts +1 -0
- package/src/models/DatabasesCreateDatabasePayload.ts +92 -0
- package/src/models/DatabasesDatabase.ts +0 -9
- package/src/models/LegacyProvisioningOrganizationPayload.ts +0 -104
- package/src/models/LegacyProvisioningUserPayload.ts +0 -8
- package/src/models/index.ts +1 -0
|
@@ -0,0 +1,60 @@
|
|
|
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.instanceOfDatabasesCreateDatabasePayload = instanceOfDatabasesCreateDatabasePayload;
|
|
17
|
+
exports.DatabasesCreateDatabasePayloadFromJSON = DatabasesCreateDatabasePayloadFromJSON;
|
|
18
|
+
exports.DatabasesCreateDatabasePayloadFromJSONTyped = DatabasesCreateDatabasePayloadFromJSONTyped;
|
|
19
|
+
exports.DatabasesCreateDatabasePayloadToJSON = DatabasesCreateDatabasePayloadToJSON;
|
|
20
|
+
exports.DatabasesCreateDatabasePayloadToJSONTyped = DatabasesCreateDatabasePayloadToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the DatabasesCreateDatabasePayload interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfDatabasesCreateDatabasePayload(value) {
|
|
25
|
+
if (!('organizationUuid' in value) || value['organizationUuid'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('profile' in value) || value['profile'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('ownerUserUuid' in value) || value['ownerUserUuid'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function DatabasesCreateDatabasePayloadFromJSON(json) {
|
|
34
|
+
return DatabasesCreateDatabasePayloadFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function DatabasesCreateDatabasePayloadFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'organizationUuid': json['organizationUuid'],
|
|
42
|
+
'profile': json['profile'],
|
|
43
|
+
'ownerUserUuid': json['ownerUserUuid'],
|
|
44
|
+
'locale': json['locale'] == null ? undefined : json['locale'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function DatabasesCreateDatabasePayloadToJSON(json) {
|
|
48
|
+
return DatabasesCreateDatabasePayloadToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function DatabasesCreateDatabasePayloadToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'organizationUuid': value['organizationUuid'],
|
|
56
|
+
'profile': value['profile'],
|
|
57
|
+
'ownerUserUuid': value['ownerUserUuid'],
|
|
58
|
+
'locale': value['locale'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -76,12 +76,6 @@ export interface DatabasesDatabase {
|
|
|
76
76
|
* @memberof DatabasesDatabase
|
|
77
77
|
*/
|
|
78
78
|
organizationUuid?: string | null;
|
|
79
|
-
/**
|
|
80
|
-
* Is Database Billable
|
|
81
|
-
* @type {boolean}
|
|
82
|
-
* @memberof DatabasesDatabase
|
|
83
|
-
*/
|
|
84
|
-
billable: boolean;
|
|
85
79
|
}
|
|
86
80
|
/**
|
|
87
81
|
* Check if a given object implements the DatabasesDatabase interface.
|
|
@@ -39,8 +39,6 @@ function instanceOfDatabasesDatabase(value) {
|
|
|
39
39
|
return false;
|
|
40
40
|
if (!('isMultiUser' in value) || value['isMultiUser'] === undefined)
|
|
41
41
|
return false;
|
|
42
|
-
if (!('billable' in value) || value['billable'] === undefined)
|
|
43
|
-
return false;
|
|
44
42
|
return true;
|
|
45
43
|
}
|
|
46
44
|
function DatabasesDatabaseFromJSON(json) {
|
|
@@ -61,7 +59,6 @@ function DatabasesDatabaseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
61
59
|
'isMultiUser': json['isMultiUser'],
|
|
62
60
|
'equisoftPlanEnabled': json['equisoftPlanEnabled'] == null ? undefined : json['equisoftPlanEnabled'],
|
|
63
61
|
'organizationUuid': json['organizationUuid'] == null ? undefined : json['organizationUuid'],
|
|
64
|
-
'billable': json['billable'],
|
|
65
62
|
};
|
|
66
63
|
}
|
|
67
64
|
function DatabasesDatabaseToJSON(json) {
|
|
@@ -82,6 +79,5 @@ function DatabasesDatabaseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
82
79
|
'isMultiUser': value['isMultiUser'],
|
|
83
80
|
'equisoftPlanEnabled': value['equisoftPlanEnabled'],
|
|
84
81
|
'organizationUuid': value['organizationUuid'],
|
|
85
|
-
'billable': value['billable'],
|
|
86
82
|
};
|
|
87
83
|
}
|
|
@@ -57,84 +57,6 @@ export interface LegacyProvisioningOrganizationPayload {
|
|
|
57
57
|
* @memberof LegacyProvisioningOrganizationPayload
|
|
58
58
|
*/
|
|
59
59
|
parentOrganizationUuid?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Organization main phone number.
|
|
62
|
-
* @type {string}
|
|
63
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
64
|
-
*/
|
|
65
|
-
mainPhone?: string;
|
|
66
|
-
/**
|
|
67
|
-
* Organization tollFree phone number.
|
|
68
|
-
* @type {string}
|
|
69
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
70
|
-
*/
|
|
71
|
-
tollFree?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Organization fax phone number.
|
|
74
|
-
* @type {string}
|
|
75
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
76
|
-
*/
|
|
77
|
-
fax?: string;
|
|
78
|
-
/**
|
|
79
|
-
* Organization address first line.
|
|
80
|
-
* @type {string}
|
|
81
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
82
|
-
*/
|
|
83
|
-
address?: string;
|
|
84
|
-
/**
|
|
85
|
-
* Organization address second line.
|
|
86
|
-
* @type {string}
|
|
87
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
88
|
-
*/
|
|
89
|
-
addressLine2?: string;
|
|
90
|
-
/**
|
|
91
|
-
* Organization address city.
|
|
92
|
-
* @type {string}
|
|
93
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
94
|
-
*/
|
|
95
|
-
addressCity?: string;
|
|
96
|
-
/**
|
|
97
|
-
* Organization address state/province.
|
|
98
|
-
* @type {string}
|
|
99
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
100
|
-
*/
|
|
101
|
-
addressState?: string;
|
|
102
|
-
/**
|
|
103
|
-
* Organization address postal code.
|
|
104
|
-
* @type {string}
|
|
105
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
106
|
-
*/
|
|
107
|
-
addressPostalCode?: string;
|
|
108
|
-
/**
|
|
109
|
-
* Organization address country.
|
|
110
|
-
* @type {string}
|
|
111
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
112
|
-
*/
|
|
113
|
-
addressCountry?: string;
|
|
114
|
-
/**
|
|
115
|
-
* Organization website url.
|
|
116
|
-
* @type {string}
|
|
117
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
118
|
-
*/
|
|
119
|
-
webSite?: string;
|
|
120
|
-
/**
|
|
121
|
-
* Organization email.
|
|
122
|
-
* @type {string}
|
|
123
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
124
|
-
*/
|
|
125
|
-
organizationEmail?: string;
|
|
126
|
-
/**
|
|
127
|
-
* Install personalized fields module.
|
|
128
|
-
* @type {boolean}
|
|
129
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
130
|
-
*/
|
|
131
|
-
installPersonalizedFieldsModule?: boolean;
|
|
132
|
-
/**
|
|
133
|
-
* Install FNA module.
|
|
134
|
-
* @type {boolean}
|
|
135
|
-
* @memberof LegacyProvisioningOrganizationPayload
|
|
136
|
-
*/
|
|
137
|
-
installFnaModule?: boolean;
|
|
138
60
|
}
|
|
139
61
|
/**
|
|
140
62
|
* Check if a given object implements the LegacyProvisioningOrganizationPayload interface.
|
|
@@ -39,19 +39,6 @@ function LegacyProvisioningOrganizationPayloadFromJSONTyped(json, ignoreDiscrimi
|
|
|
39
39
|
'ownerEmail': json['ownerEmail'] == null ? undefined : json['ownerEmail'],
|
|
40
40
|
'lang': json['lang'] == null ? undefined : json['lang'],
|
|
41
41
|
'parentOrganizationUuid': json['parentOrganizationUuid'] == null ? undefined : json['parentOrganizationUuid'],
|
|
42
|
-
'mainPhone': json['mainPhone'] == null ? undefined : json['mainPhone'],
|
|
43
|
-
'tollFree': json['tollFree'] == null ? undefined : json['tollFree'],
|
|
44
|
-
'fax': json['fax'] == null ? undefined : json['fax'],
|
|
45
|
-
'address': json['address'] == null ? undefined : json['address'],
|
|
46
|
-
'addressLine2': json['addressLine2'] == null ? undefined : json['addressLine2'],
|
|
47
|
-
'addressCity': json['addressCity'] == null ? undefined : json['addressCity'],
|
|
48
|
-
'addressState': json['addressState'] == null ? undefined : json['addressState'],
|
|
49
|
-
'addressPostalCode': json['addressPostalCode'] == null ? undefined : json['addressPostalCode'],
|
|
50
|
-
'addressCountry': json['addressCountry'] == null ? undefined : json['addressCountry'],
|
|
51
|
-
'webSite': json['webSite'] == null ? undefined : json['webSite'],
|
|
52
|
-
'organizationEmail': json['organizationEmail'] == null ? undefined : json['organizationEmail'],
|
|
53
|
-
'installPersonalizedFieldsModule': json['installPersonalizedFieldsModule'] == null ? undefined : json['installPersonalizedFieldsModule'],
|
|
54
|
-
'installFnaModule': json['installFnaModule'] == null ? undefined : json['installFnaModule'],
|
|
55
42
|
};
|
|
56
43
|
}
|
|
57
44
|
function LegacyProvisioningOrganizationPayloadToJSON(json) {
|
|
@@ -69,18 +56,5 @@ function LegacyProvisioningOrganizationPayloadToJSONTyped(value, ignoreDiscrimin
|
|
|
69
56
|
'ownerEmail': value['ownerEmail'],
|
|
70
57
|
'lang': value['lang'],
|
|
71
58
|
'parentOrganizationUuid': value['parentOrganizationUuid'],
|
|
72
|
-
'mainPhone': value['mainPhone'],
|
|
73
|
-
'tollFree': value['tollFree'],
|
|
74
|
-
'fax': value['fax'],
|
|
75
|
-
'address': value['address'],
|
|
76
|
-
'addressLine2': value['addressLine2'],
|
|
77
|
-
'addressCity': value['addressCity'],
|
|
78
|
-
'addressState': value['addressState'],
|
|
79
|
-
'addressPostalCode': value['addressPostalCode'],
|
|
80
|
-
'addressCountry': value['addressCountry'],
|
|
81
|
-
'webSite': value['webSite'],
|
|
82
|
-
'organizationEmail': value['organizationEmail'],
|
|
83
|
-
'installPersonalizedFieldsModule': value['installPersonalizedFieldsModule'],
|
|
84
|
-
'installFnaModule': value['installFnaModule'],
|
|
85
59
|
};
|
|
86
60
|
}
|
|
@@ -57,12 +57,6 @@ export interface LegacyProvisioningUserPayload {
|
|
|
57
57
|
* @memberof LegacyProvisioningUserPayload
|
|
58
58
|
*/
|
|
59
59
|
allowDelegation?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Cellphone number of this user.
|
|
62
|
-
* @type {string}
|
|
63
|
-
* @memberof LegacyProvisioningUserPayload
|
|
64
|
-
*/
|
|
65
|
-
phoneCell?: string;
|
|
66
60
|
}
|
|
67
61
|
/**
|
|
68
62
|
* @export
|
|
@@ -57,7 +57,6 @@ function LegacyProvisioningUserPayloadFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
57
57
|
'role': json['role'] == null ? undefined : json['role'],
|
|
58
58
|
'concurrentAccess': json['concurrentAccess'] == null ? undefined : json['concurrentAccess'],
|
|
59
59
|
'allowDelegation': json['allowDelegation'] == null ? undefined : json['allowDelegation'],
|
|
60
|
-
'phoneCell': json['phoneCell'] == null ? undefined : json['phoneCell'],
|
|
61
60
|
};
|
|
62
61
|
}
|
|
63
62
|
function LegacyProvisioningUserPayloadToJSON(json) {
|
|
@@ -75,6 +74,5 @@ function LegacyProvisioningUserPayloadToJSONTyped(value, ignoreDiscriminator = f
|
|
|
75
74
|
'role': value['role'],
|
|
76
75
|
'concurrentAccess': value['concurrentAccess'],
|
|
77
76
|
'allowDelegation': value['allowDelegation'],
|
|
78
|
-
'phoneCell': value['phoneCell'],
|
|
79
77
|
};
|
|
80
78
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export * from './CredentialsResponse';
|
|
|
62
62
|
export * from './DatabaseSetDistributorPayload';
|
|
63
63
|
export * from './DatabaseState';
|
|
64
64
|
export * from './DatabaseUpdateStatePayload';
|
|
65
|
+
export * from './DatabasesCreateDatabasePayload';
|
|
65
66
|
export * from './DatabasesDatabase';
|
|
66
67
|
export * from './DatabasesListDatabasesResponse';
|
|
67
68
|
export * from './DateOrDateTime';
|
package/dist/models/index.js
CHANGED
|
@@ -80,6 +80,7 @@ __exportStar(require("./CredentialsResponse"), exports);
|
|
|
80
80
|
__exportStar(require("./DatabaseSetDistributorPayload"), exports);
|
|
81
81
|
__exportStar(require("./DatabaseState"), exports);
|
|
82
82
|
__exportStar(require("./DatabaseUpdateStatePayload"), exports);
|
|
83
|
+
__exportStar(require("./DatabasesCreateDatabasePayload"), exports);
|
|
83
84
|
__exportStar(require("./DatabasesDatabase"), exports);
|
|
84
85
|
__exportStar(require("./DatabasesListDatabasesResponse"), exports);
|
|
85
86
|
__exportStar(require("./DateOrDateTime"), exports);
|
package/docs/DatabasesApi.md
CHANGED
|
@@ -4,6 +4,7 @@ All URIs are relative to *http://localhost*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
| [**createDatabase**](DatabasesApi.md#createdatabase) | **POST** /crm/api/v1/databases | Create database for an organization |
|
|
7
8
|
| [**createUser**](DatabasesApi.md#createuser) | **POST** /crm/api/v1/databases/{databaseUuid}/users | Create a user for the database |
|
|
8
9
|
| [**deleteUser**](DatabasesApi.md#deleteuser) | **DELETE** /crm/api/v1/databases/{databaseUuid}/users/{userUuid} | Delete a user for the database |
|
|
9
10
|
| [**getDatabase**](DatabasesApi.md#getdatabase) | **GET** /crm/api/v1/databases/{databaseUuid} | Get a database |
|
|
@@ -15,6 +16,79 @@ All URIs are relative to *http://localhost*
|
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
## createDatabase
|
|
20
|
+
|
|
21
|
+
> DatabasesDatabase createDatabase(databasesCreateDatabasePayload)
|
|
22
|
+
|
|
23
|
+
Create database for an organization
|
|
24
|
+
|
|
25
|
+
### Example
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import {
|
|
29
|
+
Configuration,
|
|
30
|
+
DatabasesApi,
|
|
31
|
+
} from '@equisoft/equisoft-connect-sdk-typescript';
|
|
32
|
+
import type { CreateDatabaseRequest } from '@equisoft/equisoft-connect-sdk-typescript';
|
|
33
|
+
|
|
34
|
+
async function example() {
|
|
35
|
+
console.log("🚀 Testing @equisoft/equisoft-connect-sdk-typescript SDK...");
|
|
36
|
+
const config = new Configuration({
|
|
37
|
+
// To configure OAuth2 access token for authorization: OAuth2 accessCode
|
|
38
|
+
accessToken: "YOUR ACCESS TOKEN",
|
|
39
|
+
});
|
|
40
|
+
const api = new DatabasesApi(config);
|
|
41
|
+
|
|
42
|
+
const body = {
|
|
43
|
+
// DatabasesCreateDatabasePayload
|
|
44
|
+
databasesCreateDatabasePayload: ...,
|
|
45
|
+
} satisfies CreateDatabaseRequest;
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
const data = await api.createDatabase(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
|
+
| **databasesCreateDatabasePayload** | [DatabasesCreateDatabasePayload](DatabasesCreateDatabasePayload.md) | | |
|
|
65
|
+
|
|
66
|
+
### Return type
|
|
67
|
+
|
|
68
|
+
[**DatabasesDatabase**](DatabasesDatabase.md)
|
|
69
|
+
|
|
70
|
+
### Authorization
|
|
71
|
+
|
|
72
|
+
[OAuth2 accessCode](../README.md#OAuth2-accessCode)
|
|
73
|
+
|
|
74
|
+
### HTTP request headers
|
|
75
|
+
|
|
76
|
+
- **Content-Type**: `application/json`
|
|
77
|
+
- **Accept**: `application/json`
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### HTTP response details
|
|
81
|
+
| Status code | Description | Response headers |
|
|
82
|
+
|-------------|-------------|------------------|
|
|
83
|
+
| **201** | Created | - |
|
|
84
|
+
| **409** | Conflict | - |
|
|
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
|
+
|
|
18
92
|
## createUser
|
|
19
93
|
|
|
20
94
|
> UsersUser createUser(databaseUuid, usersCreateUserPayload)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# DatabasesCreateDatabasePayload
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`organizationUuid` | string
|
|
10
|
+
`profile` | string
|
|
11
|
+
`ownerUserUuid` | string
|
|
12
|
+
`locale` | string
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { DatabasesCreateDatabasePayload } from '@equisoft/equisoft-connect-sdk-typescript'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"organizationUuid": null,
|
|
22
|
+
"profile": kronospf,
|
|
23
|
+
"ownerUserUuid": null,
|
|
24
|
+
"locale": en_CA,
|
|
25
|
+
} satisfies DatabasesCreateDatabasePayload
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as DatabasesCreateDatabasePayload
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
|
@@ -16,7 +16,6 @@ Name | Type
|
|
|
16
16
|
`isMultiUser` | boolean
|
|
17
17
|
`equisoftPlanEnabled` | boolean
|
|
18
18
|
`organizationUuid` | string
|
|
19
|
-
`billable` | boolean
|
|
20
19
|
|
|
21
20
|
## Example
|
|
22
21
|
|
|
@@ -35,7 +34,6 @@ const example = {
|
|
|
35
34
|
"isMultiUser": null,
|
|
36
35
|
"equisoftPlanEnabled": null,
|
|
37
36
|
"organizationUuid": null,
|
|
38
|
-
"billable": null,
|
|
39
37
|
} satisfies DatabasesDatabase
|
|
40
38
|
|
|
41
39
|
console.log(example)
|
|
@@ -13,19 +13,6 @@ Name | Type
|
|
|
13
13
|
`ownerEmail` | string
|
|
14
14
|
`lang` | string
|
|
15
15
|
`parentOrganizationUuid` | string
|
|
16
|
-
`mainPhone` | string
|
|
17
|
-
`tollFree` | string
|
|
18
|
-
`fax` | string
|
|
19
|
-
`address` | string
|
|
20
|
-
`addressLine2` | string
|
|
21
|
-
`addressCity` | string
|
|
22
|
-
`addressState` | string
|
|
23
|
-
`addressPostalCode` | string
|
|
24
|
-
`addressCountry` | string
|
|
25
|
-
`webSite` | string
|
|
26
|
-
`organizationEmail` | string
|
|
27
|
-
`installPersonalizedFieldsModule` | boolean
|
|
28
|
-
`installFnaModule` | boolean
|
|
29
16
|
|
|
30
17
|
## Example
|
|
31
18
|
|
|
@@ -41,19 +28,6 @@ const example = {
|
|
|
41
28
|
"ownerEmail": null,
|
|
42
29
|
"lang": null,
|
|
43
30
|
"parentOrganizationUuid": null,
|
|
44
|
-
"mainPhone": null,
|
|
45
|
-
"tollFree": null,
|
|
46
|
-
"fax": null,
|
|
47
|
-
"address": null,
|
|
48
|
-
"addressLine2": null,
|
|
49
|
-
"addressCity": null,
|
|
50
|
-
"addressState": null,
|
|
51
|
-
"addressPostalCode": null,
|
|
52
|
-
"addressCountry": null,
|
|
53
|
-
"webSite": null,
|
|
54
|
-
"organizationEmail": null,
|
|
55
|
-
"installPersonalizedFieldsModule": null,
|
|
56
|
-
"installFnaModule": null,
|
|
57
31
|
} satisfies LegacyProvisioningOrganizationPayload
|
|
58
32
|
|
|
59
33
|
console.log(example)
|
|
@@ -13,7 +13,6 @@ Name | Type
|
|
|
13
13
|
`role` | string
|
|
14
14
|
`concurrentAccess` | number
|
|
15
15
|
`allowDelegation` | string
|
|
16
|
-
`phoneCell` | string
|
|
17
16
|
|
|
18
17
|
## Example
|
|
19
18
|
|
|
@@ -29,7 +28,6 @@ const example = {
|
|
|
29
28
|
"role": null,
|
|
30
29
|
"concurrentAccess": null,
|
|
31
30
|
"allowDelegation": null,
|
|
32
|
-
"phoneCell": null,
|
|
33
31
|
} satisfies LegacyProvisioningUserPayload
|
|
34
32
|
|
|
35
33
|
console.log(example)
|
package/package.json
CHANGED
package/src/apis/DatabasesApi.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
DatabaseUpdateStatePayload,
|
|
19
|
+
DatabasesCreateDatabasePayload,
|
|
19
20
|
DatabasesDatabase,
|
|
20
21
|
DatabasesListDatabasesResponse,
|
|
21
22
|
ErrorResponse,
|
|
@@ -28,6 +29,8 @@ import type {
|
|
|
28
29
|
import {
|
|
29
30
|
DatabaseUpdateStatePayloadFromJSON,
|
|
30
31
|
DatabaseUpdateStatePayloadToJSON,
|
|
32
|
+
DatabasesCreateDatabasePayloadFromJSON,
|
|
33
|
+
DatabasesCreateDatabasePayloadToJSON,
|
|
31
34
|
DatabasesDatabaseFromJSON,
|
|
32
35
|
DatabasesDatabaseToJSON,
|
|
33
36
|
DatabasesListDatabasesResponseFromJSON,
|
|
@@ -46,6 +49,10 @@ import {
|
|
|
46
49
|
UsersUserToJSON,
|
|
47
50
|
} from '../models/index';
|
|
48
51
|
|
|
52
|
+
export interface CreateDatabaseRequest {
|
|
53
|
+
databasesCreateDatabasePayload: DatabasesCreateDatabasePayload;
|
|
54
|
+
}
|
|
55
|
+
|
|
49
56
|
export interface CreateUserRequest {
|
|
50
57
|
databaseUuid: string;
|
|
51
58
|
usersCreateUserPayload: UsersCreateUserPayload;
|
|
@@ -91,6 +98,62 @@ export interface UpdateUserRequest {
|
|
|
91
98
|
*/
|
|
92
99
|
export class DatabasesApi extends runtime.BaseAPI {
|
|
93
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Creates request options for createDatabase without sending the request
|
|
103
|
+
*/
|
|
104
|
+
async createDatabaseRequestOpts(requestParameters: CreateDatabaseRequest): Promise<runtime.RequestOpts> {
|
|
105
|
+
if (requestParameters['databasesCreateDatabasePayload'] == null) {
|
|
106
|
+
throw new runtime.RequiredError(
|
|
107
|
+
'databasesCreateDatabasePayload',
|
|
108
|
+
'Required parameter "databasesCreateDatabasePayload" was null or undefined when calling createDatabase().'
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const queryParameters: any = {};
|
|
113
|
+
|
|
114
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
115
|
+
|
|
116
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
117
|
+
|
|
118
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
119
|
+
// oauth required
|
|
120
|
+
const token = this.configuration.accessToken;
|
|
121
|
+
const tokenString = await token("OAuth2", ["crm:database"]);
|
|
122
|
+
if (tokenString) {
|
|
123
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
let urlPath = `/crm/api/v1/databases`;
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
path: urlPath,
|
|
132
|
+
method: 'POST',
|
|
133
|
+
headers: headerParameters,
|
|
134
|
+
query: queryParameters,
|
|
135
|
+
body: DatabasesCreateDatabasePayloadToJSON(requestParameters['databasesCreateDatabasePayload']),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Create database for an organization
|
|
141
|
+
*/
|
|
142
|
+
async createDatabaseRaw(requestParameters: CreateDatabaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DatabasesDatabase>> {
|
|
143
|
+
const requestOptions = await this.createDatabaseRequestOpts(requestParameters);
|
|
144
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
145
|
+
|
|
146
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DatabasesDatabaseFromJSON(jsonValue));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Create database for an organization
|
|
151
|
+
*/
|
|
152
|
+
async createDatabase(requestParameters: CreateDatabaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DatabasesDatabase> {
|
|
153
|
+
const response = await this.createDatabaseRaw(requestParameters, initOverrides);
|
|
154
|
+
return await response.value();
|
|
155
|
+
}
|
|
156
|
+
|
|
94
157
|
/**
|
|
95
158
|
* Creates request options for createUser without sending the request
|
|
96
159
|
*/
|
|
@@ -22,6 +22,7 @@ export const DatabaseState = {
|
|
|
22
22
|
INACTIVE: 'INACTIVE',
|
|
23
23
|
TODELETE: 'TODELETE',
|
|
24
24
|
MAINTENANCE: 'MAINTENANCE',
|
|
25
|
+
PROVISIONING: 'PROVISIONING',
|
|
25
26
|
unknown_default_open_api: '11184809'
|
|
26
27
|
} as const;
|
|
27
28
|
export type DatabaseState = typeof DatabaseState[keyof typeof DatabaseState];
|
|
@@ -0,0 +1,92 @@
|
|
|
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 DatabasesCreateDatabasePayload
|
|
20
|
+
*/
|
|
21
|
+
export interface DatabasesCreateDatabasePayload {
|
|
22
|
+
/**
|
|
23
|
+
* Organization UUID to bind user on
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof DatabasesCreateDatabasePayload
|
|
26
|
+
*/
|
|
27
|
+
organizationUuid: string;
|
|
28
|
+
/**
|
|
29
|
+
* Profile name
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof DatabasesCreateDatabasePayload
|
|
32
|
+
*/
|
|
33
|
+
profile: string;
|
|
34
|
+
/**
|
|
35
|
+
* User UUID to bind database owner
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof DatabasesCreateDatabasePayload
|
|
38
|
+
*/
|
|
39
|
+
ownerUserUuid: string;
|
|
40
|
+
/**
|
|
41
|
+
* Locale for the database
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof DatabasesCreateDatabasePayload
|
|
44
|
+
*/
|
|
45
|
+
locale?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the DatabasesCreateDatabasePayload interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfDatabasesCreateDatabasePayload(value: object): value is DatabasesCreateDatabasePayload {
|
|
52
|
+
if (!('organizationUuid' in value) || value['organizationUuid'] === undefined) return false;
|
|
53
|
+
if (!('profile' in value) || value['profile'] === undefined) return false;
|
|
54
|
+
if (!('ownerUserUuid' in value) || value['ownerUserUuid'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function DatabasesCreateDatabasePayloadFromJSON(json: any): DatabasesCreateDatabasePayload {
|
|
59
|
+
return DatabasesCreateDatabasePayloadFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function DatabasesCreateDatabasePayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): DatabasesCreateDatabasePayload {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'organizationUuid': json['organizationUuid'],
|
|
69
|
+
'profile': json['profile'],
|
|
70
|
+
'ownerUserUuid': json['ownerUserUuid'],
|
|
71
|
+
'locale': json['locale'] == null ? undefined : json['locale'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function DatabasesCreateDatabasePayloadToJSON(json: any): DatabasesCreateDatabasePayload {
|
|
76
|
+
return DatabasesCreateDatabasePayloadToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function DatabasesCreateDatabasePayloadToJSONTyped(value?: DatabasesCreateDatabasePayload | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'organizationUuid': value['organizationUuid'],
|
|
87
|
+
'profile': value['profile'],
|
|
88
|
+
'ownerUserUuid': value['ownerUserUuid'],
|
|
89
|
+
'locale': value['locale'],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|