@unified-api/typescript-sdk 2.80.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 (120) 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/kmspage.d.ts +2 -0
  7. package/sdk/models/shared/kmspage.d.ts.map +1 -1
  8. package/sdk/models/shared/kmspage.js +4 -0
  9. package/sdk/models/shared/kmspage.js.map +1 -1
  10. package/src/lib/config.ts +3 -3
  11. package/src/sdk/models/shared/kmspage.ts +6 -0
  12. package/docs/sdks/account/README.md +0 -489
  13. package/docs/sdks/accounting/README.md +0 -7221
  14. package/docs/sdks/activity/README.md +0 -489
  15. package/docs/sdks/apicall/README.md +0 -159
  16. package/docs/sdks/application/README.md +0 -489
  17. package/docs/sdks/applicationstatus/README.md +0 -85
  18. package/docs/sdks/ats/README.md +0 -3953
  19. package/docs/sdks/auth/README.md +0 -167
  20. package/docs/sdks/balancesheet/README.md +0 -165
  21. package/docs/sdks/bill/README.md +0 -489
  22. package/docs/sdks/branch/README.md +0 -507
  23. package/docs/sdks/busy/README.md +0 -85
  24. package/docs/sdks/calendar/README.md +0 -1713
  25. package/docs/sdks/call/README.md +0 -85
  26. package/docs/sdks/candidate/README.md +0 -489
  27. package/docs/sdks/cashflow/README.md +0 -165
  28. package/docs/sdks/category/README.md +0 -971
  29. package/docs/sdks/change/README.md +0 -165
  30. package/docs/sdks/channel/README.md +0 -165
  31. package/docs/sdks/class/README.md +0 -507
  32. package/docs/sdks/collection/README.md +0 -501
  33. package/docs/sdks/comment/README.md +0 -1495
  34. package/docs/sdks/commerce/README.md +0 -2465
  35. package/docs/sdks/commit/README.md +0 -501
  36. package/docs/sdks/company/README.md +0 -1543
  37. package/docs/sdks/connection/README.md +0 -513
  38. package/docs/sdks/contact/README.md +0 -1453
  39. package/docs/sdks/course/README.md +0 -501
  40. package/docs/sdks/creditmemo/README.md +0 -489
  41. package/docs/sdks/crm/README.md +0 -2899
  42. package/docs/sdks/customer/README.md +0 -489
  43. package/docs/sdks/deal/README.md +0 -489
  44. package/docs/sdks/device/README.md +0 -501
  45. package/docs/sdks/document/README.md +0 -489
  46. package/docs/sdks/embedding/README.md +0 -87
  47. package/docs/sdks/employee/README.md +0 -489
  48. package/docs/sdks/enrich/README.md +0 -163
  49. package/docs/sdks/event/README.md +0 -971
  50. package/docs/sdks/expense/README.md +0 -489
  51. package/docs/sdks/file/README.md +0 -489
  52. package/docs/sdks/genai/README.md +0 -325
  53. package/docs/sdks/group/README.md +0 -983
  54. package/docs/sdks/hris/README.md +0 -3251
  55. package/docs/sdks/instructor/README.md +0 -489
  56. package/docs/sdks/integration/README.md +0 -239
  57. package/docs/sdks/interview/README.md +0 -489
  58. package/docs/sdks/inventory/README.md +0 -501
  59. package/docs/sdks/invoice/README.md +0 -489
  60. package/docs/sdks/issue/README.md +0 -159
  61. package/docs/sdks/item/README.md +0 -489
  62. package/docs/sdks/job/README.md +0 -489
  63. package/docs/sdks/journal/README.md +0 -489
  64. package/docs/sdks/kms/README.md +0 -1495
  65. package/docs/sdks/lead/README.md +0 -489
  66. package/docs/sdks/link/README.md +0 -983
  67. package/docs/sdks/list/README.md +0 -489
  68. package/docs/sdks/lms/README.md +0 -1965
  69. package/docs/sdks/location/README.md +0 -983
  70. package/docs/sdks/login/README.md +0 -87
  71. package/docs/sdks/martech/README.md +0 -971
  72. package/docs/sdks/member/README.md +0 -489
  73. package/docs/sdks/message/README.md +0 -489
  74. package/docs/sdks/messaging/README.md +0 -647
  75. package/docs/sdks/metadata/README.md +0 -507
  76. package/docs/sdks/model/README.md +0 -165
  77. package/docs/sdks/note/README.md +0 -489
  78. package/docs/sdks/order/README.md +0 -489
  79. package/docs/sdks/organization/README.md +0 -647
  80. package/docs/sdks/package/README.md +0 -165
  81. package/docs/sdks/page/README.md +0 -507
  82. package/docs/sdks/passthrough/README.md +0 -647
  83. package/docs/sdks/payment/README.md +0 -1769
  84. package/docs/sdks/payout/README.md +0 -165
  85. package/docs/sdks/payslip/README.md +0 -165
  86. package/docs/sdks/person/README.md +0 -85
  87. package/docs/sdks/pipeline/README.md +0 -489
  88. package/docs/sdks/profitloss/README.md +0 -165
  89. package/docs/sdks/project/README.md +0 -489
  90. package/docs/sdks/prompt/README.md +0 -87
  91. package/docs/sdks/pullrequest/README.md +0 -489
  92. package/docs/sdks/purchaseorder/README.md +0 -489
  93. package/docs/sdks/recording/README.md +0 -647
  94. package/docs/sdks/refund/README.md +0 -165
  95. package/docs/sdks/repo/README.md +0 -2459
  96. package/docs/sdks/report/README.md +0 -165
  97. package/docs/sdks/repository/README.md +0 -501
  98. package/docs/sdks/request/README.md +0 -489
  99. package/docs/sdks/review/README.md +0 -501
  100. package/docs/sdks/salesorder/README.md +0 -489
  101. package/docs/sdks/scim/README.md +0 -983
  102. package/docs/sdks/scorecard/README.md +0 -489
  103. package/docs/sdks/space/README.md +0 -501
  104. package/docs/sdks/storage/README.md +0 -489
  105. package/docs/sdks/student/README.md +0 -489
  106. package/docs/sdks/subscription/README.md +0 -489
  107. package/docs/sdks/task/README.md +0 -1629
  108. package/docs/sdks/taxrate/README.md +0 -489
  109. package/docs/sdks/ticket/README.md +0 -489
  110. package/docs/sdks/ticketing/README.md +0 -1935
  111. package/docs/sdks/timeoff/README.md +0 -165
  112. package/docs/sdks/timeshift/README.md +0 -513
  113. package/docs/sdks/transaction/README.md +0 -489
  114. package/docs/sdks/trialbalance/README.md +0 -165
  115. package/docs/sdks/uc/README.md +0 -1543
  116. package/docs/sdks/unified/README.md +0 -1697
  117. package/docs/sdks/user/README.md +0 -489
  118. package/docs/sdks/verification/README.md +0 -647
  119. package/docs/sdks/webhook/README.md +0 -655
  120. package/examples/README.md +0 -31
