@unified-api/typescript-sdk 2.79.0 → 2.80.1

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.
Files changed (165) hide show
  1. package/examples/package-lock.json +1 -1
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +3 -3
  4. package/lib/config.js +3 -3
  5. package/package.json +1 -1
  6. package/sdk/models/shared/calendareventrecurrence.d.ts +2 -5
  7. package/sdk/models/shared/calendareventrecurrence.d.ts.map +1 -1
  8. package/sdk/models/shared/calendareventrecurrence.js +2 -2
  9. package/sdk/models/shared/calendareventrecurrence.js.map +1 -1
  10. package/sdk/models/shared/index.d.ts +5 -0
  11. package/sdk/models/shared/index.d.ts.map +1 -1
  12. package/sdk/models/shared/index.js +5 -0
  13. package/sdk/models/shared/index.js.map +1 -1
  14. package/sdk/models/shared/integration.d.ts +3 -2
  15. package/sdk/models/shared/integration.d.ts.map +1 -1
  16. package/sdk/models/shared/integration.js +3 -2
  17. package/sdk/models/shared/integration.js.map +1 -1
  18. package/sdk/models/shared/integrationsupport.d.ts +2410 -0
  19. package/sdk/models/shared/integrationsupport.d.ts.map +1 -0
  20. package/sdk/models/shared/integrationsupport.js +3440 -0
  21. package/sdk/models/shared/integrationsupport.js.map +1 -0
  22. package/sdk/models/shared/kmspage.d.ts +2 -0
  23. package/sdk/models/shared/kmspage.d.ts.map +1 -1
  24. package/sdk/models/shared/kmspage.js +4 -0
  25. package/sdk/models/shared/kmspage.js.map +1 -1
  26. package/sdk/models/shared/propertyintegrationsupportwebhookevents.d.ts +36 -0
  27. package/sdk/models/shared/propertyintegrationsupportwebhookevents.d.ts.map +1 -0
  28. package/sdk/models/shared/propertyintegrationsupportwebhookevents.js +79 -0
  29. package/sdk/models/shared/propertyintegrationsupportwebhookevents.js.map +1 -0
  30. package/sdk/models/shared/propertyintegrationsupportwebhookeventscreated.d.ts +22 -0
  31. package/sdk/models/shared/propertyintegrationsupportwebhookeventscreated.d.ts.map +1 -0
  32. package/sdk/models/shared/propertyintegrationsupportwebhookeventscreated.js +68 -0
  33. package/sdk/models/shared/propertyintegrationsupportwebhookeventscreated.js.map +1 -0
  34. package/sdk/models/shared/propertyintegrationsupportwebhookeventsdeleted.d.ts +22 -0
  35. package/sdk/models/shared/propertyintegrationsupportwebhookeventsdeleted.d.ts.map +1 -0
  36. package/sdk/models/shared/propertyintegrationsupportwebhookeventsdeleted.js +68 -0
  37. package/sdk/models/shared/propertyintegrationsupportwebhookeventsdeleted.js.map +1 -0
  38. package/sdk/models/shared/propertyintegrationsupportwebhookeventsupdated.d.ts +22 -0
  39. package/sdk/models/shared/propertyintegrationsupportwebhookeventsupdated.d.ts.map +1 -0
  40. package/sdk/models/shared/propertyintegrationsupportwebhookeventsupdated.js +68 -0
  41. package/sdk/models/shared/propertyintegrationsupportwebhookeventsupdated.js.map +1 -0
  42. package/sdk/models/shared/webhook.d.ts +2 -2
  43. package/sdk/models/shared/webhook.d.ts.map +1 -1
  44. package/sdk/models/shared/webhook.js +2 -2
  45. package/sdk/models/shared/webhook.js.map +1 -1
  46. package/src/lib/config.ts +3 -3
  47. package/src/sdk/models/shared/calendareventrecurrence.ts +4 -7
  48. package/src/sdk/models/shared/index.ts +5 -0
  49. package/src/sdk/models/shared/integration.ts +10 -4
  50. package/src/sdk/models/shared/integrationsupport.ts +4969 -0
  51. package/src/sdk/models/shared/kmspage.ts +6 -0
  52. package/src/sdk/models/shared/propertyintegrationsupportwebhookevents.ts +109 -0
  53. package/src/sdk/models/shared/propertyintegrationsupportwebhookeventscreated.ts +54 -0
  54. package/src/sdk/models/shared/propertyintegrationsupportwebhookeventsdeleted.ts +54 -0
  55. package/src/sdk/models/shared/propertyintegrationsupportwebhookeventsupdated.ts +54 -0
  56. package/src/sdk/models/shared/webhook.ts +4 -4
  57. package/docs/sdks/account/README.md +0 -489
  58. package/docs/sdks/accounting/README.md +0 -7221
  59. package/docs/sdks/activity/README.md +0 -489
  60. package/docs/sdks/apicall/README.md +0 -159
  61. package/docs/sdks/application/README.md +0 -489
  62. package/docs/sdks/applicationstatus/README.md +0 -85
  63. package/docs/sdks/ats/README.md +0 -3953
  64. package/docs/sdks/auth/README.md +0 -167
  65. package/docs/sdks/balancesheet/README.md +0 -165
  66. package/docs/sdks/bill/README.md +0 -489
  67. package/docs/sdks/branch/README.md +0 -507
  68. package/docs/sdks/busy/README.md +0 -85
  69. package/docs/sdks/calendar/README.md +0 -1713
  70. package/docs/sdks/call/README.md +0 -85
  71. package/docs/sdks/candidate/README.md +0 -489
  72. package/docs/sdks/cashflow/README.md +0 -165
  73. package/docs/sdks/category/README.md +0 -971
  74. package/docs/sdks/change/README.md +0 -165
  75. package/docs/sdks/channel/README.md +0 -165
  76. package/docs/sdks/class/README.md +0 -507
  77. package/docs/sdks/collection/README.md +0 -501
  78. package/docs/sdks/comment/README.md +0 -1495
  79. package/docs/sdks/commerce/README.md +0 -2465
  80. package/docs/sdks/commit/README.md +0 -501
  81. package/docs/sdks/company/README.md +0 -1543
  82. package/docs/sdks/connection/README.md +0 -513
  83. package/docs/sdks/contact/README.md +0 -1453
  84. package/docs/sdks/course/README.md +0 -501
  85. package/docs/sdks/creditmemo/README.md +0 -489
  86. package/docs/sdks/crm/README.md +0 -2899
  87. package/docs/sdks/customer/README.md +0 -489
  88. package/docs/sdks/deal/README.md +0 -489
  89. package/docs/sdks/device/README.md +0 -501
  90. package/docs/sdks/document/README.md +0 -489
  91. package/docs/sdks/embedding/README.md +0 -87
  92. package/docs/sdks/employee/README.md +0 -489
  93. package/docs/sdks/enrich/README.md +0 -163
  94. package/docs/sdks/event/README.md +0 -971
  95. package/docs/sdks/expense/README.md +0 -489
  96. package/docs/sdks/file/README.md +0 -489
  97. package/docs/sdks/genai/README.md +0 -325
  98. package/docs/sdks/group/README.md +0 -983
  99. package/docs/sdks/hris/README.md +0 -3251
  100. package/docs/sdks/instructor/README.md +0 -489
  101. package/docs/sdks/integration/README.md +0 -239
  102. package/docs/sdks/interview/README.md +0 -489
  103. package/docs/sdks/inventory/README.md +0 -501
  104. package/docs/sdks/invoice/README.md +0 -489
  105. package/docs/sdks/issue/README.md +0 -159
  106. package/docs/sdks/item/README.md +0 -489
  107. package/docs/sdks/job/README.md +0 -489
  108. package/docs/sdks/journal/README.md +0 -489
  109. package/docs/sdks/kms/README.md +0 -1495
  110. package/docs/sdks/lead/README.md +0 -489
  111. package/docs/sdks/link/README.md +0 -983
  112. package/docs/sdks/list/README.md +0 -489
  113. package/docs/sdks/lms/README.md +0 -1965
  114. package/docs/sdks/location/README.md +0 -983
  115. package/docs/sdks/login/README.md +0 -87
  116. package/docs/sdks/martech/README.md +0 -971
  117. package/docs/sdks/member/README.md +0 -489
  118. package/docs/sdks/message/README.md +0 -489
  119. package/docs/sdks/messaging/README.md +0 -647
  120. package/docs/sdks/metadata/README.md +0 -507
  121. package/docs/sdks/model/README.md +0 -165
  122. package/docs/sdks/note/README.md +0 -489
  123. package/docs/sdks/order/README.md +0 -489
  124. package/docs/sdks/organization/README.md +0 -647
  125. package/docs/sdks/package/README.md +0 -165
  126. package/docs/sdks/page/README.md +0 -507
  127. package/docs/sdks/passthrough/README.md +0 -647
  128. package/docs/sdks/payment/README.md +0 -1769
  129. package/docs/sdks/payout/README.md +0 -165
  130. package/docs/sdks/payslip/README.md +0 -165
  131. package/docs/sdks/person/README.md +0 -85
  132. package/docs/sdks/pipeline/README.md +0 -489
  133. package/docs/sdks/profitloss/README.md +0 -165
  134. package/docs/sdks/project/README.md +0 -489
  135. package/docs/sdks/prompt/README.md +0 -87
  136. package/docs/sdks/pullrequest/README.md +0 -489
  137. package/docs/sdks/purchaseorder/README.md +0 -489
  138. package/docs/sdks/recording/README.md +0 -647
  139. package/docs/sdks/refund/README.md +0 -165
  140. package/docs/sdks/repo/README.md +0 -2459
  141. package/docs/sdks/report/README.md +0 -165
  142. package/docs/sdks/repository/README.md +0 -501
  143. package/docs/sdks/request/README.md +0 -489
  144. package/docs/sdks/review/README.md +0 -501
  145. package/docs/sdks/salesorder/README.md +0 -489
  146. package/docs/sdks/scim/README.md +0 -983
  147. package/docs/sdks/scorecard/README.md +0 -489
  148. package/docs/sdks/space/README.md +0 -501
  149. package/docs/sdks/storage/README.md +0 -489
  150. package/docs/sdks/student/README.md +0 -489
  151. package/docs/sdks/subscription/README.md +0 -489
  152. package/docs/sdks/task/README.md +0 -1629
  153. package/docs/sdks/taxrate/README.md +0 -489
  154. package/docs/sdks/ticket/README.md +0 -489
  155. package/docs/sdks/ticketing/README.md +0 -1935
  156. package/docs/sdks/timeoff/README.md +0 -165
  157. package/docs/sdks/timeshift/README.md +0 -513
  158. package/docs/sdks/transaction/README.md +0 -489
  159. package/docs/sdks/trialbalance/README.md +0 -165
  160. package/docs/sdks/uc/README.md +0 -1543
  161. package/docs/sdks/unified/README.md +0 -1697
  162. package/docs/sdks/user/README.md +0 -489
  163. package/docs/sdks/verification/README.md +0 -647
  164. package/docs/sdks/webhook/README.md +0 -655
  165. package/examples/README.md +0 -31
