@unified-api/typescript-sdk 2.86.4 → 2.86.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/FUNCTIONS.md +2 -2
  2. package/README.md +16 -12
  3. package/dist/commonjs/funcs/unifiedPatchUnifiedWebhookResume.d.ts +18 -0
  4. package/dist/commonjs/funcs/unifiedPatchUnifiedWebhookResume.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/unifiedPatchUnifiedWebhookResume.js +120 -0
  6. package/dist/commonjs/funcs/unifiedPatchUnifiedWebhookResume.js.map +1 -0
  7. package/dist/commonjs/funcs/unifiedUpdateUnifiedWebhookResume.d.ts +18 -0
  8. package/dist/commonjs/funcs/unifiedUpdateUnifiedWebhookResume.d.ts.map +1 -0
  9. package/dist/commonjs/funcs/unifiedUpdateUnifiedWebhookResume.js +120 -0
  10. package/dist/commonjs/funcs/unifiedUpdateUnifiedWebhookResume.js.map +1 -0
  11. package/dist/commonjs/lib/config.d.ts +2 -2
  12. package/dist/commonjs/lib/config.js +2 -2
  13. package/dist/commonjs/sdk/models/operations/index.d.ts +2 -0
  14. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  15. package/dist/commonjs/sdk/models/operations/index.js +2 -0
  16. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  17. package/dist/commonjs/sdk/models/operations/patchunifiedwebhookresume.d.ts +15 -0
  18. package/dist/commonjs/sdk/models/operations/patchunifiedwebhookresume.d.ts.map +1 -0
  19. package/dist/commonjs/sdk/models/operations/patchunifiedwebhookresume.js +49 -0
  20. package/dist/commonjs/sdk/models/operations/patchunifiedwebhookresume.js.map +1 -0
  21. package/dist/commonjs/sdk/models/operations/updateunifiedwebhookresume.d.ts +15 -0
  22. package/dist/commonjs/sdk/models/operations/updateunifiedwebhookresume.d.ts.map +1 -0
  23. package/dist/commonjs/sdk/models/operations/updateunifiedwebhookresume.js +49 -0
  24. package/dist/commonjs/sdk/models/operations/updateunifiedwebhookresume.js.map +1 -0
  25. package/dist/commonjs/sdk/models/shared/crmcontact.d.ts +7 -1
  26. package/dist/commonjs/sdk/models/shared/crmcontact.d.ts.map +1 -1
  27. package/dist/commonjs/sdk/models/shared/crmcontact.js.map +1 -1
  28. package/dist/commonjs/sdk/models/shared/enrichperson.d.ts +1 -1
  29. package/dist/commonjs/sdk/unified.d.ts +14 -0
  30. package/dist/commonjs/sdk/unified.d.ts.map +1 -1
  31. package/dist/commonjs/sdk/unified.js +20 -0
  32. package/dist/commonjs/sdk/unified.js.map +1 -1
  33. package/dist/commonjs/sdk/webhook.d.ts +14 -0
  34. package/dist/commonjs/sdk/webhook.d.ts.map +1 -1
  35. package/dist/commonjs/sdk/webhook.js +20 -0
  36. package/dist/commonjs/sdk/webhook.js.map +1 -1
  37. package/dist/esm/funcs/unifiedPatchUnifiedWebhookResume.d.ts +18 -0
  38. package/dist/esm/funcs/unifiedPatchUnifiedWebhookResume.d.ts.map +1 -0
  39. package/dist/esm/funcs/unifiedPatchUnifiedWebhookResume.js +84 -0
  40. package/dist/esm/funcs/unifiedPatchUnifiedWebhookResume.js.map +1 -0
  41. package/dist/esm/funcs/unifiedUpdateUnifiedWebhookResume.d.ts +18 -0
  42. package/dist/esm/funcs/unifiedUpdateUnifiedWebhookResume.d.ts.map +1 -0
  43. package/dist/esm/funcs/unifiedUpdateUnifiedWebhookResume.js +84 -0
  44. package/dist/esm/funcs/unifiedUpdateUnifiedWebhookResume.js.map +1 -0
  45. package/dist/esm/lib/config.d.ts +2 -2
  46. package/dist/esm/lib/config.js +2 -2
  47. package/dist/esm/sdk/models/operations/index.d.ts +2 -0
  48. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  49. package/dist/esm/sdk/models/operations/index.js +2 -0
  50. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  51. package/dist/esm/sdk/models/operations/patchunifiedwebhookresume.d.ts +15 -0
  52. package/dist/esm/sdk/models/operations/patchunifiedwebhookresume.d.ts.map +1 -0
  53. package/dist/esm/sdk/models/operations/patchunifiedwebhookresume.js +12 -0
  54. package/dist/esm/sdk/models/operations/patchunifiedwebhookresume.js.map +1 -0
  55. package/dist/esm/sdk/models/operations/updateunifiedwebhookresume.d.ts +15 -0
  56. package/dist/esm/sdk/models/operations/updateunifiedwebhookresume.d.ts.map +1 -0
  57. package/dist/esm/sdk/models/operations/updateunifiedwebhookresume.js +12 -0
  58. package/dist/esm/sdk/models/operations/updateunifiedwebhookresume.js.map +1 -0
  59. package/dist/esm/sdk/models/shared/crmcontact.d.ts +7 -1
  60. package/dist/esm/sdk/models/shared/crmcontact.d.ts.map +1 -1
  61. package/dist/esm/sdk/models/shared/crmcontact.js.map +1 -1
  62. package/dist/esm/sdk/models/shared/enrichperson.d.ts +1 -1
  63. package/dist/esm/sdk/unified.d.ts +14 -0
  64. package/dist/esm/sdk/unified.d.ts.map +1 -1
  65. package/dist/esm/sdk/unified.js +20 -0
  66. package/dist/esm/sdk/unified.js.map +1 -1
  67. package/dist/esm/sdk/webhook.d.ts +14 -0
  68. package/dist/esm/sdk/webhook.d.ts.map +1 -1
  69. package/dist/esm/sdk/webhook.js +20 -0
  70. package/dist/esm/sdk/webhook.js.map +1 -1
  71. package/examples/accountingCreateAccountingAccount.example.ts +2 -2
  72. package/jsr.json +1 -1
  73. package/package.json +1 -1
  74. package/src/funcs/unifiedPatchUnifiedWebhookResume.ts +168 -0
  75. package/src/funcs/unifiedUpdateUnifiedWebhookResume.ts +168 -0
  76. package/src/lib/config.ts +2 -2
  77. package/src/sdk/models/operations/index.ts +2 -0
  78. package/src/sdk/models/operations/patchunifiedwebhookresume.ts +36 -0
  79. package/src/sdk/models/operations/updateunifiedwebhookresume.ts +36 -0
  80. package/src/sdk/models/shared/crmcontact.ts +7 -1
  81. package/src/sdk/models/shared/enrichperson.ts +1 -1
  82. package/src/sdk/unified.ts +36 -0
  83. package/src/sdk/webhook.ts +36 -0
