@unified-api/typescript-sdk 2.9.4 → 2.9.5
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/FUNCTIONS.md +108 -0
- package/README.md +36 -15
- package/RUNTIMES.md +22 -0
- package/docs/sdks/account/README.md +501 -0
- package/docs/sdks/accounting/README.md +3629 -0
- package/docs/sdks/activity/README.md +501 -0
- package/docs/sdks/apicall/README.md +165 -0
- package/docs/sdks/application/README.md +501 -0
- package/docs/sdks/applicationstatus/README.md +88 -0
- package/docs/sdks/ats/README.md +3710 -0
- package/docs/sdks/auth/README.md +173 -0
- package/docs/sdks/branch/README.md +501 -0
- package/docs/sdks/call/README.md +88 -0
- package/docs/sdks/candidate/README.md +501 -0
- package/docs/sdks/channel/README.md +171 -0
- package/docs/sdks/class/README.md +501 -0
- package/docs/sdks/collection/README.md +501 -0
- package/docs/sdks/commerce/README.md +2477 -0
- package/docs/sdks/commit/README.md +501 -0
- package/docs/sdks/company/README.md +1240 -0
- package/docs/sdks/connection/README.md +485 -0
- package/docs/sdks/contact/README.md +1489 -0
- package/docs/sdks/course/README.md +501 -0
- package/docs/sdks/crm/README.md +2971 -0
- package/docs/sdks/customer/README.md +501 -0
- package/docs/sdks/deal/README.md +501 -0
- package/docs/sdks/document/README.md +501 -0
- package/docs/sdks/employee/README.md +501 -0
- package/docs/sdks/enrich/README.md +169 -0
- package/docs/sdks/event/README.md +501 -0
- package/docs/sdks/file/README.md +501 -0
- package/docs/sdks/genai/README.md +169 -0
- package/docs/sdks/group/README.md +995 -0
- package/docs/sdks/hris/README.md +2311 -0
- package/docs/sdks/instructor/README.md +501 -0
- package/docs/sdks/integration/README.md +248 -0
- package/docs/sdks/interview/README.md +501 -0
- package/docs/sdks/inventory/README.md +501 -0
- package/docs/sdks/invoice/README.md +501 -0
- package/docs/sdks/issue/README.md +84 -0
- package/docs/sdks/item/README.md +501 -0
- package/docs/sdks/job/README.md +501 -0
- package/docs/sdks/journal/README.md +501 -0
- package/docs/sdks/kms/README.md +995 -0
- package/docs/sdks/lead/README.md +501 -0
- package/docs/sdks/link/README.md +501 -0
- package/docs/sdks/list/README.md +501 -0
- package/docs/sdks/lms/README.md +1983 -0
- package/docs/sdks/location/README.md +995 -0
- package/docs/sdks/login/README.md +90 -0
- package/docs/sdks/martech/README.md +995 -0
- package/docs/sdks/member/README.md +501 -0
- package/docs/sdks/message/README.md +501 -0
- package/docs/sdks/messaging/README.md +665 -0
- package/docs/sdks/metadata/README.md +501 -0
- package/docs/sdks/model/README.md +88 -0
- package/docs/sdks/note/README.md +501 -0
- package/docs/sdks/order/README.md +501 -0
- package/docs/sdks/organization/README.md +665 -0
- package/docs/sdks/page/README.md +501 -0
- package/docs/sdks/passthrough/README.md +671 -0
- package/docs/sdks/payment/README.md +1323 -0
- package/docs/sdks/payout/README.md +171 -0
- package/docs/sdks/payslip/README.md +171 -0
- package/docs/sdks/person/README.md +88 -0
- package/docs/sdks/pipeline/README.md +501 -0
- package/docs/sdks/project/README.md +501 -0
- package/docs/sdks/prompt/README.md +88 -0
- package/docs/sdks/pullrequest/README.md +501 -0
- package/docs/sdks/refund/README.md +171 -0
- package/docs/sdks/repo/README.md +2477 -0
- package/docs/sdks/repository/README.md +501 -0
- package/docs/sdks/scim/README.md +995 -0
- package/docs/sdks/scorecard/README.md +501 -0
- package/docs/sdks/space/README.md +501 -0
- package/docs/sdks/storage/README.md +501 -0
- package/docs/sdks/student/README.md +501 -0
- package/docs/sdks/task/README.md +995 -0
- package/docs/sdks/taxrate/README.md +501 -0
- package/docs/sdks/ticket/README.md +501 -0
- package/docs/sdks/ticketing/README.md +1489 -0
- package/docs/sdks/timeoff/README.md +171 -0
- package/docs/sdks/transaction/README.md +501 -0
- package/docs/sdks/uc/README.md +582 -0
- package/docs/sdks/unified/README.md +1601 -0
- package/docs/sdks/unifiedto/README.md +7 -0
- package/docs/sdks/user/README.md +501 -0
- package/docs/sdks/webhook/README.md +647 -0
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/primitives.d.ts +2 -0
- package/lib/primitives.d.ts.map +1 -1
- package/lib/primitives.js +53 -0
- package/lib/primitives.js.map +1 -1
- package/package.json +3 -1
- package/sdk/models/shared/index.d.ts +1 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +1 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/kmspage.d.ts +5 -0
- package/sdk/models/shared/kmspage.d.ts.map +1 -1
- package/sdk/models/shared/kmspage.js +7 -0
- package/sdk/models/shared/kmspage.js.map +1 -1
- package/sdk/models/shared/kmspagemetadata.d.ts +37 -0
- package/sdk/models/shared/kmspagemetadata.d.ts.map +1 -0
- package/sdk/models/shared/kmspagemetadata.js +63 -0
- package/sdk/models/shared/kmspagemetadata.js.map +1 -0
- package/sdk/models/shared/kmsspace.d.ts +2 -0
- package/sdk/models/shared/kmsspace.d.ts.map +1 -1
- package/sdk/models/shared/kmsspace.js +4 -0
- package/sdk/models/shared/kmsspace.js.map +1 -1
- package/sdk/models/shared/security.d.ts +2 -2
- package/sdk/models/shared/security.d.ts.map +1 -1
- package/sdk/models/shared/security.js +2 -2
- package/sdk/models/shared/security.js.map +1 -1
- package/sdk/types/operations.d.ts +5 -3
- package/sdk/types/operations.d.ts.map +1 -1
- package/sdk/types/operations.js +3 -0
- package/sdk/types/operations.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/primitives.ts +62 -0
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/kmspage.ts +16 -0
- package/src/sdk/models/shared/kmspagemetadata.ts +72 -0
- package/src/sdk/models/shared/kmsspace.ts +6 -0
- package/src/sdk/models/shared/security.ts +4 -4
- package/src/sdk/types/operations.ts +11 -5
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
# Connection
|
|
2
|
+
(*connection*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [createUnifiedConnection](#createunifiedconnection) - Create connection
|
|
9
|
+
* [getUnifiedConnection](#getunifiedconnection) - Retrieve connection
|
|
10
|
+
* [listUnifiedConnections](#listunifiedconnections) - List all connections
|
|
11
|
+
* [patchUnifiedConnection](#patchunifiedconnection) - Update connection
|
|
12
|
+
* [removeUnifiedConnection](#removeunifiedconnection) - Remove connection
|
|
13
|
+
* [updateUnifiedConnection](#updateunifiedconnection) - Update connection
|
|
14
|
+
|
|
15
|
+
## createUnifiedConnection
|
|
16
|
+
|
|
17
|
+
Used only to import existing customer credentials; use "Create connection indirectly" instead
|
|
18
|
+
|
|
19
|
+
### Example Usage
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
23
|
+
|
|
24
|
+
const unifiedTo = new UnifiedTo({
|
|
25
|
+
security: {
|
|
26
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
async function run() {
|
|
31
|
+
const result = await unifiedTo.connection.createUnifiedConnection();
|
|
32
|
+
|
|
33
|
+
// Handle the result
|
|
34
|
+
console.log(result);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
run();
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Standalone function
|
|
41
|
+
|
|
42
|
+
The standalone function version of this method:
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
46
|
+
import { connectionCreateUnifiedConnection } from "@unified-api/typescript-sdk/funcs/connectionCreateUnifiedConnection.js";
|
|
47
|
+
|
|
48
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
49
|
+
// You can create one instance of it to use across an application.
|
|
50
|
+
const unifiedTo = new UnifiedToCore({
|
|
51
|
+
security: {
|
|
52
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
async function run() {
|
|
57
|
+
const res = await connectionCreateUnifiedConnection(unifiedTo);
|
|
58
|
+
|
|
59
|
+
if (!res.ok) {
|
|
60
|
+
throw res.error;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const { value: result } = res;
|
|
64
|
+
|
|
65
|
+
// Handle the result
|
|
66
|
+
console.log(result);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
run();
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Parameters
|
|
73
|
+
|
|
74
|
+
| Parameter | Type | Required | Description |
|
|
75
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
76
|
+
| `request` | [shared.Connection](../../sdk/models/shared/connection.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
77
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
78
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
79
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
80
|
+
|
|
81
|
+
### Response
|
|
82
|
+
|
|
83
|
+
**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>**
|
|
84
|
+
|
|
85
|
+
### Errors
|
|
86
|
+
|
|
87
|
+
| Error Type | Status Code | Content Type |
|
|
88
|
+
| --------------- | --------------- | --------------- |
|
|
89
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
90
|
+
|
|
91
|
+
## getUnifiedConnection
|
|
92
|
+
|
|
93
|
+
Retrieve connection
|
|
94
|
+
|
|
95
|
+
### Example Usage
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
99
|
+
|
|
100
|
+
const unifiedTo = new UnifiedTo({
|
|
101
|
+
security: {
|
|
102
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
async function run() {
|
|
107
|
+
const result = await unifiedTo.connection.getUnifiedConnection({
|
|
108
|
+
id: "<id>",
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// Handle the result
|
|
112
|
+
console.log(result);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
run();
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Standalone function
|
|
119
|
+
|
|
120
|
+
The standalone function version of this method:
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
124
|
+
import { connectionGetUnifiedConnection } from "@unified-api/typescript-sdk/funcs/connectionGetUnifiedConnection.js";
|
|
125
|
+
|
|
126
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
127
|
+
// You can create one instance of it to use across an application.
|
|
128
|
+
const unifiedTo = new UnifiedToCore({
|
|
129
|
+
security: {
|
|
130
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
async function run() {
|
|
135
|
+
const res = await connectionGetUnifiedConnection(unifiedTo, {
|
|
136
|
+
id: "<id>",
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
if (!res.ok) {
|
|
140
|
+
throw res.error;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const { value: result } = res;
|
|
144
|
+
|
|
145
|
+
// Handle the result
|
|
146
|
+
console.log(result);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
run();
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Parameters
|
|
153
|
+
|
|
154
|
+
| Parameter | Type | Required | Description |
|
|
155
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
156
|
+
| `request` | [operations.GetUnifiedConnectionRequest](../../sdk/models/operations/getunifiedconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
157
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
158
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
159
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
160
|
+
|
|
161
|
+
### Response
|
|
162
|
+
|
|
163
|
+
**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>**
|
|
164
|
+
|
|
165
|
+
### Errors
|
|
166
|
+
|
|
167
|
+
| Error Type | Status Code | Content Type |
|
|
168
|
+
| --------------- | --------------- | --------------- |
|
|
169
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
170
|
+
|
|
171
|
+
## listUnifiedConnections
|
|
172
|
+
|
|
173
|
+
List all connections
|
|
174
|
+
|
|
175
|
+
### Example Usage
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
179
|
+
|
|
180
|
+
const unifiedTo = new UnifiedTo({
|
|
181
|
+
security: {
|
|
182
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
183
|
+
},
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
async function run() {
|
|
187
|
+
const result = await unifiedTo.connection.listUnifiedConnections({});
|
|
188
|
+
|
|
189
|
+
// Handle the result
|
|
190
|
+
console.log(result);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
run();
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Standalone function
|
|
197
|
+
|
|
198
|
+
The standalone function version of this method:
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
202
|
+
import { connectionListUnifiedConnections } from "@unified-api/typescript-sdk/funcs/connectionListUnifiedConnections.js";
|
|
203
|
+
|
|
204
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
205
|
+
// You can create one instance of it to use across an application.
|
|
206
|
+
const unifiedTo = new UnifiedToCore({
|
|
207
|
+
security: {
|
|
208
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
209
|
+
},
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
async function run() {
|
|
213
|
+
const res = await connectionListUnifiedConnections(unifiedTo, {});
|
|
214
|
+
|
|
215
|
+
if (!res.ok) {
|
|
216
|
+
throw res.error;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const { value: result } = res;
|
|
220
|
+
|
|
221
|
+
// Handle the result
|
|
222
|
+
console.log(result);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
run();
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Parameters
|
|
229
|
+
|
|
230
|
+
| Parameter | Type | Required | Description |
|
|
231
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
232
|
+
| `request` | [operations.ListUnifiedConnectionsRequest](../../sdk/models/operations/listunifiedconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
233
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
234
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
235
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
236
|
+
|
|
237
|
+
### Response
|
|
238
|
+
|
|
239
|
+
**Promise\<[shared.Connection[]](../../models/.md)\>**
|
|
240
|
+
|
|
241
|
+
### Errors
|
|
242
|
+
|
|
243
|
+
| Error Type | Status Code | Content Type |
|
|
244
|
+
| --------------- | --------------- | --------------- |
|
|
245
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
246
|
+
|
|
247
|
+
## patchUnifiedConnection
|
|
248
|
+
|
|
249
|
+
Update connection
|
|
250
|
+
|
|
251
|
+
### Example Usage
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
255
|
+
|
|
256
|
+
const unifiedTo = new UnifiedTo({
|
|
257
|
+
security: {
|
|
258
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
259
|
+
},
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
async function run() {
|
|
263
|
+
const result = await unifiedTo.connection.patchUnifiedConnection({
|
|
264
|
+
id: "<id>",
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
// Handle the result
|
|
268
|
+
console.log(result);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
run();
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Standalone function
|
|
275
|
+
|
|
276
|
+
The standalone function version of this method:
|
|
277
|
+
|
|
278
|
+
```typescript
|
|
279
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
280
|
+
import { connectionPatchUnifiedConnection } from "@unified-api/typescript-sdk/funcs/connectionPatchUnifiedConnection.js";
|
|
281
|
+
|
|
282
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
283
|
+
// You can create one instance of it to use across an application.
|
|
284
|
+
const unifiedTo = new UnifiedToCore({
|
|
285
|
+
security: {
|
|
286
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
287
|
+
},
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
async function run() {
|
|
291
|
+
const res = await connectionPatchUnifiedConnection(unifiedTo, {
|
|
292
|
+
id: "<id>",
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
if (!res.ok) {
|
|
296
|
+
throw res.error;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
const { value: result } = res;
|
|
300
|
+
|
|
301
|
+
// Handle the result
|
|
302
|
+
console.log(result);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
run();
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Parameters
|
|
309
|
+
|
|
310
|
+
| Parameter | Type | Required | Description |
|
|
311
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
312
|
+
| `request` | [operations.PatchUnifiedConnectionRequest](../../sdk/models/operations/patchunifiedconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
313
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
314
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
315
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
316
|
+
|
|
317
|
+
### Response
|
|
318
|
+
|
|
319
|
+
**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>**
|
|
320
|
+
|
|
321
|
+
### Errors
|
|
322
|
+
|
|
323
|
+
| Error Type | Status Code | Content Type |
|
|
324
|
+
| --------------- | --------------- | --------------- |
|
|
325
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
326
|
+
|
|
327
|
+
## removeUnifiedConnection
|
|
328
|
+
|
|
329
|
+
Remove connection
|
|
330
|
+
|
|
331
|
+
### Example Usage
|
|
332
|
+
|
|
333
|
+
```typescript
|
|
334
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
335
|
+
|
|
336
|
+
const unifiedTo = new UnifiedTo({
|
|
337
|
+
security: {
|
|
338
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
339
|
+
},
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
async function run() {
|
|
343
|
+
const result = await unifiedTo.connection.removeUnifiedConnection({
|
|
344
|
+
id: "<id>",
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
// Handle the result
|
|
348
|
+
console.log(result);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
run();
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Standalone function
|
|
355
|
+
|
|
356
|
+
The standalone function version of this method:
|
|
357
|
+
|
|
358
|
+
```typescript
|
|
359
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
360
|
+
import { connectionRemoveUnifiedConnection } from "@unified-api/typescript-sdk/funcs/connectionRemoveUnifiedConnection.js";
|
|
361
|
+
|
|
362
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
363
|
+
// You can create one instance of it to use across an application.
|
|
364
|
+
const unifiedTo = new UnifiedToCore({
|
|
365
|
+
security: {
|
|
366
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
367
|
+
},
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
async function run() {
|
|
371
|
+
const res = await connectionRemoveUnifiedConnection(unifiedTo, {
|
|
372
|
+
id: "<id>",
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
if (!res.ok) {
|
|
376
|
+
throw res.error;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
const { value: result } = res;
|
|
380
|
+
|
|
381
|
+
// Handle the result
|
|
382
|
+
console.log(result);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
run();
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### Parameters
|
|
389
|
+
|
|
390
|
+
| Parameter | Type | Required | Description |
|
|
391
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
392
|
+
| `request` | [operations.RemoveUnifiedConnectionRequest](../../sdk/models/operations/removeunifiedconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
393
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
394
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
395
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
396
|
+
|
|
397
|
+
### Response
|
|
398
|
+
|
|
399
|
+
**Promise\<[operations.RemoveUnifiedConnectionResponse](../../sdk/models/operations/removeunifiedconnectionresponse.md)\>**
|
|
400
|
+
|
|
401
|
+
### Errors
|
|
402
|
+
|
|
403
|
+
| Error Type | Status Code | Content Type |
|
|
404
|
+
| --------------- | --------------- | --------------- |
|
|
405
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
406
|
+
|
|
407
|
+
## updateUnifiedConnection
|
|
408
|
+
|
|
409
|
+
Update connection
|
|
410
|
+
|
|
411
|
+
### Example Usage
|
|
412
|
+
|
|
413
|
+
```typescript
|
|
414
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
415
|
+
|
|
416
|
+
const unifiedTo = new UnifiedTo({
|
|
417
|
+
security: {
|
|
418
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
419
|
+
},
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
async function run() {
|
|
423
|
+
const result = await unifiedTo.connection.updateUnifiedConnection({
|
|
424
|
+
id: "<id>",
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
// Handle the result
|
|
428
|
+
console.log(result);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
run();
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
### Standalone function
|
|
435
|
+
|
|
436
|
+
The standalone function version of this method:
|
|
437
|
+
|
|
438
|
+
```typescript
|
|
439
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
440
|
+
import { connectionUpdateUnifiedConnection } from "@unified-api/typescript-sdk/funcs/connectionUpdateUnifiedConnection.js";
|
|
441
|
+
|
|
442
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
443
|
+
// You can create one instance of it to use across an application.
|
|
444
|
+
const unifiedTo = new UnifiedToCore({
|
|
445
|
+
security: {
|
|
446
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
447
|
+
},
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
async function run() {
|
|
451
|
+
const res = await connectionUpdateUnifiedConnection(unifiedTo, {
|
|
452
|
+
id: "<id>",
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
if (!res.ok) {
|
|
456
|
+
throw res.error;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
const { value: result } = res;
|
|
460
|
+
|
|
461
|
+
// Handle the result
|
|
462
|
+
console.log(result);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
run();
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
### Parameters
|
|
469
|
+
|
|
470
|
+
| Parameter | Type | Required | Description |
|
|
471
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
472
|
+
| `request` | [operations.UpdateUnifiedConnectionRequest](../../sdk/models/operations/updateunifiedconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
473
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
474
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
475
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
476
|
+
|
|
477
|
+
### Response
|
|
478
|
+
|
|
479
|
+
**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>**
|
|
480
|
+
|
|
481
|
+
### Errors
|
|
482
|
+
|
|
483
|
+
| Error Type | Status Code | Content Type |
|
|
484
|
+
| --------------- | --------------- | --------------- |
|
|
485
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|