@unified-api/typescript-sdk 2.86.4 → 2.86.6

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 (157) 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 +3 -3
  12. package/dist/commonjs/lib/config.js +3 -3
  13. package/dist/commonjs/lib/config.js.map +1 -1
  14. package/dist/commonjs/sdk/models/operations/createcalendarevent.d.ts +1 -1
  15. package/dist/commonjs/sdk/models/operations/createcalendarevent.js +1 -1
  16. package/dist/commonjs/sdk/models/operations/createcalendarevent.js.map +1 -1
  17. package/dist/commonjs/sdk/models/operations/getcalendarevent.d.ts +1 -1
  18. package/dist/commonjs/sdk/models/operations/getcalendarevent.js +1 -1
  19. package/dist/commonjs/sdk/models/operations/getcalendarevent.js.map +1 -1
  20. package/dist/commonjs/sdk/models/operations/getcalendarlocation.d.ts +3 -3
  21. package/dist/commonjs/sdk/models/operations/getcalendarlocation.js +3 -3
  22. package/dist/commonjs/sdk/models/operations/getcalendarlocation.js.map +1 -1
  23. package/dist/commonjs/sdk/models/operations/getcalendarroom.d.ts +4 -4
  24. package/dist/commonjs/sdk/models/operations/getcalendarroom.js +4 -4
  25. package/dist/commonjs/sdk/models/operations/getcalendarroom.js.map +1 -1
  26. package/dist/commonjs/sdk/models/operations/getunifiedintegrationauth.d.ts +1 -1
  27. package/dist/commonjs/sdk/models/operations/getunifiedintegrationlogin.d.ts +1 -1
  28. package/dist/commonjs/sdk/models/operations/getunifiedintegrationsaml.d.ts +1 -1
  29. package/dist/commonjs/sdk/models/operations/index.d.ts +2 -0
  30. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  31. package/dist/commonjs/sdk/models/operations/index.js +2 -0
  32. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  33. package/dist/commonjs/sdk/models/operations/listcalendarevents.d.ts +1 -1
  34. package/dist/commonjs/sdk/models/operations/listcalendarevents.js +1 -1
  35. package/dist/commonjs/sdk/models/operations/listcalendarevents.js.map +1 -1
  36. package/dist/commonjs/sdk/models/operations/listcalendarlocations.d.ts +3 -3
  37. package/dist/commonjs/sdk/models/operations/listcalendarlocations.js +3 -3
  38. package/dist/commonjs/sdk/models/operations/listcalendarlocations.js.map +1 -1
  39. package/dist/commonjs/sdk/models/operations/listcalendarrooms.d.ts +4 -4
  40. package/dist/commonjs/sdk/models/operations/listcalendarrooms.js +4 -4
  41. package/dist/commonjs/sdk/models/operations/listcalendarrooms.js.map +1 -1
  42. package/dist/commonjs/sdk/models/operations/patchcalendarevent.d.ts +1 -1
  43. package/dist/commonjs/sdk/models/operations/patchcalendarevent.js +1 -1
  44. package/dist/commonjs/sdk/models/operations/patchcalendarevent.js.map +1 -1
  45. package/dist/commonjs/sdk/models/operations/patchunifiedwebhookresume.d.ts +15 -0
  46. package/dist/commonjs/sdk/models/operations/patchunifiedwebhookresume.d.ts.map +1 -0
  47. package/dist/commonjs/sdk/models/operations/patchunifiedwebhookresume.js +49 -0
  48. package/dist/commonjs/sdk/models/operations/patchunifiedwebhookresume.js.map +1 -0
  49. package/dist/commonjs/sdk/models/operations/updatecalendarevent.d.ts +1 -1
  50. package/dist/commonjs/sdk/models/operations/updatecalendarevent.js +1 -1
  51. package/dist/commonjs/sdk/models/operations/updatecalendarevent.js.map +1 -1
  52. package/dist/commonjs/sdk/models/operations/updateunifiedwebhookresume.d.ts +15 -0
  53. package/dist/commonjs/sdk/models/operations/updateunifiedwebhookresume.d.ts.map +1 -0
  54. package/dist/commonjs/sdk/models/operations/updateunifiedwebhookresume.js +49 -0
  55. package/dist/commonjs/sdk/models/operations/updateunifiedwebhookresume.js.map +1 -0
  56. package/dist/commonjs/sdk/models/shared/crmcontact.d.ts +7 -1
  57. package/dist/commonjs/sdk/models/shared/crmcontact.d.ts.map +1 -1
  58. package/dist/commonjs/sdk/models/shared/crmcontact.js.map +1 -1
  59. package/dist/commonjs/sdk/models/shared/enrichperson.d.ts +1 -1
  60. package/dist/commonjs/sdk/unified.d.ts +14 -0
  61. package/dist/commonjs/sdk/unified.d.ts.map +1 -1
  62. package/dist/commonjs/sdk/unified.js +20 -0
  63. package/dist/commonjs/sdk/unified.js.map +1 -1
  64. package/dist/commonjs/sdk/webhook.d.ts +14 -0
  65. package/dist/commonjs/sdk/webhook.d.ts.map +1 -1
  66. package/dist/commonjs/sdk/webhook.js +20 -0
  67. package/dist/commonjs/sdk/webhook.js.map +1 -1
  68. package/dist/esm/funcs/unifiedPatchUnifiedWebhookResume.d.ts +18 -0
  69. package/dist/esm/funcs/unifiedPatchUnifiedWebhookResume.d.ts.map +1 -0
  70. package/dist/esm/funcs/unifiedPatchUnifiedWebhookResume.js +84 -0
  71. package/dist/esm/funcs/unifiedPatchUnifiedWebhookResume.js.map +1 -0
  72. package/dist/esm/funcs/unifiedUpdateUnifiedWebhookResume.d.ts +18 -0
  73. package/dist/esm/funcs/unifiedUpdateUnifiedWebhookResume.d.ts.map +1 -0
  74. package/dist/esm/funcs/unifiedUpdateUnifiedWebhookResume.js +84 -0
  75. package/dist/esm/funcs/unifiedUpdateUnifiedWebhookResume.js.map +1 -0
  76. package/dist/esm/lib/config.d.ts +3 -3
  77. package/dist/esm/lib/config.js +3 -3
  78. package/dist/esm/lib/config.js.map +1 -1
  79. package/dist/esm/sdk/models/operations/createcalendarevent.d.ts +1 -1
  80. package/dist/esm/sdk/models/operations/createcalendarevent.js +1 -1
  81. package/dist/esm/sdk/models/operations/createcalendarevent.js.map +1 -1
  82. package/dist/esm/sdk/models/operations/getcalendarevent.d.ts +1 -1
  83. package/dist/esm/sdk/models/operations/getcalendarevent.js +1 -1
  84. package/dist/esm/sdk/models/operations/getcalendarevent.js.map +1 -1
  85. package/dist/esm/sdk/models/operations/getcalendarlocation.d.ts +3 -3
  86. package/dist/esm/sdk/models/operations/getcalendarlocation.js +3 -3
  87. package/dist/esm/sdk/models/operations/getcalendarlocation.js.map +1 -1
  88. package/dist/esm/sdk/models/operations/getcalendarroom.d.ts +4 -4
  89. package/dist/esm/sdk/models/operations/getcalendarroom.js +4 -4
  90. package/dist/esm/sdk/models/operations/getcalendarroom.js.map +1 -1
  91. package/dist/esm/sdk/models/operations/getunifiedintegrationauth.d.ts +1 -1
  92. package/dist/esm/sdk/models/operations/getunifiedintegrationlogin.d.ts +1 -1
  93. package/dist/esm/sdk/models/operations/getunifiedintegrationsaml.d.ts +1 -1
  94. package/dist/esm/sdk/models/operations/index.d.ts +2 -0
  95. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  96. package/dist/esm/sdk/models/operations/index.js +2 -0
  97. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  98. package/dist/esm/sdk/models/operations/listcalendarevents.d.ts +1 -1
  99. package/dist/esm/sdk/models/operations/listcalendarevents.js +1 -1
  100. package/dist/esm/sdk/models/operations/listcalendarevents.js.map +1 -1
  101. package/dist/esm/sdk/models/operations/listcalendarlocations.d.ts +3 -3
  102. package/dist/esm/sdk/models/operations/listcalendarlocations.js +3 -3
  103. package/dist/esm/sdk/models/operations/listcalendarlocations.js.map +1 -1
  104. package/dist/esm/sdk/models/operations/listcalendarrooms.d.ts +4 -4
  105. package/dist/esm/sdk/models/operations/listcalendarrooms.js +4 -4
  106. package/dist/esm/sdk/models/operations/listcalendarrooms.js.map +1 -1
  107. package/dist/esm/sdk/models/operations/patchcalendarevent.d.ts +1 -1
  108. package/dist/esm/sdk/models/operations/patchcalendarevent.js +1 -1
  109. package/dist/esm/sdk/models/operations/patchcalendarevent.js.map +1 -1
  110. package/dist/esm/sdk/models/operations/patchunifiedwebhookresume.d.ts +15 -0
  111. package/dist/esm/sdk/models/operations/patchunifiedwebhookresume.d.ts.map +1 -0
  112. package/dist/esm/sdk/models/operations/patchunifiedwebhookresume.js +12 -0
  113. package/dist/esm/sdk/models/operations/patchunifiedwebhookresume.js.map +1 -0
  114. package/dist/esm/sdk/models/operations/updatecalendarevent.d.ts +1 -1
  115. package/dist/esm/sdk/models/operations/updatecalendarevent.js +1 -1
  116. package/dist/esm/sdk/models/operations/updatecalendarevent.js.map +1 -1
  117. package/dist/esm/sdk/models/operations/updateunifiedwebhookresume.d.ts +15 -0
  118. package/dist/esm/sdk/models/operations/updateunifiedwebhookresume.d.ts.map +1 -0
  119. package/dist/esm/sdk/models/operations/updateunifiedwebhookresume.js +12 -0
  120. package/dist/esm/sdk/models/operations/updateunifiedwebhookresume.js.map +1 -0
  121. package/dist/esm/sdk/models/shared/crmcontact.d.ts +7 -1
  122. package/dist/esm/sdk/models/shared/crmcontact.d.ts.map +1 -1
  123. package/dist/esm/sdk/models/shared/crmcontact.js.map +1 -1
  124. package/dist/esm/sdk/models/shared/enrichperson.d.ts +1 -1
  125. package/dist/esm/sdk/unified.d.ts +14 -0
  126. package/dist/esm/sdk/unified.d.ts.map +1 -1
  127. package/dist/esm/sdk/unified.js +20 -0
  128. package/dist/esm/sdk/unified.js.map +1 -1
  129. package/dist/esm/sdk/webhook.d.ts +14 -0
  130. package/dist/esm/sdk/webhook.d.ts.map +1 -1
  131. package/dist/esm/sdk/webhook.js +20 -0
  132. package/dist/esm/sdk/webhook.js.map +1 -1
  133. package/examples/accountingCreateAccountingAccount.example.ts +2 -2
  134. package/jsr.json +1 -1
  135. package/package.json +1 -1
  136. package/src/funcs/unifiedPatchUnifiedWebhookResume.ts +168 -0
  137. package/src/funcs/unifiedUpdateUnifiedWebhookResume.ts +168 -0
  138. package/src/lib/config.ts +3 -3
  139. package/src/sdk/models/operations/createcalendarevent.ts +1 -1
  140. package/src/sdk/models/operations/getcalendarevent.ts +1 -1
  141. package/src/sdk/models/operations/getcalendarlocation.ts +3 -3
  142. package/src/sdk/models/operations/getcalendarroom.ts +4 -4
  143. package/src/sdk/models/operations/getunifiedintegrationauth.ts +1 -1
  144. package/src/sdk/models/operations/getunifiedintegrationlogin.ts +1 -1
  145. package/src/sdk/models/operations/getunifiedintegrationsaml.ts +1 -1
  146. package/src/sdk/models/operations/index.ts +2 -0
  147. package/src/sdk/models/operations/listcalendarevents.ts +1 -1
  148. package/src/sdk/models/operations/listcalendarlocations.ts +3 -3
  149. package/src/sdk/models/operations/listcalendarrooms.ts +4 -4
  150. package/src/sdk/models/operations/patchcalendarevent.ts +1 -1
  151. package/src/sdk/models/operations/patchunifiedwebhookresume.ts +36 -0
  152. package/src/sdk/models/operations/updatecalendarevent.ts +1 -1
  153. package/src/sdk/models/operations/updateunifiedwebhookresume.ts +36 -0
  154. package/src/sdk/models/shared/crmcontact.ts +7 -1
  155. package/src/sdk/models/shared/enrichperson.ts +1 -1
  156. package/src/sdk/unified.ts +36 -0
  157. 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 unifiedPatchUnifiedWebhookResume(
36
+ client: UnifiedToCore,
37
+ request: operations.PatchUnifiedWebhookResumeRequest,
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.PatchUnifiedWebhookResumeRequest,
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.PatchUnifiedWebhookResumeRequest$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: "patchUnifiedWebhookResume",
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: "PATCH",
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
+ }
@@ -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",
77
- genVersion: "2.950.13",
76
+ sdkVersion: "2.86.6",
77
+ genVersion: "2.952.5",
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.6 2.952.5 1.0 @unified-api/typescript-sdk",
80
80
  } as const;