@@ -0,0 +1,168 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { UnifiedToCore } from "../core.js";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../sdk/models/errors/httpclienterrors.js";
21
+ import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
22
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
23
+ import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
24
+ import * as operations from "../sdk/models/operations/index.js";
25
+ import * as shared from "../sdk/models/shared/index.js";
26
+ import { APICall, APIPromise } from "../sdk/types/async.js";
27
+ import { Result } from "../sdk/types/fp.js";
28
+
29
+ /**
30
+ * Resume an unhealthy webhook subscription
31
+ *
32
+ * @remarks
33
+ * Sets is_healthy back to true and restarts the webhook. Fix the cause first (hook_url, connection auth); the connection must be healthy. Virtual: continues from where it stopped. A webhook that went unhealthy mid-initial-sync before resume was available restarts its initial sync, so deleting and recreating it is safer. Native: re-subscribes if the provider subscription is missing or expired. Events received while the webhook was unhealthy are not re-sent. Webhook sync (beta): continues from the stored sync token. Page cursors are not stored yet, so a resume can re-send some records. Virtual and initial-sync webhooks that have been unhealthy for more than 7 days cannot be resumed, because resuming would re-send every change since then; delete and recreate them instead. MCP Events subscriptions cannot be resumed; they are managed by their MCP client.
34
+ */
35
+ export function unifiedUpdateUnifiedWebhookResume(
36
+ client: UnifiedToCore,
37
+ request: operations.UpdateUnifiedWebhookResumeRequest,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ shared.Webhook,
42
+ | UnifiedToError
43
+ | ResponseValidationError
44
+ | ConnectionError
45
+ | RequestAbortedError
46
+ | RequestTimeoutError
47
+ | InvalidRequestError
48
+ | UnexpectedClientError
49
+ | SDKValidationError
50
+ >
51
+ > {
52
+ return new APIPromise($do(
53
+ client,
54
+ request,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client: UnifiedToCore,
61
+ request: operations.UpdateUnifiedWebhookResumeRequest,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ shared.Webhook,
67
+ | UnifiedToError
68
+ | ResponseValidationError
69
+ | ConnectionError
70
+ | RequestAbortedError
71
+ | RequestTimeoutError
72
+ | InvalidRequestError
73
+ | UnexpectedClientError
74
+ | SDKValidationError
75
+ >,
76
+ APICall,
77
+ ]
78
+ > {
79
+ const parsed = safeParse(
80
+ request,
81
+ (value) =>
82
+ operations.UpdateUnifiedWebhookResumeRequest$outboundSchema.parse(value),
83
+ "Input validation failed",
84
+ );
85
+ if (!parsed.ok) {
86
+ return [parsed, { status: "invalid" }];
87
+ }
88
+ const payload = parsed.value;
89
+ const body = null;
90
+
91
+ const pathParams = {
92
+ id: encodeSimple("id", payload.id, {
93
+ explode: false,
94
+ charEncoding: "percent",
95
+ }),
96
+ };
97
+ const path = pathToFunc("/unified/webhook/{id}/resume")(pathParams);
98
+
99
+ const headers = new Headers(compactMap({
100
+ Accept: "application/json",
101
+ }));
102
+
103
+ const securityInput = await extractSecurity(client._options.security);
104
+ const requestSecurity = resolveGlobalSecurity(securityInput);
105
+
106
+ const context = {
107
+ options: client._options,
108
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
109
+ operationID: "updateUnifiedWebhookResume",
110
+ oAuth2Scopes: null,
111
+
112
+ resolvedSecurity: requestSecurity,
113
+
114
+ securitySource: client._options.security,
115
+ retryConfig: options?.retries
116
+ || client._options.retryConfig
117
+ || { strategy: "none" },
118
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
119
+ };
120
+
121
+ const requestRes = client._createRequest(context, {
122
+ security: requestSecurity,
123
+ method: "PUT",
124
+ baseURL: options?.serverURL,
125
+ path: path,
126
+ headers: headers,
127
+ body: body,
128
+ userAgent: client._options.userAgent,
129
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
130
+ }, options);
131
+ if (!requestRes.ok) {
132
+ return [requestRes, { status: "invalid" }];
133
+ }
134
+ const req = requestRes.value;
135
+
136
+ const doResult = await client._do(req, {
137
+ context,
138
+ isErrorStatusCode: (statusCode: number) =>
139
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
140
+ retryConfig: context.retryConfig,
141
+ retryCodes: context.retryCodes,
142
+ });
143
+ if (!doResult.ok) {
144
+ return [doResult, { status: "request-error", request: req }];
145
+ }
146
+ const response = doResult.value;
147
+
148
+ const [result] = await M.match<
149
+ shared.Webhook,
150
+ | UnifiedToError
151
+ | ResponseValidationError
152
+ | ConnectionError
153
+ | RequestAbortedError
154
+ | RequestTimeoutError
155
+ | InvalidRequestError
156
+ | UnexpectedClientError
157
+ | SDKValidationError
158
+ >(
159
+ M.json(200, shared.Webhook$inboundSchema),
160
+ M.fail("4XX"),
161
+ M.fail("5XX"),
162
+ )(response, req);
163
+ if (!result.ok) {
164
+ return [result, { status: "complete", request: req, response }];
165
+ }
166
+
167
+ return [result, { status: "complete", request: req, response }];
168
+ }
package/src/lib/config.ts CHANGED
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
73
73
  export const SDK_METADATA = {
74
74
  language: "typescript",
75
75
  openapiDocVersion: "1.0",
76
- sdkVersion: "2.86.4",
76
+ sdkVersion: "2.86.5",
77
77
  genVersion: "2.950.13",
78
78
  userAgent:
79
- "speakeasy-sdk/typescript 2.86.4 2.950.13 1.0 @unified-api/typescript-sdk",
79
+ "speakeasy-sdk/typescript 2.86.5 2.950.13 1.0 @unified-api/typescript-sdk",
80
80
  } as const;
@@ -746,6 +746,7 @@ export * from "./patchuccontact.js";
746
746
  export * from "./patchucrecording.js";
747
747
  export * from "./patchunifiedconnection.js";
748
748
  export * from "./patchunifiedwebhook.js";
749
+ export * from "./patchunifiedwebhookresume.js";
749
750
  export * from "./patchunifiedwebhooktrigger.js";
750
751
  export * from "./patchverificationrequest.js";
751
752
  export * from "./removeaccountingaccount.js";
@@ -1043,5 +1044,6 @@ export * from "./updateuccontact.js";
1043
1044
  export * from "./updateucrecording.js";
1044
1045
  export * from "./updateunifiedconnection.js";
1045
1046
  export * from "./updateunifiedwebhook.js";
1047
+ export * from "./updateunifiedwebhookresume.js";
1046
1048
  export * from "./updateunifiedwebhooktrigger.js";
1047
1049
  export * from "./updateverificationrequest.js";
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+
7
+ export type PatchUnifiedWebhookResumeRequest = {
8
+ /**
9
+ * ID of the Webhook
10
+ */
11
+ id: string;
12
+ };
13
+
14
+ /** @internal */
15
+ export type PatchUnifiedWebhookResumeRequest$Outbound = {
16
+ id: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export const PatchUnifiedWebhookResumeRequest$outboundSchema: z.ZodType<
21
+ PatchUnifiedWebhookResumeRequest$Outbound,
22
+ z.ZodTypeDef,
23
+ PatchUnifiedWebhookResumeRequest
24
+ > = z.object({
25
+ id: z.string(),
26
+ });
27
+
28
+ export function patchUnifiedWebhookResumeRequestToJSON(
29
+ patchUnifiedWebhookResumeRequest: PatchUnifiedWebhookResumeRequest,
30
+ ): string {
31
+ return JSON.stringify(
32
+ PatchUnifiedWebhookResumeRequest$outboundSchema.parse(
33
+ patchUnifiedWebhookResumeRequest,
34
+ ),
35
+ );
36
+ }
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+
7
+ export type UpdateUnifiedWebhookResumeRequest = {
8
+ /**
9
+ * ID of the Webhook
10
+ */
11
+ id: string;
12
+ };
13
+
14
+ /** @internal */
15
+ export type UpdateUnifiedWebhookResumeRequest$Outbound = {
16
+ id: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export const UpdateUnifiedWebhookResumeRequest$outboundSchema: z.ZodType<
21
+ UpdateUnifiedWebhookResumeRequest$Outbound,
22
+ z.ZodTypeDef,
23
+ UpdateUnifiedWebhookResumeRequest
24
+ > = z.object({
25
+ id: z.string(),
26
+ });
27
+
28
+ export function updateUnifiedWebhookResumeRequestToJSON(
29
+ updateUnifiedWebhookResumeRequest: UpdateUnifiedWebhookResumeRequest,
30
+ ): string {
31
+ return JSON.stringify(
32
+ UpdateUnifiedWebhookResumeRequest$outboundSchema.parse(
33
+ updateUnifiedWebhookResumeRequest,
34
+ ),
35
+ );
36
+ }
@@ -38,7 +38,7 @@ import {
38
38
  export type CrmContact = {
39
39
  address?: PropertyCrmContactAddress | undefined;
40
40
  /**
41
- * The companyorganization name of the contact
41
+ * The company/organization name of the contact
42
42
  */
43
43
  company?: string | undefined;
44
44
  /**
@@ -58,12 +58,18 @@ export type CrmContact = {
58
58
  * An array of email addresses for this contact
59
59
  */
60
60
  emails?: Array<CrmEmail> | undefined;
61
+ /**
62
+ * The contact's first (given) name
63
+ */
61
64
  firstName?: string | undefined;
62
65
  /**
63
66
  * Unique identifier for this contact object
64
67
  */
65
68
  id?: string | undefined;
66
69
  imageUrl?: string | undefined;
70
+ /**
71
+ * The contact's last (family) name
72
+ */
67
73
  lastName?: string | undefined;
68
74
  /**
69
75
  * Additional URLs associated with the contact e.g., LinkedIn, website, etc
@@ -52,7 +52,7 @@ export type EnrichPerson = {
52
52
  */
53
53
  birthdate?: string | undefined;
54
54
  /**
55
- * The companyorganization name of the person
55
+ * The company/organization name of the person
56
56
  */
57
57
  company?: string | undefined;
58
58
  /**
@@ -26,6 +26,7 @@ import { unifiedListUnifiedSecretsmanagerSecrets } from "../funcs/unifiedListUni
26
26
  import { unifiedListUnifiedWebhooks } from "../funcs/unifiedListUnifiedWebhooks.js";
27
27
  import { unifiedPatchUnifiedConnection } from "../funcs/unifiedPatchUnifiedConnection.js";
28
28
  import { unifiedPatchUnifiedWebhook } from "../funcs/unifiedPatchUnifiedWebhook.js";
29
+ import { unifiedPatchUnifiedWebhookResume } from "../funcs/unifiedPatchUnifiedWebhookResume.js";
29
30
  import { unifiedPatchUnifiedWebhookTrigger } from "../funcs/unifiedPatchUnifiedWebhookTrigger.js";
30
31
  import { unifiedRemoveUnifiedConnection } from "../funcs/unifiedRemoveUnifiedConnection.js";
31
32
  import { unifiedRemoveUnifiedEnvironment } from "../funcs/unifiedRemoveUnifiedEnvironment.js";
@@ -33,6 +34,7 @@ import { unifiedRemoveUnifiedSecretsmanager } from "../funcs/unifiedRemoveUnifie
33
34
  import { unifiedRemoveUnifiedWebhook } from "../funcs/unifiedRemoveUnifiedWebhook.js";
34
35
  import { unifiedUpdateUnifiedConnection } from "../funcs/unifiedUpdateUnifiedConnection.js";
35
36
  import { unifiedUpdateUnifiedWebhook } from "../funcs/unifiedUpdateUnifiedWebhook.js";
37
+ import { unifiedUpdateUnifiedWebhookResume } from "../funcs/unifiedUpdateUnifiedWebhookResume.js";
36
38
  import { unifiedUpdateUnifiedWebhookTrigger } from "../funcs/unifiedUpdateUnifiedWebhookTrigger.js";
37
39
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
38
40
  import * as operations from "./models/operations/index.js";
@@ -387,6 +389,23 @@ export class Unified extends ClientSDK {
387
389
  ));
388
390
  }
389
391
 
392
+ /**
393
+ * Resume an unhealthy webhook subscription
394
+ *
395
+ * @remarks
396
+ * Sets is_healthy back to true and restarts the webhook. Fix the cause first (hook_url, connection auth); the connection must be healthy. Virtual: continues from where it stopped. A webhook that went unhealthy mid-initial-sync before resume was available restarts its initial sync, so deleting and recreating it is safer. Native: re-subscribes if the provider subscription is missing or expired. Events received while the webhook was unhealthy are not re-sent. Webhook sync (beta): continues from the stored sync token. Page cursors are not stored yet, so a resume can re-send some records. Virtual and initial-sync webhooks that have been unhealthy for more than 7 days cannot be resumed, because resuming would re-send every change since then; delete and recreate them instead. MCP Events subscriptions cannot be resumed; they are managed by their MCP client.
397
+ */
398
+ async patchUnifiedWebhookResume(
399
+ request: operations.PatchUnifiedWebhookResumeRequest,
400
+ options?: RequestOptions,
401
+ ): Promise<shared.Webhook> {
402
+ return unwrapAsync(unifiedPatchUnifiedWebhookResume(
403
+ this,
404
+ request,
405
+ options,
406
+ ));
407
+ }
408
+
390
409
  /**
391
410
  * Trigger webhook
392
411
  */
@@ -485,6 +504,23 @@ export class Unified extends ClientSDK {
485
504
  ));
486
505
  }
487
506
 
507
+ /**
508
+ * Resume an unhealthy webhook subscription
509
+ *
510
+ * @remarks
511
+ * Sets is_healthy back to true and restarts the webhook. Fix the cause first (hook_url, connection auth); the connection must be healthy. Virtual: continues from where it stopped. A webhook that went unhealthy mid-initial-sync before resume was available restarts its initial sync, so deleting and recreating it is safer. Native: re-subscribes if the provider subscription is missing or expired. Events received while the webhook was unhealthy are not re-sent. Webhook sync (beta): continues from the stored sync token. Page cursors are not stored yet, so a resume can re-send some records. Virtual and initial-sync webhooks that have been unhealthy for more than 7 days cannot be resumed, because resuming would re-send every change since then; delete and recreate them instead. MCP Events subscriptions cannot be resumed; they are managed by their MCP client.
512
+ */
513
+ async updateUnifiedWebhookResume(
514
+ request: operations.UpdateUnifiedWebhookResumeRequest,
515
+ options?: RequestOptions,
516
+ ): Promise<shared.Webhook> {
517
+ return unwrapAsync(unifiedUpdateUnifiedWebhookResume(
518
+ this,
519
+ request,
520
+ options,
521
+ ));
522
+ }
523
+
488
524
  /**
489
525
  * Trigger webhook
490
526
  */
@@ -6,9 +6,11 @@ import { unifiedCreateUnifiedWebhook } from "../funcs/unifiedCreateUnifiedWebhoo
6
6
  import { unifiedGetUnifiedWebhook } from "../funcs/unifiedGetUnifiedWebhook.js";
7
7
  import { unifiedListUnifiedWebhooks } from "../funcs/unifiedListUnifiedWebhooks.js";
8
8
  import { unifiedPatchUnifiedWebhook } from "../funcs/unifiedPatchUnifiedWebhook.js";
9
+ import { unifiedPatchUnifiedWebhookResume } from "../funcs/unifiedPatchUnifiedWebhookResume.js";
9
10
  import { unifiedPatchUnifiedWebhookTrigger } from "../funcs/unifiedPatchUnifiedWebhookTrigger.js";
10
11
  import { unifiedRemoveUnifiedWebhook } from "../funcs/unifiedRemoveUnifiedWebhook.js";
11
12
  import { unifiedUpdateUnifiedWebhook } from "../funcs/unifiedUpdateUnifiedWebhook.js";
13
+ import { unifiedUpdateUnifiedWebhookResume } from "../funcs/unifiedUpdateUnifiedWebhookResume.js";
12
14
  import { unifiedUpdateUnifiedWebhookTrigger } from "../funcs/unifiedUpdateUnifiedWebhookTrigger.js";
13
15
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
14
16
  import * as operations from "./models/operations/index.js";
@@ -75,6 +77,23 @@ export class Webhook extends ClientSDK {
75
77
  ));
76
78
  }
77
79
 
80
+ /**
81
+ * Resume an unhealthy webhook subscription
82
+ *
83
+ * @remarks
84
+ * Sets is_healthy back to true and restarts the webhook. Fix the cause first (hook_url, connection auth); the connection must be healthy. Virtual: continues from where it stopped. A webhook that went unhealthy mid-initial-sync before resume was available restarts its initial sync, so deleting and recreating it is safer. Native: re-subscribes if the provider subscription is missing or expired. Events received while the webhook was unhealthy are not re-sent. Webhook sync (beta): continues from the stored sync token. Page cursors are not stored yet, so a resume can re-send some records. Virtual and initial-sync webhooks that have been unhealthy for more than 7 days cannot be resumed, because resuming would re-send every change since then; delete and recreate them instead. MCP Events subscriptions cannot be resumed; they are managed by their MCP client.
85
+ */
86
+ async patchUnifiedWebhookResume(
87
+ request: operations.PatchUnifiedWebhookResumeRequest,
88
+ options?: RequestOptions,
89
+ ): Promise<shared.Webhook> {
90
+ return unwrapAsync(unifiedPatchUnifiedWebhookResume(
91
+ this,
92
+ request,
93
+ options,
94
+ ));
95
+ }
96
+
78
97
  /**
79
98
  * Trigger webhook
80
99
  */
@@ -117,6 +136,23 @@ export class Webhook extends ClientSDK {
117
136
  ));
118
137
  }
119
138
 
139
+ /**
140
+ * Resume an unhealthy webhook subscription
141
+ *
142
+ * @remarks
143
+ * Sets is_healthy back to true and restarts the webhook. Fix the cause first (hook_url, connection auth); the connection must be healthy. Virtual: continues from where it stopped. A webhook that went unhealthy mid-initial-sync before resume was available restarts its initial sync, so deleting and recreating it is safer. Native: re-subscribes if the provider subscription is missing or expired. Events received while the webhook was unhealthy are not re-sent. Webhook sync (beta): continues from the stored sync token. Page cursors are not stored yet, so a resume can re-send some records. Virtual and initial-sync webhooks that have been unhealthy for more than 7 days cannot be resumed, because resuming would re-send every change since then; delete and recreate them instead. MCP Events subscriptions cannot be resumed; they are managed by their MCP client.
144
+ */
145
+ async updateUnifiedWebhookResume(
146
+ request: operations.UpdateUnifiedWebhookResumeRequest,
147
+ options?: RequestOptions,
148
+ ): Promise<shared.Webhook> {
149
+ return unwrapAsync(unifiedUpdateUnifiedWebhookResume(
150
+ this,
151
+ request,
152
+ options,
153
+ ));
154
+ }
155
+
120
156
  /**
121
157
  * Trigger webhook
122
158
  */