@@ -1,655 +0,0 @@
1
- # Webhook
2
- (*webhook*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [createUnifiedWebhook](#createunifiedwebhook) - Create webhook subscription
9
- * [getUnifiedWebhook](#getunifiedwebhook) - Retrieve webhook by its ID
10
- * [listUnifiedWebhooks](#listunifiedwebhooks) - Returns all registered webhooks
11
- * [patchUnifiedWebhook](#patchunifiedwebhook) - Update webhook subscription
12
- * [patchUnifiedWebhookTrigger](#patchunifiedwebhooktrigger) - Trigger webhook
13
- * [removeUnifiedWebhook](#removeunifiedwebhook) - Remove webhook subscription
14
- * [updateUnifiedWebhook](#updateunifiedwebhook) - Update webhook subscription
15
- * [updateUnifiedWebhookTrigger](#updateunifiedwebhooktrigger) - Trigger webhook
16
-
17
- ## createUnifiedWebhook
18
-
19
- 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.
20
-
21
- ### Example Usage
22
-
23
- <!-- UsageSnippet language="typescript" operationID="createUnifiedWebhook" method="post" path="/unified/webhook" -->
24
- ```typescript
25
- import { UnifiedTo } from "@unified-api/typescript-sdk";
26
-
27
- const unifiedTo = new UnifiedTo({
28
- security: {
29
- jwt: "<YOUR_API_KEY_HERE>",
30
- },
31
- });
32
-
33
- async function run() {
34
- const result = await unifiedTo.webhook.createUnifiedWebhook({
35
- webhook: {
36
- connectionId: "<id>",
37
- event: "created",
38
- objectType: "ats_scorecard",
39
- },
40
- });
41
-
42
- console.log(result);
43
- }
44
-
45
- run();
46
- ```
47
-
48
- ### Standalone function
49
-
50
- The standalone function version of this method:
51
-
52
- ```typescript
53
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
54
- import { unifiedCreateUnifiedWebhook } from "@unified-api/typescript-sdk/funcs/unifiedCreateUnifiedWebhook.js";
55
-
56
- // Use `UnifiedToCore` for best tree-shaking performance.
57
- // You can create one instance of it to use across an application.
58
- const unifiedTo = new UnifiedToCore({
59
- security: {
60
- jwt: "<YOUR_API_KEY_HERE>",
61
- },
62
- });
63
-
64
- async function run() {
65
- const res = await unifiedCreateUnifiedWebhook(unifiedTo, {
66
- webhook: {
67
- connectionId: "<id>",
68
- event: "created",
69
- objectType: "ats_scorecard",
70
- },
71
- });
72
- if (res.ok) {
73
- const { value: result } = res;
74
- console.log(result);
75
- } else {
76
- console.log("unifiedCreateUnifiedWebhook failed:", res.error);
77
- }
78
- }
79
-
80
- run();
81
- ```
82
-
83
- ### Parameters
84
-
85
- | Parameter | Type | Required | Description |
86
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
87
- | `request` | [operations.CreateUnifiedWebhookRequest](../../sdk/models/operations/createunifiedwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. |
88
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
89
- | `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. |
90
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
91
-
92
- ### Response
93
-
94
- **Promise\<[shared.Webhook](../../sdk/models/shared/webhook.md)\>**
95
-
96
- ### Errors
97
-
98
- | Error Type | Status Code | Content Type |
99
- | --------------- | --------------- | --------------- |
100
- | errors.SDKError | 4XX, 5XX | \*/\* |
101
-
102
- ## getUnifiedWebhook
103
-
104
- Retrieve webhook by its ID
105
-
106
- ### Example Usage
107
-
108
- <!-- UsageSnippet language="typescript" operationID="getUnifiedWebhook" method="get" path="/unified/webhook/{id}" -->
109
- ```typescript
110
- import { UnifiedTo } from "@unified-api/typescript-sdk";
111
-
112
- const unifiedTo = new UnifiedTo({
113
- security: {
114
- jwt: "<YOUR_API_KEY_HERE>",
115
- },
116
- });
117
-
118
- async function run() {
119
- const result = await unifiedTo.webhook.getUnifiedWebhook({
120
- id: "<id>",
121
- });
122
-
123
- console.log(result);
124
- }
125
-
126
- run();
127
- ```
128
-
129
- ### Standalone function
130
-
131
- The standalone function version of this method:
132
-
133
- ```typescript
134
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
135
- import { unifiedGetUnifiedWebhook } from "@unified-api/typescript-sdk/funcs/unifiedGetUnifiedWebhook.js";
136
-
137
- // Use `UnifiedToCore` for best tree-shaking performance.
138
- // You can create one instance of it to use across an application.
139
- const unifiedTo = new UnifiedToCore({
140
- security: {
141
- jwt: "<YOUR_API_KEY_HERE>",
142
- },
143
- });
144
-
145
- async function run() {
146
- const res = await unifiedGetUnifiedWebhook(unifiedTo, {
147
- id: "<id>",
148
- });
149
- if (res.ok) {
150
- const { value: result } = res;
151
- console.log(result);
152
- } else {
153
- console.log("unifiedGetUnifiedWebhook failed:", res.error);
154
- }
155
- }
156
-
157
- run();
158
- ```
159
-
160
- ### Parameters
161
-
162
- | Parameter | Type | Required | Description |
163
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
164
- | `request` | [operations.GetUnifiedWebhookRequest](../../sdk/models/operations/getunifiedwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. |
165
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
166
- | `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. |
167
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
168
-
169
- ### Response
170
-
171
- **Promise\<[shared.Webhook](../../sdk/models/shared/webhook.md)\>**
172
-
173
- ### Errors
174
-
175
- | Error Type | Status Code | Content Type |
176
- | --------------- | --------------- | --------------- |
177
- | errors.SDKError | 4XX, 5XX | \*/\* |
178
-
179
- ## listUnifiedWebhooks
180
-
181
- Returns all registered webhooks
182
-
183
- ### Example Usage
184
-
185
- <!-- UsageSnippet language="typescript" operationID="listUnifiedWebhooks" method="get" path="/unified/webhook" -->
186
- ```typescript
187
- import { UnifiedTo } from "@unified-api/typescript-sdk";
188
-
189
- const unifiedTo = new UnifiedTo({
190
- security: {
191
- jwt: "<YOUR_API_KEY_HERE>",
192
- },
193
- });
194
-
195
- async function run() {
196
- const result = await unifiedTo.webhook.listUnifiedWebhooks({});
197
-
198
- console.log(result);
199
- }
200
-
201
- run();
202
- ```
203
-
204
- ### Standalone function
205
-
206
- The standalone function version of this method:
207
-
208
- ```typescript
209
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
210
- import { unifiedListUnifiedWebhooks } from "@unified-api/typescript-sdk/funcs/unifiedListUnifiedWebhooks.js";
211
-
212
- // Use `UnifiedToCore` for best tree-shaking performance.
213
- // You can create one instance of it to use across an application.
214
- const unifiedTo = new UnifiedToCore({
215
- security: {
216
- jwt: "<YOUR_API_KEY_HERE>",
217
- },
218
- });
219
-
220
- async function run() {
221
- const res = await unifiedListUnifiedWebhooks(unifiedTo, {});
222
- if (res.ok) {
223
- const { value: result } = res;
224
- console.log(result);
225
- } else {
226
- console.log("unifiedListUnifiedWebhooks failed:", res.error);
227
- }
228
- }
229
-
230
- run();
231
- ```
232
-
233
- ### Parameters
234
-
235
- | Parameter | Type | Required | Description |
236
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
237
- | `request` | [operations.ListUnifiedWebhooksRequest](../../sdk/models/operations/listunifiedwebhooksrequest.md) | :heavy_check_mark: | The request object to use for the request. |
238
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
239
- | `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. |
240
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
241
-
242
- ### Response
243
-
244
- **Promise\<[shared.Webhook[]](../../models/.md)\>**
245
-
246
- ### Errors
247
-
248
- | Error Type | Status Code | Content Type |
249
- | --------------- | --------------- | --------------- |
250
- | errors.SDKError | 4XX, 5XX | \*/\* |
251
-
252
- ## patchUnifiedWebhook
253
-
254
- Update webhook subscription
255
-
256
- ### Example Usage
257
-
258
- <!-- UsageSnippet language="typescript" operationID="patchUnifiedWebhook" method="patch" path="/unified/webhook/{id}" -->
259
- ```typescript
260
- import { UnifiedTo } from "@unified-api/typescript-sdk";
261
-
262
- const unifiedTo = new UnifiedTo({
263
- security: {
264
- jwt: "<YOUR_API_KEY_HERE>",
265
- },
266
- });
267
-
268
- async function run() {
269
- const result = await unifiedTo.webhook.patchUnifiedWebhook({
270
- webhook: {
271
- connectionId: "<id>",
272
- event: "updated",
273
- objectType: "ticketing_customer",
274
- },
275
- id: "<id>",
276
- });
277
-
278
- console.log(result);
279
- }
280
-
281
- run();
282
- ```
283
-
284
- ### Standalone function
285
-
286
- The standalone function version of this method:
287
-
288
- ```typescript
289
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
290
- import { unifiedPatchUnifiedWebhook } from "@unified-api/typescript-sdk/funcs/unifiedPatchUnifiedWebhook.js";
291
-
292
- // Use `UnifiedToCore` for best tree-shaking performance.
293
- // You can create one instance of it to use across an application.
294
- const unifiedTo = new UnifiedToCore({
295
- security: {
296
- jwt: "<YOUR_API_KEY_HERE>",
297
- },
298
- });
299
-
300
- async function run() {
301
- const res = await unifiedPatchUnifiedWebhook(unifiedTo, {
302
- webhook: {
303
- connectionId: "<id>",
304
- event: "updated",
305
- objectType: "ticketing_customer",
306
- },
307
- id: "<id>",
308
- });
309
- if (res.ok) {
310
- const { value: result } = res;
311
- console.log(result);
312
- } else {
313
- console.log("unifiedPatchUnifiedWebhook failed:", res.error);
314
- }
315
- }
316
-
317
- run();
318
- ```
319
-
320
- ### Parameters
321
-
322
- | Parameter | Type | Required | Description |
323
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
324
- | `request` | [operations.PatchUnifiedWebhookRequest](../../sdk/models/operations/patchunifiedwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. |
325
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
326
- | `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. |
327
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
328
-
329
- ### Response
330
-
331
- **Promise\<[shared.Webhook](../../sdk/models/shared/webhook.md)\>**
332
-
333
- ### Errors
334
-
335
- | Error Type | Status Code | Content Type |
336
- | --------------- | --------------- | --------------- |
337
- | errors.SDKError | 4XX, 5XX | \*/\* |
338
-
339
- ## patchUnifiedWebhookTrigger
340
-
341
- Trigger webhook
342
-
343
- ### Example Usage
344
-
345
- <!-- UsageSnippet language="typescript" operationID="patchUnifiedWebhookTrigger" method="patch" path="/unified/webhook/{id}/trigger" -->
346
- ```typescript
347
- import { UnifiedTo } from "@unified-api/typescript-sdk";
348
-
349
- const unifiedTo = new UnifiedTo({
350
- security: {
351
- jwt: "<YOUR_API_KEY_HERE>",
352
- },
353
- });
354
-
355
- async function run() {
356
- const result = await unifiedTo.webhook.patchUnifiedWebhookTrigger({
357
- id: "<id>",
358
- });
359
-
360
- console.log(result);
361
- }
362
-
363
- run();
364
- ```
365
-
366
- ### Standalone function
367
-
368
- The standalone function version of this method:
369
-
370
- ```typescript
371
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
372
- import { unifiedPatchUnifiedWebhookTrigger } from "@unified-api/typescript-sdk/funcs/unifiedPatchUnifiedWebhookTrigger.js";
373
-
374
- // Use `UnifiedToCore` for best tree-shaking performance.
375
- // You can create one instance of it to use across an application.
376
- const unifiedTo = new UnifiedToCore({
377
- security: {
378
- jwt: "<YOUR_API_KEY_HERE>",
379
- },
380
- });
381
-
382
- async function run() {
383
- const res = await unifiedPatchUnifiedWebhookTrigger(unifiedTo, {
384
- id: "<id>",
385
- });
386
- if (res.ok) {
387
- const { value: result } = res;
388
- console.log(result);
389
- } else {
390
- console.log("unifiedPatchUnifiedWebhookTrigger failed:", res.error);
391
- }
392
- }
393
-
394
- run();
395
- ```
396
-
397
- ### Parameters
398
-
399
- | Parameter | Type | Required | Description |
400
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
401
- | `request` | [operations.PatchUnifiedWebhookTriggerRequest](../../sdk/models/operations/patchunifiedwebhooktriggerrequest.md) | :heavy_check_mark: | The request object to use for the request. |
402
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
403
- | `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. |
404
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
405
-
406
- ### Response
407
-
408
- **Promise\<[operations.PatchUnifiedWebhookTriggerResponse](../../sdk/models/operations/patchunifiedwebhooktriggerresponse.md)\>**
409
-
410
- ### Errors
411
-
412
- | Error Type | Status Code | Content Type |
413
- | --------------- | --------------- | --------------- |
414
- | errors.SDKError | 4XX, 5XX | \*/\* |
415
-
416
- ## removeUnifiedWebhook
417
-
418
- Remove webhook subscription
419
-
420
- ### Example Usage
421
-
422
- <!-- UsageSnippet language="typescript" operationID="removeUnifiedWebhook" method="delete" path="/unified/webhook/{id}" -->
423
- ```typescript
424
- import { UnifiedTo } from "@unified-api/typescript-sdk";
425
-
426
- const unifiedTo = new UnifiedTo({
427
- security: {
428
- jwt: "<YOUR_API_KEY_HERE>",
429
- },
430
- });
431
-
432
- async function run() {
433
- const result = await unifiedTo.webhook.removeUnifiedWebhook({
434
- id: "<id>",
435
- });
436
-
437
- console.log(result);
438
- }
439
-
440
- run();
441
- ```
442
-
443
- ### Standalone function
444
-
445
- The standalone function version of this method:
446
-
447
- ```typescript
448
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
449
- import { unifiedRemoveUnifiedWebhook } from "@unified-api/typescript-sdk/funcs/unifiedRemoveUnifiedWebhook.js";
450
-
451
- // Use `UnifiedToCore` for best tree-shaking performance.
452
- // You can create one instance of it to use across an application.
453
- const unifiedTo = new UnifiedToCore({
454
- security: {
455
- jwt: "<YOUR_API_KEY_HERE>",
456
- },
457
- });
458
-
459
- async function run() {
460
- const res = await unifiedRemoveUnifiedWebhook(unifiedTo, {
461
- id: "<id>",
462
- });
463
- if (res.ok) {
464
- const { value: result } = res;
465
- console.log(result);
466
- } else {
467
- console.log("unifiedRemoveUnifiedWebhook failed:", res.error);
468
- }
469
- }
470
-
471
- run();
472
- ```
473
-
474
- ### Parameters
475
-
476
- | Parameter | Type | Required | Description |
477
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
478
- | `request` | [operations.RemoveUnifiedWebhookRequest](../../sdk/models/operations/removeunifiedwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. |
479
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
480
- | `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. |
481
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
482
-
483
- ### Response
484
-
485
- **Promise\<[operations.RemoveUnifiedWebhookResponse](../../sdk/models/operations/removeunifiedwebhookresponse.md)\>**
486
-
487
- ### Errors
488
-
489
- | Error Type | Status Code | Content Type |
490
- | --------------- | --------------- | --------------- |
491
- | errors.SDKError | 4XX, 5XX | \*/\* |
492
-
493
- ## updateUnifiedWebhook
494
-
495
- Update webhook subscription
496
-
497
- ### Example Usage
498
-
499
- <!-- UsageSnippet language="typescript" operationID="updateUnifiedWebhook" method="put" path="/unified/webhook/{id}" -->
500
- ```typescript
501
- import { UnifiedTo } from "@unified-api/typescript-sdk";
502
-
503
- const unifiedTo = new UnifiedTo({
504
- security: {
505
- jwt: "<YOUR_API_KEY_HERE>",
506
- },
507
- });
508
-
509
- async function run() {
510
- const result = await unifiedTo.webhook.updateUnifiedWebhook({
511
- webhook: {
512
- connectionId: "<id>",
513
- event: "deleted",
514
- objectType: "messaging_channel",
515
- },
516
- id: "<id>",
517
- });
518
-
519
- console.log(result);
520
- }
521
-
522
- run();
523
- ```
524
-
525
- ### Standalone function
526
-
527
- The standalone function version of this method:
528
-
529
- ```typescript
530
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
531
- import { unifiedUpdateUnifiedWebhook } from "@unified-api/typescript-sdk/funcs/unifiedUpdateUnifiedWebhook.js";
532
-
533
- // Use `UnifiedToCore` for best tree-shaking performance.
534
- // You can create one instance of it to use across an application.
535
- const unifiedTo = new UnifiedToCore({
536
- security: {
537
- jwt: "<YOUR_API_KEY_HERE>",
538
- },
539
- });
540
-
541
- async function run() {
542
- const res = await unifiedUpdateUnifiedWebhook(unifiedTo, {
543
- webhook: {
544
- connectionId: "<id>",
545
- event: "deleted",
546
- objectType: "messaging_channel",
547
- },
548
- id: "<id>",
549
- });
550
- if (res.ok) {
551
- const { value: result } = res;
552
- console.log(result);
553
- } else {
554
- console.log("unifiedUpdateUnifiedWebhook failed:", res.error);
555
- }
556
- }
557
-
558
- run();
559
- ```
560
-
561
- ### Parameters
562
-
563
- | Parameter | Type | Required | Description |
564
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
565
- | `request` | [operations.UpdateUnifiedWebhookRequest](../../sdk/models/operations/updateunifiedwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. |
566
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
567
- | `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. |
568
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
569
-
570
- ### Response
571
-
572
- **Promise\<[shared.Webhook](../../sdk/models/shared/webhook.md)\>**
573
-
574
- ### Errors
575
-
576
- | Error Type | Status Code | Content Type |
577
- | --------------- | --------------- | --------------- |
578
- | errors.SDKError | 4XX, 5XX | \*/\* |
579
-
580
- ## updateUnifiedWebhookTrigger
581
-
582
- Trigger webhook
583
-
584
- ### Example Usage
585
-
586
- <!-- UsageSnippet language="typescript" operationID="updateUnifiedWebhookTrigger" method="put" path="/unified/webhook/{id}/trigger" -->
587
- ```typescript
588
- import { UnifiedTo } from "@unified-api/typescript-sdk";
589
-
590
- const unifiedTo = new UnifiedTo({
591
- security: {
592
- jwt: "<YOUR_API_KEY_HERE>",
593
- },
594
- });
595
-
596
- async function run() {
597
- const result = await unifiedTo.webhook.updateUnifiedWebhookTrigger({
598
- id: "<id>",
599
- });
600
-
601
- console.log(result);
602
- }
603
-
604
- run();
605
- ```
606
-
607
- ### Standalone function
608
-
609
- The standalone function version of this method:
610
-
611
- ```typescript
612
- import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
613
- import { unifiedUpdateUnifiedWebhookTrigger } from "@unified-api/typescript-sdk/funcs/unifiedUpdateUnifiedWebhookTrigger.js";
614
-
615
- // Use `UnifiedToCore` for best tree-shaking performance.
616
- // You can create one instance of it to use across an application.
617
- const unifiedTo = new UnifiedToCore({
618
- security: {
619
- jwt: "<YOUR_API_KEY_HERE>",
620
- },
621
- });
622
-
623
- async function run() {
624
- const res = await unifiedUpdateUnifiedWebhookTrigger(unifiedTo, {
625
- id: "<id>",
626
- });
627
- if (res.ok) {
628
- const { value: result } = res;
629
- console.log(result);
630
- } else {
631
- console.log("unifiedUpdateUnifiedWebhookTrigger failed:", res.error);
632
- }
633
- }
634
-
635
- run();
636
- ```
637
-
638
- ### Parameters
639
-
640
- | Parameter | Type | Required | Description |
641
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
642
- | `request` | [operations.UpdateUnifiedWebhookTriggerRequest](../../sdk/models/operations/updateunifiedwebhooktriggerrequest.md) | :heavy_check_mark: | The request object to use for the request. |
643
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
644
- | `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. |
645
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
646
-
647
- ### Response
648
-
649
- **Promise\<[operations.UpdateUnifiedWebhookTriggerResponse](../../sdk/models/operations/updateunifiedwebhooktriggerresponse.md)\>**
650
-
651
- ### Errors
652
-
653
- | Error Type | Status Code | Content Type |
654
- | --------------- | --------------- | --------------- |
655
- | errors.SDKError | 4XX, 5XX | \*/\* |