@@ -1,1697 +0,0 @@
1
- # Unified
2
- (*unified*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [createUnifiedConnection](#createunifiedconnection) - Create connection
9
- * [createUnifiedWebhook](#createunifiedwebhook) - Create webhook subscription
10
- * [getUnifiedApicall](#getunifiedapicall) - Retrieve specific API Call by its ID
11
- * [getUnifiedConnection](#getunifiedconnection) - Retrieve connection
12
- * [getUnifiedIntegrationAuth](#getunifiedintegrationauth) - Authorize new connection
13
- * [getUnifiedIssue](#getunifiedissue) - Retrieve support issue
14
- * [getUnifiedWebhook](#getunifiedwebhook) - Retrieve webhook by its ID
15
- * [listUnifiedApicalls](#listunifiedapicalls) - Returns API Calls
16
- * [listUnifiedConnections](#listunifiedconnections) - List all connections
17
- * [listUnifiedIntegrationWorkspaces](#listunifiedintegrationworkspaces) - Returns all activated integrations in a workspace
18
- * [listUnifiedIntegrations](#listunifiedintegrations) - Returns all integrations
19
- * [listUnifiedIssues](#listunifiedissues) - List support issues
20
- * [listUnifiedWebhooks](#listunifiedwebhooks) - Returns all registered webhooks
21
- * [patchUnifiedConnection](#patchunifiedconnection) - Update connection
22
- * [patchUnifiedWebhook](#patchunifiedwebhook) - Update webhook subscription
23
- * [patchUnifiedWebhookTrigger](#patchunifiedwebhooktrigger) - Trigger webhook
24
- * [removeUnifiedConnection](#removeunifiedconnection) - Remove connection
25
- * [removeUnifiedWebhook](#removeunifiedwebhook) - Remove webhook subscription
26
- * [updateUnifiedConnection](#updateunifiedconnection) - Update connection
27
- * [updateUnifiedWebhook](#updateunifiedwebhook) - Update webhook subscription
28
- * [updateUnifiedWebhookTrigger](#updateunifiedwebhooktrigger) - Trigger webhook
29
-
30
- ## createUnifiedConnection
31
-
32
- Used only to import existing customer credentials; use "Authorize new connection" instead
33
-
34
- ### Example Usage
35
-
36
- <!-- UsageSnippet language="typescript" operationID="createUnifiedConnection" method="post" path="/unified/connection" -->
37
- ```typescript
38
- import { UnifiedTo } from "@unified-api/typescript-sdk";
39
-
40
- const unifiedTo = new UnifiedTo({
41
- security: {
42
- jwt: "<YOUR_API_KEY_HERE>",
43
- },
44
- });
45
-
46
- async function run() {
47
- const result = await unifiedTo.unified.createUnifiedConnection({
48
- categories: [],
49
- integrationType: "<value>",
50
- permissions: [
51
- "enrich_company_read",
52
- ],
53
- });
54
-
55
- console.log(result);
56
- }
57
-
58
- run();
59
- ```
60
-
61
- ### Standalone function
62
-
63
- The standalone function version of this method:
64
-
65
- ```typescript
66
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
67
- import { unifiedCreateUnifiedConnection } from "@unified-api/typescript-sdk/funcs/unifiedCreateUnifiedConnection.js";
68
-
69
- // Use `UnifiedToCore` for best tree-shaking performance.
70
- // You can create one instance of it to use across an application.
71
- const unifiedTo = new UnifiedToCore({
72
- security: {
73
- jwt: "<YOUR_API_KEY_HERE>",
74
- },
75
- });
76
-
77
- async function run() {
78
- const res = await unifiedCreateUnifiedConnection(unifiedTo, {
79
- categories: [],
80
- integrationType: "<value>",
81
- permissions: [
82
- "enrich_company_read",
83
- ],
84
- });
85
- if (res.ok) {
86
- const { value: result } = res;
87
- console.log(result);
88
- } else {
89
- console.log("unifiedCreateUnifiedConnection failed:", res.error);
90
- }
91
- }
92
-
93
- run();
94
- ```
95
-
96
- ### Parameters
97
-
98
- | Parameter | Type | Required | Description |
99
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
100
- | `request` | [shared.Connection](../../sdk/models/shared/connection.md) | :heavy_check_mark: | The request object to use for the request. |
101
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
102
- | `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. |
103
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
104
-
105
- ### Response
106
-
107
- **Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>**
108
-
109
- ### Errors
110
-
111
- | Error Type | Status Code | Content Type |
112
- | --------------- | --------------- | --------------- |
113
- | errors.SDKError | 4XX, 5XX | \*/\* |
114
-
115
- ## createUnifiedWebhook
116
-
117
- The data payload received by your server is described at https://docs.unified.to/unified/overview. The `interval` field can be set as low as 1 minute for paid accounts, and 60 minutes for free accounts.
118
-
119
- ### Example Usage
120
-
121
- <!-- UsageSnippet language="typescript" operationID="createUnifiedWebhook" method="post" path="/unified/webhook" -->
122
- ```typescript
123
- import { UnifiedTo } from "@unified-api/typescript-sdk";
124
-
125
- const unifiedTo = new UnifiedTo({
126
- security: {
127
- jwt: "<YOUR_API_KEY_HERE>",
128
- },
129
- });
130
-
131
- async function run() {
132
- const result = await unifiedTo.unified.createUnifiedWebhook({
133
- webhook: {
134
- connectionId: "<id>",
135
- event: "created",
136
- objectType: "ats_scorecard",
137
- },
138
- });
139
-
140
- console.log(result);
141
- }
142
-
143
- run();
144
- ```
145
-
146
- ### Standalone function
147
-
148
- The standalone function version of this method:
149
-
150
- ```typescript
151
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
152
- import { unifiedCreateUnifiedWebhook } from "@unified-api/typescript-sdk/funcs/unifiedCreateUnifiedWebhook.js";
153
-
154
- // Use `UnifiedToCore` for best tree-shaking performance.
155
- // You can create one instance of it to use across an application.
156
- const unifiedTo = new UnifiedToCore({
157
- security: {
158
- jwt: "<YOUR_API_KEY_HERE>",
159
- },
160
- });
161
-
162
- async function run() {
163
- const res = await unifiedCreateUnifiedWebhook(unifiedTo, {
164
- webhook: {
165
- connectionId: "<id>",
166
- event: "created",
167
- objectType: "ats_scorecard",
168
- },
169
- });
170
- if (res.ok) {
171
- const { value: result } = res;
172
- console.log(result);
173
- } else {
174
- console.log("unifiedCreateUnifiedWebhook failed:", res.error);
175
- }
176
- }
177
-
178
- run();
179
- ```
180
-
181
- ### Parameters
182
-
183
- | Parameter | Type | Required | Description |
184
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
185
- | `request` | [operations.CreateUnifiedWebhookRequest](../../sdk/models/operations/createunifiedwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. |
186
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
187
- | `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. |
188
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
189
-
190
- ### Response
191
-
192
- **Promise\<[shared.Webhook](../../sdk/models/shared/webhook.md)\>**
193
-
194
- ### Errors
195
-
196
- | Error Type | Status Code | Content Type |
197
- | --------------- | --------------- | --------------- |
198
- | errors.SDKError | 4XX, 5XX | \*/\* |
199
-
200
- ## getUnifiedApicall
201
-
202
- Retrieve specific API Call by its ID
203
-
204
- ### Example Usage
205
-
206
- <!-- UsageSnippet language="typescript" operationID="getUnifiedApicall" method="get" path="/unified/apicall/{id}" -->
207
- ```typescript
208
- import { UnifiedTo } from "@unified-api/typescript-sdk";
209
-
210
- const unifiedTo = new UnifiedTo({
211
- security: {
212
- jwt: "<YOUR_API_KEY_HERE>",
213
- },
214
- });
215
-
216
- async function run() {
217
- const result = await unifiedTo.unified.getUnifiedApicall({
218
- id: "<id>",
219
- });
220
-
221
- console.log(result);
222
- }
223
-
224
- run();
225
- ```
226
-
227
- ### Standalone function
228
-
229
- The standalone function version of this method:
230
-
231
- ```typescript
232
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
233
- import { unifiedGetUnifiedApicall } from "@unified-api/typescript-sdk/funcs/unifiedGetUnifiedApicall.js";
234
-
235
- // Use `UnifiedToCore` for best tree-shaking performance.
236
- // You can create one instance of it to use across an application.
237
- const unifiedTo = new UnifiedToCore({
238
- security: {
239
- jwt: "<YOUR_API_KEY_HERE>",
240
- },
241
- });
242
-
243
- async function run() {
244
- const res = await unifiedGetUnifiedApicall(unifiedTo, {
245
- id: "<id>",
246
- });
247
- if (res.ok) {
248
- const { value: result } = res;
249
- console.log(result);
250
- } else {
251
- console.log("unifiedGetUnifiedApicall failed:", res.error);
252
- }
253
- }
254
-
255
- run();
256
- ```
257
-
258
- ### Parameters
259
-
260
- | Parameter | Type | Required | Description |
261
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
262
- | `request` | [operations.GetUnifiedApicallRequest](../../sdk/models/operations/getunifiedapicallrequest.md) | :heavy_check_mark: | The request object to use for the request. |
263
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
264
- | `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. |
265
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
266
-
267
- ### Response
268
-
269
- **Promise\<[shared.ApiCall](../../sdk/models/shared/apicall.md)\>**
270
-
271
- ### Errors
272
-
273
- | Error Type | Status Code | Content Type |
274
- | --------------- | --------------- | --------------- |
275
- | errors.SDKError | 4XX, 5XX | \*/\* |
276
-
277
- ## getUnifiedConnection
278
-
279
- Retrieve connection
280
-
281
- ### Example Usage
282
-
283
- <!-- UsageSnippet language="typescript" operationID="getUnifiedConnection" method="get" path="/unified/connection/{id}" -->
284
- ```typescript
285
- import { UnifiedTo } from "@unified-api/typescript-sdk";
286
-
287
- const unifiedTo = new UnifiedTo({
288
- security: {
289
- jwt: "<YOUR_API_KEY_HERE>",
290
- },
291
- });
292
-
293
- async function run() {
294
- const result = await unifiedTo.unified.getUnifiedConnection({
295
- id: "<id>",
296
- });
297
-
298
- console.log(result);
299
- }
300
-
301
- run();
302
- ```
303
-
304
- ### Standalone function
305
-
306
- The standalone function version of this method:
307
-
308
- ```typescript
309
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
310
- import { unifiedGetUnifiedConnection } from "@unified-api/typescript-sdk/funcs/unifiedGetUnifiedConnection.js";
311
-
312
- // Use `UnifiedToCore` for best tree-shaking performance.
313
- // You can create one instance of it to use across an application.
314
- const unifiedTo = new UnifiedToCore({
315
- security: {
316
- jwt: "<YOUR_API_KEY_HERE>",
317
- },
318
- });
319
-
320
- async function run() {
321
- const res = await unifiedGetUnifiedConnection(unifiedTo, {
322
- id: "<id>",
323
- });
324
- if (res.ok) {
325
- const { value: result } = res;
326
- console.log(result);
327
- } else {
328
- console.log("unifiedGetUnifiedConnection failed:", res.error);
329
- }
330
- }
331
-
332
- run();
333
- ```
334
-
335
- ### Parameters
336
-
337
- | Parameter | Type | Required | Description |
338
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
339
- | `request` | [operations.GetUnifiedConnectionRequest](../../sdk/models/operations/getunifiedconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
340
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
341
- | `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. |
342
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
343
-
344
- ### Response
345
-
346
- **Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>**
347
-
348
- ### Errors
349
-
350
- | Error Type | Status Code | Content Type |
351
- | --------------- | --------------- | --------------- |
352
- | errors.SDKError | 4XX, 5XX | \*/\* |
353
-
354
- ## getUnifiedIntegrationAuth
355
-
356
- Returns an authorization URL for the specified integration. Once a successful authorization occurs, a new connection is created.
357
-
358
- ### Example Usage
359
-
360
- <!-- UsageSnippet language="typescript" operationID="getUnifiedIntegrationAuth" method="get" path="/unified/integration/auth/{workspace_id}/{integration_type}" -->
361
- ```typescript
362
- import { UnifiedTo } from "@unified-api/typescript-sdk";
363
-
364
- const unifiedTo = new UnifiedTo({
365
- security: {
366
- jwt: "<YOUR_API_KEY_HERE>",
367
- },
368
- });
369
-
370
- async function run() {
371
- const result = await unifiedTo.unified.getUnifiedIntegrationAuth({
372
- integrationType: "<value>",
373
- workspaceId: "<id>",
374
- });
375
-
376
- console.log(result);
377
- }
378
-
379
- run();
380
- ```
381
-
382
- ### Standalone function
383
-
384
- The standalone function version of this method:
385
-
386
- ```typescript
387
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
388
- import { unifiedGetUnifiedIntegrationAuth } from "@unified-api/typescript-sdk/funcs/unifiedGetUnifiedIntegrationAuth.js";
389
-
390
- // Use `UnifiedToCore` for best tree-shaking performance.
391
- // You can create one instance of it to use across an application.
392
- const unifiedTo = new UnifiedToCore({
393
- security: {
394
- jwt: "<YOUR_API_KEY_HERE>",
395
- },
396
- });
397
-
398
- async function run() {
399
- const res = await unifiedGetUnifiedIntegrationAuth(unifiedTo, {
400
- integrationType: "<value>",
401
- workspaceId: "<id>",
402
- });
403
- if (res.ok) {
404
- const { value: result } = res;
405
- console.log(result);
406
- } else {
407
- console.log("unifiedGetUnifiedIntegrationAuth failed:", res.error);
408
- }
409
- }
410
-
411
- run();
412
- ```
413
-
414
- ### Parameters
415
-
416
- | Parameter | Type | Required | Description |
417
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
418
- | `request` | [operations.GetUnifiedIntegrationAuthRequest](../../sdk/models/operations/getunifiedintegrationauthrequest.md) | :heavy_check_mark: | The request object to use for the request. |
419
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
420
- | `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. |
421
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
422
-
423
- ### Response
424
-
425
- **Promise\<[string](../../models/.md)\>**
426
-
427
- ### Errors
428
-
429
- | Error Type | Status Code | Content Type |
430
- | --------------- | --------------- | --------------- |
431
- | errors.SDKError | 4XX, 5XX | \*/\* |
432
-
433
- ## getUnifiedIssue
434
-
435
- Retrieve support issue
436
-
437
- ### Example Usage
438
-
439
- <!-- UsageSnippet language="typescript" operationID="getUnifiedIssue" method="get" path="/unified/issue/{id}" -->
440
- ```typescript
441
- import { UnifiedTo } from "@unified-api/typescript-sdk";
442
-
443
- const unifiedTo = new UnifiedTo({
444
- security: {
445
- jwt: "<YOUR_API_KEY_HERE>",
446
- },
447
- });
448
-
449
- async function run() {
450
- const result = await unifiedTo.unified.getUnifiedIssue({
451
- id: "<id>",
452
- });
453
-
454
- console.log(result);
455
- }
456
-
457
- run();
458
- ```
459
-
460
- ### Standalone function
461
-
462
- The standalone function version of this method:
463
-
464
- ```typescript
465
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
466
- import { unifiedGetUnifiedIssue } from "@unified-api/typescript-sdk/funcs/unifiedGetUnifiedIssue.js";
467
-
468
- // Use `UnifiedToCore` for best tree-shaking performance.
469
- // You can create one instance of it to use across an application.
470
- const unifiedTo = new UnifiedToCore({
471
- security: {
472
- jwt: "<YOUR_API_KEY_HERE>",
473
- },
474
- });
475
-
476
- async function run() {
477
- const res = await unifiedGetUnifiedIssue(unifiedTo, {
478
- id: "<id>",
479
- });
480
- if (res.ok) {
481
- const { value: result } = res;
482
- console.log(result);
483
- } else {
484
- console.log("unifiedGetUnifiedIssue failed:", res.error);
485
- }
486
- }
487
-
488
- run();
489
- ```
490
-
491
- ### Parameters
492
-
493
- | Parameter | Type | Required | Description |
494
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
495
- | `request` | [operations.GetUnifiedIssueRequest](../../sdk/models/operations/getunifiedissuerequest.md) | :heavy_check_mark: | The request object to use for the request. |
496
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
497
- | `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. |
498
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
499
-
500
- ### Response
501
-
502
- **Promise\<[shared.Issue](../../sdk/models/shared/issue.md)\>**
503
-
504
- ### Errors
505
-
506
- | Error Type | Status Code | Content Type |
507
- | --------------- | --------------- | --------------- |
508
- | errors.SDKError | 4XX, 5XX | \*/\* |
509
-
510
- ## getUnifiedWebhook
511
-
512
- Retrieve webhook by its ID
513
-
514
- ### Example Usage
515
-
516
- <!-- UsageSnippet language="typescript" operationID="getUnifiedWebhook" method="get" path="/unified/webhook/{id}" -->
517
- ```typescript
518
- import { UnifiedTo } from "@unified-api/typescript-sdk";
519
-
520
- const unifiedTo = new UnifiedTo({
521
- security: {
522
- jwt: "<YOUR_API_KEY_HERE>",
523
- },
524
- });
525
-
526
- async function run() {
527
- const result = await unifiedTo.unified.getUnifiedWebhook({
528
- id: "<id>",
529
- });
530
-
531
- console.log(result);
532
- }
533
-
534
- run();
535
- ```
536
-
537
- ### Standalone function
538
-
539
- The standalone function version of this method:
540
-
541
- ```typescript
542
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
543
- import { unifiedGetUnifiedWebhook } from "@unified-api/typescript-sdk/funcs/unifiedGetUnifiedWebhook.js";
544
-
545
- // Use `UnifiedToCore` for best tree-shaking performance.
546
- // You can create one instance of it to use across an application.
547
- const unifiedTo = new UnifiedToCore({
548
- security: {
549
- jwt: "<YOUR_API_KEY_HERE>",
550
- },
551
- });
552
-
553
- async function run() {
554
- const res = await unifiedGetUnifiedWebhook(unifiedTo, {
555
- id: "<id>",
556
- });
557
- if (res.ok) {
558
- const { value: result } = res;
559
- console.log(result);
560
- } else {
561
- console.log("unifiedGetUnifiedWebhook failed:", res.error);
562
- }
563
- }
564
-
565
- run();
566
- ```
567
-
568
- ### Parameters
569
-
570
- | Parameter | Type | Required | Description |
571
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
572
- | `request` | [operations.GetUnifiedWebhookRequest](../../sdk/models/operations/getunifiedwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. |
573
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
574
- | `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. |
575
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
576
-
577
- ### Response
578
-
579
- **Promise\<[shared.Webhook](../../sdk/models/shared/webhook.md)\>**
580
-
581
- ### Errors
582
-
583
- | Error Type | Status Code | Content Type |
584
- | --------------- | --------------- | --------------- |
585
- | errors.SDKError | 4XX, 5XX | \*/\* |
586
-
587
- ## listUnifiedApicalls
588
-
589
- Returns API Calls
590
-
591
- ### Example Usage
592
-
593
- <!-- UsageSnippet language="typescript" operationID="listUnifiedApicalls" method="get" path="/unified/apicall" -->
594
- ```typescript
595
- import { UnifiedTo } from "@unified-api/typescript-sdk";
596
-
597
- const unifiedTo = new UnifiedTo({
598
- security: {
599
- jwt: "<YOUR_API_KEY_HERE>",
600
- },
601
- });
602
-
603
- async function run() {
604
- const result = await unifiedTo.unified.listUnifiedApicalls({});
605
-
606
- console.log(result);
607
- }
608
-
609
- run();
610
- ```
611
-
612
- ### Standalone function
613
-
614
- The standalone function version of this method:
615
-
616
- ```typescript
617
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
618
- import { unifiedListUnifiedApicalls } from "@unified-api/typescript-sdk/funcs/unifiedListUnifiedApicalls.js";
619
-
620
- // Use `UnifiedToCore` for best tree-shaking performance.
621
- // You can create one instance of it to use across an application.
622
- const unifiedTo = new UnifiedToCore({
623
- security: {
624
- jwt: "<YOUR_API_KEY_HERE>",
625
- },
626
- });
627
-
628
- async function run() {
629
- const res = await unifiedListUnifiedApicalls(unifiedTo, {});
630
- if (res.ok) {
631
- const { value: result } = res;
632
- console.log(result);
633
- } else {
634
- console.log("unifiedListUnifiedApicalls failed:", res.error);
635
- }
636
- }
637
-
638
- run();
639
- ```
640
-
641
- ### Parameters
642
-
643
- | Parameter | Type | Required | Description |
644
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
645
- | `request` | [operations.ListUnifiedApicallsRequest](../../sdk/models/operations/listunifiedapicallsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
646
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
647
- | `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. |
648
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
649
-
650
- ### Response
651
-
652
- **Promise\<[shared.ApiCall[]](../../models/.md)\>**
653
-
654
- ### Errors
655
-
656
- | Error Type | Status Code | Content Type |
657
- | --------------- | --------------- | --------------- |
658
- | errors.SDKError | 4XX, 5XX | \*/\* |
659
-
660
- ## listUnifiedConnections
661
-
662
- List all connections
663
-
664
- ### Example Usage
665
-
666
- <!-- UsageSnippet language="typescript" operationID="listUnifiedConnections" method="get" path="/unified/connection" -->
667
- ```typescript
668
- import { UnifiedTo } from "@unified-api/typescript-sdk";
669
-
670
- const unifiedTo = new UnifiedTo({
671
- security: {
672
- jwt: "<YOUR_API_KEY_HERE>",
673
- },
674
- });
675
-
676
- async function run() {
677
- const result = await unifiedTo.unified.listUnifiedConnections({});
678
-
679
- console.log(result);
680
- }
681
-
682
- run();
683
- ```
684
-
685
- ### Standalone function
686
-
687
- The standalone function version of this method:
688
-
689
- ```typescript
690
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
691
- import { unifiedListUnifiedConnections } from "@unified-api/typescript-sdk/funcs/unifiedListUnifiedConnections.js";
692
-
693
- // Use `UnifiedToCore` for best tree-shaking performance.
694
- // You can create one instance of it to use across an application.
695
- const unifiedTo = new UnifiedToCore({
696
- security: {
697
- jwt: "<YOUR_API_KEY_HERE>",
698
- },
699
- });
700
-
701
- async function run() {
702
- const res = await unifiedListUnifiedConnections(unifiedTo, {});
703
- if (res.ok) {
704
- const { value: result } = res;
705
- console.log(result);
706
- } else {
707
- console.log("unifiedListUnifiedConnections failed:", res.error);
708
- }
709
- }
710
-
711
- run();
712
- ```
713
-
714
- ### Parameters
715
-
716
- | Parameter | Type | Required | Description |
717
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
718
- | `request` | [operations.ListUnifiedConnectionsRequest](../../sdk/models/operations/listunifiedconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
719
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
720
- | `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. |
721
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
722
-
723
- ### Response
724
-
725
- **Promise\<[shared.Connection[]](../../models/.md)\>**
726
-
727
- ### Errors
728
-
729
- | Error Type | Status Code | Content Type |
730
- | --------------- | --------------- | --------------- |
731
- | errors.SDKError | 4XX, 5XX | \*/\* |
732
-
733
- ## listUnifiedIntegrationWorkspaces
734
-
735
- No authentication required as this is to be used by front-end interface
736
-
737
- ### Example Usage
738
-
739
- <!-- UsageSnippet language="typescript" operationID="listUnifiedIntegrationWorkspaces" method="get" path="/unified/integration/workspace/{workspace_id}" -->
740
- ```typescript
741
- import { UnifiedTo } from "@unified-api/typescript-sdk";
742
-
743
- const unifiedTo = new UnifiedTo({
744
- security: {
745
- jwt: "<YOUR_API_KEY_HERE>",
746
- },
747
- });
748
-
749
- async function run() {
750
- const result = await unifiedTo.unified.listUnifiedIntegrationWorkspaces({
751
- workspaceId: "<id>",
752
- });
753
-
754
- console.log(result);
755
- }
756
-
757
- run();
758
- ```
759
-
760
- ### Standalone function
761
-
762
- The standalone function version of this method:
763
-
764
- ```typescript
765
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
766
- import { unifiedListUnifiedIntegrationWorkspaces } from "@unified-api/typescript-sdk/funcs/unifiedListUnifiedIntegrationWorkspaces.js";
767
-
768
- // Use `UnifiedToCore` for best tree-shaking performance.
769
- // You can create one instance of it to use across an application.
770
- const unifiedTo = new UnifiedToCore({
771
- security: {
772
- jwt: "<YOUR_API_KEY_HERE>",
773
- },
774
- });
775
-
776
- async function run() {
777
- const res = await unifiedListUnifiedIntegrationWorkspaces(unifiedTo, {
778
- workspaceId: "<id>",
779
- });
780
- if (res.ok) {
781
- const { value: result } = res;
782
- console.log(result);
783
- } else {
784
- console.log("unifiedListUnifiedIntegrationWorkspaces failed:", res.error);
785
- }
786
- }
787
-
788
- run();
789
- ```
790
-
791
- ### Parameters
792
-
793
- | Parameter | Type | Required | Description |
794
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
795
- | `request` | [operations.ListUnifiedIntegrationWorkspacesRequest](../../sdk/models/operations/listunifiedintegrationworkspacesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
796
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
797
- | `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. |
798
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
799
-
800
- ### Response
801
-
802
- **Promise\<[shared.Integration[]](../../models/.md)\>**
803
-
804
- ### Errors
805
-
806
- | Error Type | Status Code | Content Type |
807
- | --------------- | --------------- | --------------- |
808
- | errors.SDKError | 4XX, 5XX | \*/\* |
809
-
810
- ## listUnifiedIntegrations
811
-
812
- Returns all integrations
813
-
814
- ### Example Usage
815
-
816
- <!-- UsageSnippet language="typescript" operationID="listUnifiedIntegrations" method="get" path="/unified/integration" -->
817
- ```typescript
818
- import { UnifiedTo } from "@unified-api/typescript-sdk";
819
-
820
- const unifiedTo = new UnifiedTo({
821
- security: {
822
- jwt: "<YOUR_API_KEY_HERE>",
823
- },
824
- });
825
-
826
- async function run() {
827
- const result = await unifiedTo.unified.listUnifiedIntegrations({});
828
-
829
- console.log(result);
830
- }
831
-
832
- run();
833
- ```
834
-
835
- ### Standalone function
836
-
837
- The standalone function version of this method:
838
-
839
- ```typescript
840
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
841
- import { unifiedListUnifiedIntegrations } from "@unified-api/typescript-sdk/funcs/unifiedListUnifiedIntegrations.js";
842
-
843
- // Use `UnifiedToCore` for best tree-shaking performance.
844
- // You can create one instance of it to use across an application.
845
- const unifiedTo = new UnifiedToCore({
846
- security: {
847
- jwt: "<YOUR_API_KEY_HERE>",
848
- },
849
- });
850
-
851
- async function run() {
852
- const res = await unifiedListUnifiedIntegrations(unifiedTo, {});
853
- if (res.ok) {
854
- const { value: result } = res;
855
- console.log(result);
856
- } else {
857
- console.log("unifiedListUnifiedIntegrations failed:", res.error);
858
- }
859
- }
860
-
861
- run();
862
- ```
863
-
864
- ### Parameters
865
-
866
- | Parameter | Type | Required | Description |
867
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
868
- | `request` | [operations.ListUnifiedIntegrationsRequest](../../sdk/models/operations/listunifiedintegrationsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
869
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
870
- | `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. |
871
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
872
-
873
- ### Response
874
-
875
- **Promise\<[shared.Integration[]](../../models/.md)\>**
876
-
877
- ### Errors
878
-
879
- | Error Type | Status Code | Content Type |
880
- | --------------- | --------------- | --------------- |
881
- | errors.SDKError | 4XX, 5XX | \*/\* |
882
-
883
- ## listUnifiedIssues
884
-
885
- List support issues
886
-
887
- ### Example Usage
888
-
889
- <!-- UsageSnippet language="typescript" operationID="listUnifiedIssues" method="get" path="/unified/issue" -->
890
- ```typescript
891
- import { UnifiedTo } from "@unified-api/typescript-sdk";
892
-
893
- const unifiedTo = new UnifiedTo({
894
- security: {
895
- jwt: "<YOUR_API_KEY_HERE>",
896
- },
897
- });
898
-
899
- async function run() {
900
- const result = await unifiedTo.unified.listUnifiedIssues({});
901
-
902
- console.log(result);
903
- }
904
-
905
- run();
906
- ```
907
-
908
- ### Standalone function
909
-
910
- The standalone function version of this method:
911
-
912
- ```typescript
913
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
914
- import { unifiedListUnifiedIssues } from "@unified-api/typescript-sdk/funcs/unifiedListUnifiedIssues.js";
915
-
916
- // Use `UnifiedToCore` for best tree-shaking performance.
917
- // You can create one instance of it to use across an application.
918
- const unifiedTo = new UnifiedToCore({
919
- security: {
920
- jwt: "<YOUR_API_KEY_HERE>",
921
- },
922
- });
923
-
924
- async function run() {
925
- const res = await unifiedListUnifiedIssues(unifiedTo, {});
926
- if (res.ok) {
927
- const { value: result } = res;
928
- console.log(result);
929
- } else {
930
- console.log("unifiedListUnifiedIssues failed:", res.error);
931
- }
932
- }
933
-
934
- run();
935
- ```
936
-
937
- ### Parameters
938
-
939
- | Parameter | Type | Required | Description |
940
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
941
- | `request` | [operations.ListUnifiedIssuesRequest](../../sdk/models/operations/listunifiedissuesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
942
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
943
- | `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. |
944
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
945
-
946
- ### Response
947
-
948
- **Promise\<[shared.Issue[]](../../models/.md)\>**
949
-
950
- ### Errors
951
-
952
- | Error Type | Status Code | Content Type |
953
- | --------------- | --------------- | --------------- |
954
- | errors.SDKError | 4XX, 5XX | \*/\* |
955
-
956
- ## listUnifiedWebhooks
957
-
958
- Returns all registered webhooks
959
-
960
- ### Example Usage
961
-
962
- <!-- UsageSnippet language="typescript" operationID="listUnifiedWebhooks" method="get" path="/unified/webhook" -->
963
- ```typescript
964
- import { UnifiedTo } from "@unified-api/typescript-sdk";
965
-
966
- const unifiedTo = new UnifiedTo({
967
- security: {
968
- jwt: "<YOUR_API_KEY_HERE>",
969
- },
970
- });
971
-
972
- async function run() {
973
- const result = await unifiedTo.unified.listUnifiedWebhooks({});
974
-
975
- console.log(result);
976
- }
977
-
978
- run();
979
- ```
980
-
981
- ### Standalone function
982
-
983
- The standalone function version of this method:
984
-
985
- ```typescript
986
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
987
- import { unifiedListUnifiedWebhooks } from "@unified-api/typescript-sdk/funcs/unifiedListUnifiedWebhooks.js";
988
-
989
- // Use `UnifiedToCore` for best tree-shaking performance.
990
- // You can create one instance of it to use across an application.
991
- const unifiedTo = new UnifiedToCore({
992
- security: {
993
- jwt: "<YOUR_API_KEY_HERE>",
994
- },
995
- });
996
-
997
- async function run() {
998
- const res = await unifiedListUnifiedWebhooks(unifiedTo, {});
999
- if (res.ok) {
1000
- const { value: result } = res;
1001
- console.log(result);
1002
- } else {
1003
- console.log("unifiedListUnifiedWebhooks failed:", res.error);
1004
- }
1005
- }
1006
-
1007
- run();
1008
- ```
1009
-
1010
- ### Parameters
1011
-
1012
- | Parameter | Type | Required | Description |
1013
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1014
- | `request` | [operations.ListUnifiedWebhooksRequest](../../sdk/models/operations/listunifiedwebhooksrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1015
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1016
- | `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. |
1017
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1018
-
1019
- ### Response
1020
-
1021
- **Promise\<[shared.Webhook[]](../../models/.md)\>**
1022
-
1023
- ### Errors
1024
-
1025
- | Error Type | Status Code | Content Type |
1026
- | --------------- | --------------- | --------------- |
1027
- | errors.SDKError | 4XX, 5XX | \*/\* |
1028
-
1029
- ## patchUnifiedConnection
1030
-
1031
- Update connection
1032
-
1033
- ### Example Usage
1034
-
1035
- <!-- UsageSnippet language="typescript" operationID="patchUnifiedConnection" method="patch" path="/unified/connection/{id}" -->
1036
- ```typescript
1037
- import { UnifiedTo } from "@unified-api/typescript-sdk";
1038
-
1039
- const unifiedTo = new UnifiedTo({
1040
- security: {
1041
- jwt: "<YOUR_API_KEY_HERE>",
1042
- },
1043
- });
1044
-
1045
- async function run() {
1046
- const result = await unifiedTo.unified.patchUnifiedConnection({
1047
- connection: {
1048
- categories: [
1049
- "storage",
1050
- ],
1051
- integrationType: "<value>",
1052
- permissions: [
1053
- "uc_contact_write",
1054
- ],
1055
- },
1056
- id: "<id>",
1057
- });
1058
-
1059
- console.log(result);
1060
- }
1061
-
1062
- run();
1063
- ```
1064
-
1065
- ### Standalone function
1066
-
1067
- The standalone function version of this method:
1068
-
1069
- ```typescript
1070
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
1071
- import { unifiedPatchUnifiedConnection } from "@unified-api/typescript-sdk/funcs/unifiedPatchUnifiedConnection.js";
1072
-
1073
- // Use `UnifiedToCore` for best tree-shaking performance.
1074
- // You can create one instance of it to use across an application.
1075
- const unifiedTo = new UnifiedToCore({
1076
- security: {
1077
- jwt: "<YOUR_API_KEY_HERE>",
1078
- },
1079
- });
1080
-
1081
- async function run() {
1082
- const res = await unifiedPatchUnifiedConnection(unifiedTo, {
1083
- connection: {
1084
- categories: [
1085
- "storage",
1086
- ],
1087
- integrationType: "<value>",
1088
- permissions: [
1089
- "uc_contact_write",
1090
- ],
1091
- },
1092
- id: "<id>",
1093
- });
1094
- if (res.ok) {
1095
- const { value: result } = res;
1096
- console.log(result);
1097
- } else {
1098
- console.log("unifiedPatchUnifiedConnection failed:", res.error);
1099
- }
1100
- }
1101
-
1102
- run();
1103
- ```
1104
-
1105
- ### Parameters
1106
-
1107
- | Parameter | Type | Required | Description |
1108
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1109
- | `request` | [operations.PatchUnifiedConnectionRequest](../../sdk/models/operations/patchunifiedconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1110
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1111
- | `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. |
1112
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1113
-
1114
- ### Response
1115
-
1116
- **Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>**
1117
-
1118
- ### Errors
1119
-
1120
- | Error Type | Status Code | Content Type |
1121
- | --------------- | --------------- | --------------- |
1122
- | errors.SDKError | 4XX, 5XX | \*/\* |
1123
-
1124
- ## patchUnifiedWebhook
1125
-
1126
- Update webhook subscription
1127
-
1128
- ### Example Usage
1129
-
1130
- <!-- UsageSnippet language="typescript" operationID="patchUnifiedWebhook" method="patch" path="/unified/webhook/{id}" -->
1131
- ```typescript
1132
- import { UnifiedTo } from "@unified-api/typescript-sdk";
1133
-
1134
- const unifiedTo = new UnifiedTo({
1135
- security: {
1136
- jwt: "<YOUR_API_KEY_HERE>",
1137
- },
1138
- });
1139
-
1140
- async function run() {
1141
- const result = await unifiedTo.unified.patchUnifiedWebhook({
1142
- webhook: {
1143
- connectionId: "<id>",
1144
- event: "updated",
1145
- objectType: "ticketing_customer",
1146
- },
1147
- id: "<id>",
1148
- });
1149
-
1150
- console.log(result);
1151
- }
1152
-
1153
- run();
1154
- ```
1155
-
1156
- ### Standalone function
1157
-
1158
- The standalone function version of this method:
1159
-
1160
- ```typescript
1161
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
1162
- import { unifiedPatchUnifiedWebhook } from "@unified-api/typescript-sdk/funcs/unifiedPatchUnifiedWebhook.js";
1163
-
1164
- // Use `UnifiedToCore` for best tree-shaking performance.
1165
- // You can create one instance of it to use across an application.
1166
- const unifiedTo = new UnifiedToCore({
1167
- security: {
1168
- jwt: "<YOUR_API_KEY_HERE>",
1169
- },
1170
- });
1171
-
1172
- async function run() {
1173
- const res = await unifiedPatchUnifiedWebhook(unifiedTo, {
1174
- webhook: {
1175
- connectionId: "<id>",
1176
- event: "updated",
1177
- objectType: "ticketing_customer",
1178
- },
1179
- id: "<id>",
1180
- });
1181
- if (res.ok) {
1182
- const { value: result } = res;
1183
- console.log(result);
1184
- } else {
1185
- console.log("unifiedPatchUnifiedWebhook failed:", res.error);
1186
- }
1187
- }
1188
-
1189
- run();
1190
- ```
1191
-
1192
- ### Parameters
1193
-
1194
- | Parameter | Type | Required | Description |
1195
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1196
- | `request` | [operations.PatchUnifiedWebhookRequest](../../sdk/models/operations/patchunifiedwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1197
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1198
- | `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. |
1199
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1200
-
1201
- ### Response
1202
-
1203
- **Promise\<[shared.Webhook](../../sdk/models/shared/webhook.md)\>**
1204
-
1205
- ### Errors
1206
-
1207
- | Error Type | Status Code | Content Type |
1208
- | --------------- | --------------- | --------------- |
1209
- | errors.SDKError | 4XX, 5XX | \*/\* |
1210
-
1211
- ## patchUnifiedWebhookTrigger
1212
-
1213
- Trigger webhook
1214
-
1215
- ### Example Usage
1216
-
1217
- <!-- UsageSnippet language="typescript" operationID="patchUnifiedWebhookTrigger" method="patch" path="/unified/webhook/{id}/trigger" -->
1218
- ```typescript
1219
- import { UnifiedTo } from "@unified-api/typescript-sdk";
1220
-
1221
- const unifiedTo = new UnifiedTo({
1222
- security: {
1223
- jwt: "<YOUR_API_KEY_HERE>",
1224
- },
1225
- });
1226
-
1227
- async function run() {
1228
- const result = await unifiedTo.unified.patchUnifiedWebhookTrigger({
1229
- id: "<id>",
1230
- });
1231
-
1232
- console.log(result);
1233
- }
1234
-
1235
- run();
1236
- ```
1237
-
1238
- ### Standalone function
1239
-
1240
- The standalone function version of this method:
1241
-
1242
- ```typescript
1243
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
1244
- import { unifiedPatchUnifiedWebhookTrigger } from "@unified-api/typescript-sdk/funcs/unifiedPatchUnifiedWebhookTrigger.js";
1245
-
1246
- // Use `UnifiedToCore` for best tree-shaking performance.
1247
- // You can create one instance of it to use across an application.
1248
- const unifiedTo = new UnifiedToCore({
1249
- security: {
1250
- jwt: "<YOUR_API_KEY_HERE>",
1251
- },
1252
- });
1253
-
1254
- async function run() {
1255
- const res = await unifiedPatchUnifiedWebhookTrigger(unifiedTo, {
1256
- id: "<id>",
1257
- });
1258
- if (res.ok) {
1259
- const { value: result } = res;
1260
- console.log(result);
1261
- } else {
1262
- console.log("unifiedPatchUnifiedWebhookTrigger failed:", res.error);
1263
- }
1264
- }
1265
-
1266
- run();
1267
- ```
1268
-
1269
- ### Parameters
1270
-
1271
- | Parameter | Type | Required | Description |
1272
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1273
- | `request` | [operations.PatchUnifiedWebhookTriggerRequest](../../sdk/models/operations/patchunifiedwebhooktriggerrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1274
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1275
- | `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. |
1276
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1277
-
1278
- ### Response
1279
-
1280
- **Promise\<[operations.PatchUnifiedWebhookTriggerResponse](../../sdk/models/operations/patchunifiedwebhooktriggerresponse.md)\>**
1281
-
1282
- ### Errors
1283
-
1284
- | Error Type | Status Code | Content Type |
1285
- | --------------- | --------------- | --------------- |
1286
- | errors.SDKError | 4XX, 5XX | \*/\* |
1287
-
1288
- ## removeUnifiedConnection
1289
-
1290
- Remove connection
1291
-
1292
- ### Example Usage
1293
-
1294
- <!-- UsageSnippet language="typescript" operationID="removeUnifiedConnection" method="delete" path="/unified/connection/{id}" -->
1295
- ```typescript
1296
- import { UnifiedTo } from "@unified-api/typescript-sdk";
1297
-
1298
- const unifiedTo = new UnifiedTo({
1299
- security: {
1300
- jwt: "<YOUR_API_KEY_HERE>",
1301
- },
1302
- });
1303
-
1304
- async function run() {
1305
- const result = await unifiedTo.unified.removeUnifiedConnection({
1306
- id: "<id>",
1307
- });
1308
-
1309
- console.log(result);
1310
- }
1311
-
1312
- run();
1313
- ```
1314
-
1315
- ### Standalone function
1316
-
1317
- The standalone function version of this method:
1318
-
1319
- ```typescript
1320
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
1321
- import { unifiedRemoveUnifiedConnection } from "@unified-api/typescript-sdk/funcs/unifiedRemoveUnifiedConnection.js";
1322
-
1323
- // Use `UnifiedToCore` for best tree-shaking performance.
1324
- // You can create one instance of it to use across an application.
1325
- const unifiedTo = new UnifiedToCore({
1326
- security: {
1327
- jwt: "<YOUR_API_KEY_HERE>",
1328
- },
1329
- });
1330
-
1331
- async function run() {
1332
- const res = await unifiedRemoveUnifiedConnection(unifiedTo, {
1333
- id: "<id>",
1334
- });
1335
- if (res.ok) {
1336
- const { value: result } = res;
1337
- console.log(result);
1338
- } else {
1339
- console.log("unifiedRemoveUnifiedConnection failed:", res.error);
1340
- }
1341
- }
1342
-
1343
- run();
1344
- ```
1345
-
1346
- ### Parameters
1347
-
1348
- | Parameter | Type | Required | Description |
1349
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1350
- | `request` | [operations.RemoveUnifiedConnectionRequest](../../sdk/models/operations/removeunifiedconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1351
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1352
- | `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. |
1353
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1354
-
1355
- ### Response
1356
-
1357
- **Promise\<[operations.RemoveUnifiedConnectionResponse](../../sdk/models/operations/removeunifiedconnectionresponse.md)\>**
1358
-
1359
- ### Errors
1360
-
1361
- | Error Type | Status Code | Content Type |
1362
- | --------------- | --------------- | --------------- |
1363
- | errors.SDKError | 4XX, 5XX | \*/\* |
1364
-
1365
- ## removeUnifiedWebhook
1366
-
1367
- Remove webhook subscription
1368
-
1369
- ### Example Usage
1370
-
1371
- <!-- UsageSnippet language="typescript" operationID="removeUnifiedWebhook" method="delete" path="/unified/webhook/{id}" -->
1372
- ```typescript
1373
- import { UnifiedTo } from "@unified-api/typescript-sdk";
1374
-
1375
- const unifiedTo = new UnifiedTo({
1376
- security: {
1377
- jwt: "<YOUR_API_KEY_HERE>",
1378
- },
1379
- });
1380
-
1381
- async function run() {
1382
- const result = await unifiedTo.unified.removeUnifiedWebhook({
1383
- id: "<id>",
1384
- });
1385
-
1386
- console.log(result);
1387
- }
1388
-
1389
- run();
1390
- ```
1391
-
1392
- ### Standalone function
1393
-
1394
- The standalone function version of this method:
1395
-
1396
- ```typescript
1397
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
1398
- import { unifiedRemoveUnifiedWebhook } from "@unified-api/typescript-sdk/funcs/unifiedRemoveUnifiedWebhook.js";
1399
-
1400
- // Use `UnifiedToCore` for best tree-shaking performance.
1401
- // You can create one instance of it to use across an application.
1402
- const unifiedTo = new UnifiedToCore({
1403
- security: {
1404
- jwt: "<YOUR_API_KEY_HERE>",
1405
- },
1406
- });
1407
-
1408
- async function run() {
1409
- const res = await unifiedRemoveUnifiedWebhook(unifiedTo, {
1410
- id: "<id>",
1411
- });
1412
- if (res.ok) {
1413
- const { value: result } = res;
1414
- console.log(result);
1415
- } else {
1416
- console.log("unifiedRemoveUnifiedWebhook failed:", res.error);
1417
- }
1418
- }
1419
-
1420
- run();
1421
- ```
1422
-
1423
- ### Parameters
1424
-
1425
- | Parameter | Type | Required | Description |
1426
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1427
- | `request` | [operations.RemoveUnifiedWebhookRequest](../../sdk/models/operations/removeunifiedwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1428
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1429
- | `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. |
1430
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1431
-
1432
- ### Response
1433
-
1434
- **Promise\<[operations.RemoveUnifiedWebhookResponse](../../sdk/models/operations/removeunifiedwebhookresponse.md)\>**
1435
-
1436
- ### Errors
1437
-
1438
- | Error Type | Status Code | Content Type |
1439
- | --------------- | --------------- | --------------- |
1440
- | errors.SDKError | 4XX, 5XX | \*/\* |
1441
-
1442
- ## updateUnifiedConnection
1443
-
1444
- Update connection
1445
-
1446
- ### Example Usage
1447
-
1448
- <!-- UsageSnippet language="typescript" operationID="updateUnifiedConnection" method="put" path="/unified/connection/{id}" -->
1449
- ```typescript
1450
- import { UnifiedTo } from "@unified-api/typescript-sdk";
1451
-
1452
- const unifiedTo = new UnifiedTo({
1453
- security: {
1454
- jwt: "<YOUR_API_KEY_HERE>",
1455
- },
1456
- });
1457
-
1458
- async function run() {
1459
- const result = await unifiedTo.unified.updateUnifiedConnection({
1460
- connection: {
1461
- categories: [],
1462
- integrationType: "<value>",
1463
- permissions: [
1464
- "commerce_review_read",
1465
- "calendar_calendar_read",
1466
- ],
1467
- },
1468
- id: "<id>",
1469
- });
1470
-
1471
- console.log(result);
1472
- }
1473
-
1474
- run();
1475
- ```
1476
-
1477
- ### Standalone function
1478
-
1479
- The standalone function version of this method:
1480
-
1481
- ```typescript
1482
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
1483
- import { unifiedUpdateUnifiedConnection } from "@unified-api/typescript-sdk/funcs/unifiedUpdateUnifiedConnection.js";
1484
-
1485
- // Use `UnifiedToCore` for best tree-shaking performance.
1486
- // You can create one instance of it to use across an application.
1487
- const unifiedTo = new UnifiedToCore({
1488
- security: {
1489
- jwt: "<YOUR_API_KEY_HERE>",
1490
- },
1491
- });
1492
-
1493
- async function run() {
1494
- const res = await unifiedUpdateUnifiedConnection(unifiedTo, {
1495
- connection: {
1496
- categories: [],
1497
- integrationType: "<value>",
1498
- permissions: [
1499
- "commerce_review_read",
1500
- "calendar_calendar_read",
1501
- ],
1502
- },
1503
- id: "<id>",
1504
- });
1505
- if (res.ok) {
1506
- const { value: result } = res;
1507
- console.log(result);
1508
- } else {
1509
- console.log("unifiedUpdateUnifiedConnection failed:", res.error);
1510
- }
1511
- }
1512
-
1513
- run();
1514
- ```
1515
-
1516
- ### Parameters
1517
-
1518
- | Parameter | Type | Required | Description |
1519
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1520
- | `request` | [operations.UpdateUnifiedConnectionRequest](../../sdk/models/operations/updateunifiedconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1521
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1522
- | `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. |
1523
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1524
-
1525
- ### Response
1526
-
1527
- **Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>**
1528
-
1529
- ### Errors
1530
-
1531
- | Error Type | Status Code | Content Type |
1532
- | --------------- | --------------- | --------------- |
1533
- | errors.SDKError | 4XX, 5XX | \*/\* |
1534
-
1535
- ## updateUnifiedWebhook
1536
-
1537
- Update webhook subscription
1538
-
1539
- ### Example Usage
1540
-
1541
- <!-- UsageSnippet language="typescript" operationID="updateUnifiedWebhook" method="put" path="/unified/webhook/{id}" -->
1542
- ```typescript
1543
- import { UnifiedTo } from "@unified-api/typescript-sdk";
1544
-
1545
- const unifiedTo = new UnifiedTo({
1546
- security: {
1547
- jwt: "<YOUR_API_KEY_HERE>",
1548
- },
1549
- });
1550
-
1551
- async function run() {
1552
- const result = await unifiedTo.unified.updateUnifiedWebhook({
1553
- webhook: {
1554
- connectionId: "<id>",
1555
- event: "deleted",
1556
- objectType: "messaging_channel",
1557
- },
1558
- id: "<id>",
1559
- });
1560
-
1561
- console.log(result);
1562
- }
1563
-
1564
- run();
1565
- ```
1566
-
1567
- ### Standalone function
1568
-
1569
- The standalone function version of this method:
1570
-
1571
- ```typescript
1572
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
1573
- import { unifiedUpdateUnifiedWebhook } from "@unified-api/typescript-sdk/funcs/unifiedUpdateUnifiedWebhook.js";
1574
-
1575
- // Use `UnifiedToCore` for best tree-shaking performance.
1576
- // You can create one instance of it to use across an application.
1577
- const unifiedTo = new UnifiedToCore({
1578
- security: {
1579
- jwt: "<YOUR_API_KEY_HERE>",
1580
- },
1581
- });
1582
-
1583
- async function run() {
1584
- const res = await unifiedUpdateUnifiedWebhook(unifiedTo, {
1585
- webhook: {
1586
- connectionId: "<id>",
1587
- event: "deleted",
1588
- objectType: "messaging_channel",
1589
- },
1590
- id: "<id>",
1591
- });
1592
- if (res.ok) {
1593
- const { value: result } = res;
1594
- console.log(result);
1595
- } else {
1596
- console.log("unifiedUpdateUnifiedWebhook failed:", res.error);
1597
- }
1598
- }
1599
-
1600
- run();
1601
- ```
1602
-
1603
- ### Parameters
1604
-
1605
- | Parameter | Type | Required | Description |
1606
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1607
- | `request` | [operations.UpdateUnifiedWebhookRequest](../../sdk/models/operations/updateunifiedwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1608
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1609
- | `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. |
1610
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1611
-
1612
- ### Response
1613
-
1614
- **Promise\<[shared.Webhook](../../sdk/models/shared/webhook.md)\>**
1615
-
1616
- ### Errors
1617
-
1618
- | Error Type | Status Code | Content Type |
1619
- | --------------- | --------------- | --------------- |
1620
- | errors.SDKError | 4XX, 5XX | \*/\* |
1621
-
1622
- ## updateUnifiedWebhookTrigger
1623
-
1624
- Trigger webhook
1625
-
1626
- ### Example Usage
1627
-
1628
- <!-- UsageSnippet language="typescript" operationID="updateUnifiedWebhookTrigger" method="put" path="/unified/webhook/{id}/trigger" -->
1629
- ```typescript
1630
- import { UnifiedTo } from "@unified-api/typescript-sdk";
1631
-
1632
- const unifiedTo = new UnifiedTo({
1633
- security: {
1634
- jwt: "<YOUR_API_KEY_HERE>",
1635
- },
1636
- });
1637
-
1638
- async function run() {
1639
- const result = await unifiedTo.unified.updateUnifiedWebhookTrigger({
1640
- id: "<id>",
1641
- });
1642
-
1643
- console.log(result);
1644
- }
1645
-
1646
- run();
1647
- ```
1648
-
1649
- ### Standalone function
1650
-
1651
- The standalone function version of this method:
1652
-
1653
- ```typescript
1654
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
1655
- import { unifiedUpdateUnifiedWebhookTrigger } from "@unified-api/typescript-sdk/funcs/unifiedUpdateUnifiedWebhookTrigger.js";
1656
-
1657
- // Use `UnifiedToCore` for best tree-shaking performance.
1658
- // You can create one instance of it to use across an application.
1659
- const unifiedTo = new UnifiedToCore({
1660
- security: {
1661
- jwt: "<YOUR_API_KEY_HERE>",
1662
- },
1663
- });
1664
-
1665
- async function run() {
1666
- const res = await unifiedUpdateUnifiedWebhookTrigger(unifiedTo, {
1667
- id: "<id>",
1668
- });
1669
- if (res.ok) {
1670
- const { value: result } = res;
1671
- console.log(result);
1672
- } else {
1673
- console.log("unifiedUpdateUnifiedWebhookTrigger failed:", res.error);
1674
- }
1675
- }
1676
-
1677
- run();
1678
- ```
1679
-
1680
- ### Parameters
1681
-
1682
- | Parameter | Type | Required | Description |
1683
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1684
- | `request` | [operations.UpdateUnifiedWebhookTriggerRequest](../../sdk/models/operations/updateunifiedwebhooktriggerrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1685
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1686
- | `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. |
1687
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1688
-
1689
- ### Response
1690
-
1691
- **Promise\<[operations.UpdateUnifiedWebhookTriggerResponse](../../sdk/models/operations/updateunifiedwebhooktriggerresponse.md)\>**
1692
-
1693
- ### Errors
1694
-
1695
- | Error Type | Status Code | Content Type |
1696
- | --------------- | --------------- | --------------- |
1697
- | errors.SDKError | 4XX, 5XX | \*/\* |