@@ -33,8 +33,8 @@ export const CreateCalendarEventQueryParamFields = {
33
33
  SendNotifications: "send_notifications",
34
34
  MatterId: "matter_id",
35
35
  Metadata: "metadata",
36
- Raw: "raw",
37
36
  RoomIds: "room_ids",
37
+ Raw: "raw",
38
38
  } as const;
39
39
  export type CreateCalendarEventQueryParamFields = ClosedEnum<
40
40
  typeof CreateCalendarEventQueryParamFields
@@ -32,8 +32,8 @@ export const GetCalendarEventQueryParamFields = {
32
32
  SendNotifications: "send_notifications",
33
33
  MatterId: "matter_id",
34
34
  Metadata: "metadata",
35
- Raw: "raw",
36
35
  RoomIds: "room_ids",
36
+ Raw: "raw",
37
37
  } as const;
38
38
  export type GetCalendarEventQueryParamFields = ClosedEnum<
39
39
  typeof GetCalendarEventQueryParamFields
@@ -8,15 +8,15 @@ import { ClosedEnum } from "../../types/enums.js";
8
8
 
9
9
  export const GetCalendarLocationQueryParamFields = {
10
10
  Id: "id",
11
+ CreatedAt: "created_at",
12
+ UpdatedAt: "updated_at",
11
13
  Name: "name",
12
14
  ParentId: "parent_id",
13
15
  Type: "type",
14
16
  Address: "address",
15
- Raw: "raw",
16
- CreatedAt: "created_at",
17
- UpdatedAt: "updated_at",
18
17
  Timezone: "timezone",
19
18
  Metadata: "metadata",
19
+ Raw: "raw",
20
20
  } as const;
21
21
  export type GetCalendarLocationQueryParamFields = ClosedEnum<
22
22
  typeof GetCalendarLocationQueryParamFields
@@ -8,15 +8,15 @@ import { ClosedEnum } from "../../types/enums.js";
8
8
 
9
9
  export const GetCalendarRoomQueryParamFields = {
10
10
  Id: "id",
11
+ CreatedAt: "created_at",
12
+ UpdatedAt: "updated_at",
11
13
  Name: "name",
14
+ Type: "type",
12
15
  Capacity: "capacity",
13
16
  LocationId: "location_id",
14
- Raw: "raw",
15
- CreatedAt: "created_at",
16
- UpdatedAt: "updated_at",
17
17
  Description: "description",
18
- Type: "type",
19
18
  Email: "email",
19
+ Raw: "raw",
20
20
  CalendarId: "calendar_id",
21
21
  Floor: "floor",
22
22
  Timezone: "timezone",
@@ -46,7 +46,7 @@ export type GetUnifiedIntegrationAuthRequest = {
46
46
  */
47
47
  subdomain?: string | undefined;
48
48
  /**
49
- * The URL where you want the user to be redirect to after a successful authorization. The connection ID will be appended with (id=<connectionId>) to this URL, as will the state that was provided.
49
+ * The URL where you want the user to be redirect to after a successful authorization. The connection ID will be appended with (id=<connectionId>) to this URL, as will the state that was provided. When the workspace has trusted_domains configured, this host must be on that list.
50
50
  */
51
51
  successRedirect?: string | undefined;
52
52
  /**
@@ -21,7 +21,7 @@ export type GetUnifiedIntegrationLoginRequest = {
21
21
  */
22
22
  state?: string | undefined;
23
23
  /**
24
- * The URL where you want the user to be redirect to after a successful authentication/sign-in. A "jwt" parameter will be appended to the URL which will contain a name and email of the user who just signed-in.
24
+ * The URL where you want the user to be redirect to after a successful authentication/sign-in. A "jwt" parameter will be appended to the URL which will contain a name and email of the user who just signed-in (and a redirect claim matching this URL). When the workspace has trusted_domains configured, this host must be on that list.
25
25
  */
26
26
  successRedirect?: string | undefined;
27
27
  /**
@@ -21,7 +21,7 @@ export type GetUnifiedIntegrationSamlRequest = {
21
21
  */
22
22
  state?: string | undefined;
23
23
  /**
24
- * The URL where you want the user to be redirect to after a successful authentication/sign-in. A "jwt" parameter will be appended to the URL which will contain a name and email of the user who just signed-in.
24
+ * The URL where you want the user to be redirect to after a successful authentication/sign-in. A "jwt" parameter will be appended to the URL which will contain a name and email of the user who just signed-in (and a redirect claim matching this URL). When the workspace has trusted_domains configured, this host must be on that list.
25
25
  */
26
26
  successRedirect?: string | undefined;
27
27
  /**
@@ -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";
@@ -32,8 +32,8 @@ export const ListCalendarEventsQueryParamFields = {
32
32
  SendNotifications: "send_notifications",
33
33
  MatterId: "matter_id",
34
34
  Metadata: "metadata",
35
- Raw: "raw",
36
35
  RoomIds: "room_ids",
36
+ Raw: "raw",
37
37
  } as const;
38
38
  export type ListCalendarEventsQueryParamFields = ClosedEnum<
39
39
  typeof ListCalendarEventsQueryParamFields
@@ -8,15 +8,15 @@ import { ClosedEnum } from "../../types/enums.js";
8
8
 
9
9
  export const ListCalendarLocationsQueryParamFields = {
10
10
  Id: "id",
11
+ CreatedAt: "created_at",
12
+ UpdatedAt: "updated_at",
11
13
  Name: "name",
12
14
  ParentId: "parent_id",
13
15
  Type: "type",
14
16
  Address: "address",
15
- Raw: "raw",
16
- CreatedAt: "created_at",
17
- UpdatedAt: "updated_at",
18
17
  Timezone: "timezone",
19
18
  Metadata: "metadata",
19
+ Raw: "raw",
20
20
  } as const;
21
21
  export type ListCalendarLocationsQueryParamFields = ClosedEnum<
22
22
  typeof ListCalendarLocationsQueryParamFields
@@ -8,15 +8,15 @@ import { ClosedEnum } from "../../types/enums.js";
8
8
 
9
9
  export const ListCalendarRoomsQueryParamFields = {
10
10
  Id: "id",
11
+ CreatedAt: "created_at",
12
+ UpdatedAt: "updated_at",
11
13
  Name: "name",
14
+ Type: "type",
12
15
  Capacity: "capacity",
13
16
  LocationId: "location_id",
14
- Raw: "raw",
15
- CreatedAt: "created_at",
16
- UpdatedAt: "updated_at",
17
17
  Description: "description",
18
- Type: "type",
19
18
  Email: "email",
19
+ Raw: "raw",
20
20
  CalendarId: "calendar_id",
21
21
  Floor: "floor",
22
22
  Timezone: "timezone",
@@ -33,8 +33,8 @@ export const PatchCalendarEventQueryParamFields = {
33
33
  SendNotifications: "send_notifications",
34
34
  MatterId: "matter_id",
35
35
  Metadata: "metadata",
36
- Raw: "raw",
37
36
  RoomIds: "room_ids",
37
+ Raw: "raw",
38
38
  } as const;
39
39
  export type PatchCalendarEventQueryParamFields = ClosedEnum<
40
40
  typeof PatchCalendarEventQueryParamFields
@@ -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
+ }
@@ -33,8 +33,8 @@ export const UpdateCalendarEventQueryParamFields = {
33
33
  SendNotifications: "send_notifications",
34
34
  MatterId: "matter_id",
35
35
  Metadata: "metadata",
36
- Raw: "raw",
37
36
  RoomIds: "room_ids",
37
+ Raw: "raw",
38
38
  } as const;
39
39
  export type UpdateCalendarEventQueryParamFields = ClosedEnum<
40
40
  typeof UpdateCalendarEventQueryParamFields
@@ -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
  /**