@orq-ai/node 4.17.0-rc.33 → 4.17.0-rc.34

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 (243) hide show
  1. package/README.md +87 -66
  2. package/funcs/auditLogDestinationsCreate.d.ts +18 -0
  3. package/funcs/auditLogDestinationsCreate.d.ts.map +1 -0
  4. package/funcs/auditLogDestinationsCreate.js +119 -0
  5. package/funcs/auditLogDestinationsCreate.js.map +1 -0
  6. package/funcs/auditLogDestinationsDelete.d.ts +19 -0
  7. package/funcs/auditLogDestinationsDelete.d.ts.map +1 -0
  8. package/funcs/auditLogDestinationsDelete.js +125 -0
  9. package/funcs/auditLogDestinationsDelete.js.map +1 -0
  10. package/funcs/auditLogDestinationsGet.d.ts +19 -0
  11. package/funcs/auditLogDestinationsGet.d.ts.map +1 -0
  12. package/funcs/auditLogDestinationsGet.js +125 -0
  13. package/funcs/auditLogDestinationsGet.js.map +1 -0
  14. package/funcs/auditLogDestinationsList.d.ts +19 -0
  15. package/funcs/auditLogDestinationsList.d.ts.map +1 -0
  16. package/funcs/auditLogDestinationsList.js +125 -0
  17. package/funcs/auditLogDestinationsList.js.map +1 -0
  18. package/funcs/auditLogDestinationsListDeliveries.d.ts +19 -0
  19. package/funcs/auditLogDestinationsListDeliveries.d.ts.map +1 -0
  20. package/funcs/auditLogDestinationsListDeliveries.js +132 -0
  21. package/funcs/auditLogDestinationsListDeliveries.js.map +1 -0
  22. package/funcs/auditLogDestinationsReplay.d.ts +19 -0
  23. package/funcs/auditLogDestinationsReplay.d.ts.map +1 -0
  24. package/funcs/auditLogDestinationsReplay.js +128 -0
  25. package/funcs/auditLogDestinationsReplay.js.map +1 -0
  26. package/funcs/auditLogDestinationsRotateSecret.d.ts +19 -0
  27. package/funcs/auditLogDestinationsRotateSecret.d.ts.map +1 -0
  28. package/funcs/auditLogDestinationsRotateSecret.js +125 -0
  29. package/funcs/auditLogDestinationsRotateSecret.js.map +1 -0
  30. package/funcs/auditLogDestinationsTest.d.ts +19 -0
  31. package/funcs/auditLogDestinationsTest.d.ts.map +1 -0
  32. package/funcs/auditLogDestinationsTest.js +125 -0
  33. package/funcs/auditLogDestinationsTest.js.map +1 -0
  34. package/funcs/auditLogDestinationsUpdate.d.ts +19 -0
  35. package/funcs/auditLogDestinationsUpdate.d.ts.map +1 -0
  36. package/funcs/auditLogDestinationsUpdate.js +128 -0
  37. package/funcs/auditLogDestinationsUpdate.js.map +1 -0
  38. package/funcs/websearchSearch.d.ts +3 -3
  39. package/funcs/websearchSearch.js +3 -3
  40. package/jsr.json +1 -1
  41. package/lib/config.d.ts +2 -2
  42. package/lib/config.js +2 -2
  43. package/models/components/auditlogdelivery.d.ts +42 -0
  44. package/models/components/auditlogdelivery.d.ts.map +1 -0
  45. package/models/components/auditlogdelivery.js +77 -0
  46. package/models/components/auditlogdelivery.js.map +1 -0
  47. package/models/components/auditlogdeliverykind.d.ts +11 -0
  48. package/models/components/auditlogdeliverykind.d.ts.map +1 -0
  49. package/models/components/auditlogdeliverykind.js +48 -0
  50. package/models/components/auditlogdeliverykind.js.map +1 -0
  51. package/models/components/auditlogdeliverystatus.d.ts +15 -0
  52. package/models/components/auditlogdeliverystatus.d.ts.map +1 -0
  53. package/models/components/auditlogdeliverystatus.js +52 -0
  54. package/models/components/auditlogdeliverystatus.js.map +1 -0
  55. package/models/components/auditlogdestination.d.ts +36 -0
  56. package/models/components/auditlogdestination.d.ts.map +1 -0
  57. package/models/components/auditlogdestination.js +72 -0
  58. package/models/components/auditlogdestination.js.map +1 -0
  59. package/models/components/auditlogdestinationstatus.d.ts +12 -0
  60. package/models/components/auditlogdestinationstatus.d.ts.map +1 -0
  61. package/models/components/auditlogdestinationstatus.js +49 -0
  62. package/models/components/auditlogdestinationstatus.js.map +1 -0
  63. package/models/components/createauditlogdestinationrequest.d.ts +25 -0
  64. package/models/components/createauditlogdestinationrequest.d.ts.map +1 -0
  65. package/models/components/createauditlogdestinationrequest.js +56 -0
  66. package/models/components/createauditlogdestinationrequest.js.map +1 -0
  67. package/models/components/createauditlogdestinationresponse.d.ts +15 -0
  68. package/models/components/createauditlogdestinationresponse.d.ts.map +1 -0
  69. package/models/components/createauditlogdestinationresponse.js +57 -0
  70. package/models/components/createauditlogdestinationresponse.js.map +1 -0
  71. package/models/components/deleteauditlogdestinationresponse.d.ts +8 -0
  72. package/models/components/deleteauditlogdestinationresponse.d.ts.map +1 -0
  73. package/models/components/deleteauditlogdestinationresponse.js +48 -0
  74. package/models/components/deleteauditlogdestinationresponse.js.map +1 -0
  75. package/models/components/effectiveuserpermissions.d.ts +10 -0
  76. package/models/components/effectiveuserpermissions.d.ts.map +1 -0
  77. package/models/components/effectiveuserpermissions.js +50 -0
  78. package/models/components/effectiveuserpermissions.js.map +1 -0
  79. package/models/components/getauditlogdestinationresponse.d.ts +11 -0
  80. package/models/components/getauditlogdestinationresponse.d.ts.map +1 -0
  81. package/models/components/getauditlogdestinationresponse.js +51 -0
  82. package/models/components/getauditlogdestinationresponse.js.map +1 -0
  83. package/models/components/index.d.ts +18 -0
  84. package/models/components/index.d.ts.map +1 -1
  85. package/models/components/index.js +18 -0
  86. package/models/components/index.js.map +1 -1
  87. package/models/components/listauditlogdeliveriesresponse.d.ts +13 -0
  88. package/models/components/listauditlogdeliveriesresponse.d.ts.map +1 -0
  89. package/models/components/listauditlogdeliveriesresponse.js +58 -0
  90. package/models/components/listauditlogdeliveriesresponse.js.map +1 -0
  91. package/models/components/listauditlogdestinationsresponse.d.ts +13 -0
  92. package/models/components/listauditlogdestinationsresponse.d.ts.map +1 -0
  93. package/models/components/listauditlogdestinationsresponse.js +58 -0
  94. package/models/components/listauditlogdestinationsresponse.js.map +1 -0
  95. package/models/components/reasoningpart.js +1 -1
  96. package/models/components/replayauditlogdeliveriesrequest.d.ts +20 -0
  97. package/models/components/replayauditlogdeliveriesrequest.d.ts.map +1 -0
  98. package/models/components/replayauditlogdeliveriesrequest.js +50 -0
  99. package/models/components/replayauditlogdeliveriesrequest.js.map +1 -0
  100. package/models/components/replayauditlogdeliveriesresponse.d.ts +14 -0
  101. package/models/components/replayauditlogdeliveriesresponse.d.ts.map +1 -0
  102. package/models/components/replayauditlogdeliveriesresponse.js +56 -0
  103. package/models/components/replayauditlogdeliveriesresponse.js.map +1 -0
  104. package/models/components/rotateauditlogdestinationsecretresponse.d.ts +15 -0
  105. package/models/components/rotateauditlogdestinationsecretresponse.d.ts.map +1 -0
  106. package/models/components/rotateauditlogdestinationsecretresponse.js +57 -0
  107. package/models/components/rotateauditlogdestinationsecretresponse.js.map +1 -0
  108. package/models/components/testauditlogdestinationresponse.d.ts +11 -0
  109. package/models/components/testauditlogdestinationresponse.d.ts.map +1 -0
  110. package/models/components/testauditlogdestinationresponse.js +51 -0
  111. package/models/components/testauditlogdestinationresponse.js.map +1 -0
  112. package/models/components/updateauditlogdestinationrequest.d.ts +28 -0
  113. package/models/components/updateauditlogdestinationrequest.d.ts.map +1 -0
  114. package/models/components/updateauditlogdestinationrequest.js +58 -0
  115. package/models/components/updateauditlogdestinationrequest.js.map +1 -0
  116. package/models/components/updateauditlogdestinationresponse.d.ts +11 -0
  117. package/models/components/updateauditlogdestinationresponse.d.ts.map +1 -0
  118. package/models/components/updateauditlogdestinationresponse.js +51 -0
  119. package/models/components/updateauditlogdestinationresponse.js.map +1 -0
  120. package/models/components/workspacecapabilities.d.ts +2 -0
  121. package/models/components/workspacecapabilities.d.ts.map +1 -1
  122. package/models/components/workspacecapabilities.js +7 -0
  123. package/models/components/workspacecapabilities.js.map +1 -1
  124. package/models/operations/auditlogdestinationdelete.d.ts +12 -0
  125. package/models/operations/auditlogdestinationdelete.d.ts.map +1 -0
  126. package/models/operations/auditlogdestinationdelete.js +54 -0
  127. package/models/operations/auditlogdestinationdelete.js.map +1 -0
  128. package/models/operations/auditlogdestinationget.d.ts +12 -0
  129. package/models/operations/auditlogdestinationget.d.ts.map +1 -0
  130. package/models/operations/auditlogdestinationget.js +54 -0
  131. package/models/operations/auditlogdestinationget.js.map +1 -0
  132. package/models/operations/auditlogdestinationlist.d.ts +16 -0
  133. package/models/operations/auditlogdestinationlist.d.ts.map +1 -0
  134. package/models/operations/auditlogdestinationlist.js +57 -0
  135. package/models/operations/auditlogdestinationlist.js.map +1 -0
  136. package/models/operations/auditlogdestinationlistdeliveries.d.ts +21 -0
  137. package/models/operations/auditlogdestinationlistdeliveries.d.ts.map +1 -0
  138. package/models/operations/auditlogdestinationlistdeliveries.js +61 -0
  139. package/models/operations/auditlogdestinationlistdeliveries.js.map +1 -0
  140. package/models/operations/auditlogdestinationreplay.d.ts +15 -0
  141. package/models/operations/auditlogdestinationreplay.d.ts.map +1 -0
  142. package/models/operations/auditlogdestinationreplay.js +57 -0
  143. package/models/operations/auditlogdestinationreplay.js.map +1 -0
  144. package/models/operations/auditlogdestinationrotatesecret.d.ts +12 -0
  145. package/models/operations/auditlogdestinationrotatesecret.d.ts.map +1 -0
  146. package/models/operations/auditlogdestinationrotatesecret.js +54 -0
  147. package/models/operations/auditlogdestinationrotatesecret.js.map +1 -0
  148. package/models/operations/auditlogdestinationtest.d.ts +12 -0
  149. package/models/operations/auditlogdestinationtest.d.ts.map +1 -0
  150. package/models/operations/auditlogdestinationtest.js +54 -0
  151. package/models/operations/auditlogdestinationtest.js.map +1 -0
  152. package/models/operations/auditlogdestinationupdate.d.ts +15 -0
  153. package/models/operations/auditlogdestinationupdate.d.ts.map +1 -0
  154. package/models/operations/auditlogdestinationupdate.js +57 -0
  155. package/models/operations/auditlogdestinationupdate.js.map +1 -0
  156. package/models/operations/createtool.js +4 -4
  157. package/models/operations/getalltools.js +4 -4
  158. package/models/operations/getv2humanevalsets.js +2 -2
  159. package/models/operations/getv2humanevalsetsid.js +2 -2
  160. package/models/operations/index.d.ts +8 -0
  161. package/models/operations/index.d.ts.map +1 -1
  162. package/models/operations/index.js +8 -0
  163. package/models/operations/index.js.map +1 -1
  164. package/models/operations/listdeploymentversions.js +1 -1
  165. package/models/operations/patchv2humanevalsetsid.js +2 -2
  166. package/models/operations/postv2feedbackevaluation.js +4 -4
  167. package/models/operations/postv2humanevalsets.js +2 -2
  168. package/models/operations/retrievetool.js +4 -4
  169. package/models/operations/runagent.js +1 -1
  170. package/models/operations/searchweb.d.ts +3 -1
  171. package/models/operations/searchweb.d.ts.map +1 -1
  172. package/models/operations/searchweb.js +2 -0
  173. package/models/operations/searchweb.js.map +1 -1
  174. package/models/operations/streamrunagent.js +1 -1
  175. package/models/operations/updatetool.js +4 -4
  176. package/package.json +8 -8
  177. package/sdk/auditlogdestinations.d.ts +69 -0
  178. package/sdk/auditlogdestinations.d.ts.map +1 -0
  179. package/sdk/auditlogdestinations.js +102 -0
  180. package/sdk/auditlogdestinations.js.map +1 -0
  181. package/sdk/sdk.d.ts +3 -0
  182. package/sdk/sdk.d.ts.map +1 -1
  183. package/sdk/sdk.js +4 -0
  184. package/sdk/sdk.js.map +1 -1
  185. package/sdk/websearch.d.ts +3 -3
  186. package/sdk/websearch.js +3 -3
  187. package/src/funcs/auditLogDestinationsCreate.ts +172 -0
  188. package/src/funcs/auditLogDestinationsDelete.ts +180 -0
  189. package/src/funcs/auditLogDestinationsGet.ts +180 -0
  190. package/src/funcs/auditLogDestinationsList.ts +181 -0
  191. package/src/funcs/auditLogDestinationsListDeliveries.ts +190 -0
  192. package/src/funcs/auditLogDestinationsReplay.ts +183 -0
  193. package/src/funcs/auditLogDestinationsRotateSecret.ts +185 -0
  194. package/src/funcs/auditLogDestinationsTest.ts +180 -0
  195. package/src/funcs/auditLogDestinationsUpdate.ts +183 -0
  196. package/src/funcs/websearchSearch.ts +3 -3
  197. package/src/lib/config.ts +2 -2
  198. package/src/models/components/auditlogdelivery.ts +100 -0
  199. package/src/models/components/auditlogdeliverykind.ts +18 -0
  200. package/src/models/components/auditlogdeliverystatus.ts +24 -0
  201. package/src/models/components/auditlogdestination.ts +83 -0
  202. package/src/models/components/auditlogdestinationstatus.ts +23 -0
  203. package/src/models/components/createauditlogdestinationrequest.ts +53 -0
  204. package/src/models/components/createauditlogdestinationresponse.ts +45 -0
  205. package/src/models/components/deleteauditlogdestinationresponse.ts +27 -0
  206. package/src/models/components/effectiveuserpermissions.ts +31 -0
  207. package/src/models/components/getauditlogdestinationresponse.ts +35 -0
  208. package/src/models/components/index.ts +18 -0
  209. package/src/models/components/listauditlogdeliveriesresponse.ts +44 -0
  210. package/src/models/components/listauditlogdestinationsresponse.ts +44 -0
  211. package/src/models/components/reasoningpart.ts +1 -1
  212. package/src/models/components/replayauditlogdeliveriesrequest.ts +42 -0
  213. package/src/models/components/replayauditlogdeliveriesresponse.ts +41 -0
  214. package/src/models/components/rotateauditlogdestinationsecretresponse.ts +51 -0
  215. package/src/models/components/testauditlogdestinationresponse.ts +35 -0
  216. package/src/models/components/updateauditlogdestinationrequest.ts +60 -0
  217. package/src/models/components/updateauditlogdestinationresponse.ts +35 -0
  218. package/src/models/components/workspacecapabilities.ts +11 -0
  219. package/src/models/operations/auditlogdestinationdelete.ts +38 -0
  220. package/src/models/operations/auditlogdestinationget.ts +38 -0
  221. package/src/models/operations/auditlogdestinationlist.ts +45 -0
  222. package/src/models/operations/auditlogdestinationlistdeliveries.ts +54 -0
  223. package/src/models/operations/auditlogdestinationreplay.ts +45 -0
  224. package/src/models/operations/auditlogdestinationrotatesecret.ts +39 -0
  225. package/src/models/operations/auditlogdestinationtest.ts +38 -0
  226. package/src/models/operations/auditlogdestinationupdate.ts +45 -0
  227. package/src/models/operations/createtool.ts +4 -4
  228. package/src/models/operations/getalltools.ts +4 -4
  229. package/src/models/operations/getv2humanevalsets.ts +2 -2
  230. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  231. package/src/models/operations/index.ts +8 -0
  232. package/src/models/operations/listdeploymentversions.ts +1 -1
  233. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  234. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  235. package/src/models/operations/postv2humanevalsets.ts +2 -2
  236. package/src/models/operations/retrievetool.ts +4 -4
  237. package/src/models/operations/runagent.ts +1 -1
  238. package/src/models/operations/searchweb.ts +3 -1
  239. package/src/models/operations/streamrunagent.ts +1 -1
  240. package/src/models/operations/updatetool.ts +4 -4
  241. package/src/sdk/auditlogdestinations.ts +172 -0
  242. package/src/sdk/sdk.ts +8 -0
  243. package/src/sdk/websearch.ts +3 -3
@@ -0,0 +1,183 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { OrqCore } from "../core.js";
6
+ import { encodeJSON, 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 * as components from "../models/components/index.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/httpclienterrors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { OrqError } from "../models/errors/orqerror.js";
24
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
25
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
26
+ import * as operations from "../models/operations/index.js";
27
+ import { APICall, APIPromise } from "../types/async.js";
28
+ import { Result } from "../types/fp.js";
29
+
30
+ /**
31
+ * Update an audit log destination
32
+ *
33
+ * @remarks
34
+ * Partially updates a destination. Set `status` to `AUDIT_LOG_DESTINATION_STATUS_PAUSED` to stop deliveries while retaining the backlog, and back to `AUDIT_LOG_DESTINATION_STATUS_ACTIVE` to drain it. The URL can only change while the destination is paused.
35
+ */
36
+ export function auditLogDestinationsUpdate(
37
+ client: OrqCore,
38
+ request: operations.AuditLogDestinationUpdateRequest,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ components.UpdateAuditLogDestinationResponse,
43
+ | errors.ErrorResponse
44
+ | OrqError
45
+ | ResponseValidationError
46
+ | ConnectionError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | InvalidRequestError
50
+ | UnexpectedClientError
51
+ | SDKValidationError
52
+ >
53
+ > {
54
+ return new APIPromise($do(
55
+ client,
56
+ request,
57
+ options,
58
+ ));
59
+ }
60
+
61
+ async function $do(
62
+ client: OrqCore,
63
+ request: operations.AuditLogDestinationUpdateRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<
66
+ [
67
+ Result<
68
+ components.UpdateAuditLogDestinationResponse,
69
+ | errors.ErrorResponse
70
+ | OrqError
71
+ | ResponseValidationError
72
+ | ConnectionError
73
+ | RequestAbortedError
74
+ | RequestTimeoutError
75
+ | InvalidRequestError
76
+ | UnexpectedClientError
77
+ | SDKValidationError
78
+ >,
79
+ APICall,
80
+ ]
81
+ > {
82
+ const parsed = safeParse(
83
+ request,
84
+ (value) =>
85
+ operations.AuditLogDestinationUpdateRequest$outboundSchema.parse(value),
86
+ "Input validation failed",
87
+ );
88
+ if (!parsed.ok) {
89
+ return [parsed, { status: "invalid" }];
90
+ }
91
+ const payload = parsed.value;
92
+ const body = encodeJSON("body", payload.UpdateAuditLogDestinationRequest, {
93
+ explode: true,
94
+ });
95
+
96
+ const pathParams = {
97
+ destination_id: encodeSimple("destination_id", payload.destination_id, {
98
+ explode: false,
99
+ charEncoding: "percent",
100
+ }),
101
+ };
102
+ const path = pathToFunc("/v3/audit-log-destinations/{destination_id}")(
103
+ pathParams,
104
+ );
105
+
106
+ const headers = new Headers(compactMap({
107
+ "Content-Type": "application/json",
108
+ Accept: "application/json",
109
+ }));
110
+
111
+ const secConfig = await extractSecurity(client._options.apiKey);
112
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
113
+ const requestSecurity = resolveGlobalSecurity(securityInput);
114
+
115
+ const context = {
116
+ options: client._options,
117
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
118
+ operationID: "AuditLogDestinationUpdate",
119
+ oAuth2Scopes: null,
120
+
121
+ resolvedSecurity: requestSecurity,
122
+
123
+ securitySource: client._options.apiKey,
124
+ retryConfig: options?.retries
125
+ || client._options.retryConfig
126
+ || { strategy: "none" },
127
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
128
+ };
129
+
130
+ const requestRes = client._createRequest(context, {
131
+ security: requestSecurity,
132
+ method: "PATCH",
133
+ baseURL: options?.serverURL,
134
+ path: path,
135
+ headers: headers,
136
+ body: body,
137
+ userAgent: client._options.userAgent,
138
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
139
+ }, options);
140
+ if (!requestRes.ok) {
141
+ return [requestRes, { status: "invalid" }];
142
+ }
143
+ const req = requestRes.value;
144
+
145
+ const doResult = await client._do(req, {
146
+ context,
147
+ isErrorStatusCode: (statusCode: number) =>
148
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
149
+ retryConfig: context.retryConfig,
150
+ retryCodes: context.retryCodes,
151
+ });
152
+ if (!doResult.ok) {
153
+ return [doResult, { status: "request-error", request: req }];
154
+ }
155
+ const response = doResult.value;
156
+
157
+ const responseFields = {
158
+ HttpMeta: { Response: response, Request: req },
159
+ };
160
+
161
+ const [result] = await M.match<
162
+ components.UpdateAuditLogDestinationResponse,
163
+ | errors.ErrorResponse
164
+ | OrqError
165
+ | ResponseValidationError
166
+ | ConnectionError
167
+ | RequestAbortedError
168
+ | RequestTimeoutError
169
+ | InvalidRequestError
170
+ | UnexpectedClientError
171
+ | SDKValidationError
172
+ >(
173
+ M.json(200, components.UpdateAuditLogDestinationResponse$inboundSchema),
174
+ M.jsonErr(401, errors.ErrorResponse$inboundSchema),
175
+ M.fail("4XX"),
176
+ M.fail("5XX"),
177
+ )(response, req, { extraFields: responseFields });
178
+ if (!result.ok) {
179
+ return [result, { status: "complete", request: req, response }];
180
+ }
181
+
182
+ return [result, { status: "complete", request: req, response }];
183
+ }
@@ -30,11 +30,11 @@ import { Result } from "../types/fp.js";
30
30
  * Search the web with a selected provider
31
31
  *
32
32
  * @remarks
33
- * Search with Exa, Ceramic, Linkup, Tavily, Serper, OpenAI, or Perplexity and return page URLs, titles, and descriptions in one response format. Authenticate with an API key that grants **websearch.execute** and send **Content-Type: application/json**.
33
+ * Search with Exa, Ceramic, Linkup, Tavily, Serper, OpenAI, Perplexity, or DeepSeek and return page URLs, titles, and descriptions in one response format. Authenticate with an API key that grants **websearch.execute** and send **Content-Type: application/json**.
34
34
  *
35
35
  * ### Provider and credentials
36
36
  *
37
- * Each request uses the selected provider. Exa uses **auto** search, Linkup uses **standard** depth, Tavily uses **basic** depth, and Perplexity uses its standard Search API. OpenAI runs one forced **web_search** tool call on gpt-5.6-luna through the Responses API and returns the raw search results.
37
+ * Each request uses the selected provider. Exa uses **auto** search, Linkup uses **standard** depth, Tavily uses **basic** depth, and Perplexity and DeepSeek use their standard Search APIs. DeepSeek accepts queries of at most 128 characters. OpenAI runs one forced **web_search** tool call on gpt-5.6-luna through the Responses API and returns the raw search results.
38
38
  *
39
39
  * Credentials are selected from the authenticated workspace. A configured provider integration takes precedence over ORQ-managed credentials: the default integration is used, or the first configured integration if no default is set. Configure BYOK in the workspace integrations settings. Invalid integration credentials cause an error.
40
40
  *
@@ -44,7 +44,7 @@ import { Result } from "../types/fp.js";
44
44
  *
45
45
  * Exa's published auto rate is **US$7 per 1,000 requests** for up to 10 results, or **US$8 per 1,000** including the ORQ markup. Exa charges use the actual cost reported by the provider.
46
46
  *
47
- * Perplexity's published Search API rate is **US$5 per 1,000 requests**. OpenAI web search costs **US$10 per 1,000 tool calls** plus the gpt-5.6-luna tokens of the Responses call, computed from the usage reported by OpenAI, so each search is typically US$0.012 to US$0.015 before the ORQ markup.
47
+ * Perplexity's published Search API rate is **US$5 per 1,000 requests** and DeepSeek's is **US$0.75 per 1,000 requests**. OpenAI web search costs **US$10 per 1,000 tool calls** plus the gpt-5.6-luna tokens of the Responses call, computed from the usage reported by OpenAI, so each search is typically US$0.012 to US$0.015 before the ORQ markup.
48
48
  *
49
49
  * A successful managed search is billable even if an output guardrail or output redaction failure prevents the results from being returned.
50
50
  *
package/src/lib/config.ts CHANGED
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
58
58
  export const SDK_METADATA = {
59
59
  language: "typescript",
60
60
  openapiDocVersion: "2.0",
61
- sdkVersion: "4.17.0-rc.33",
61
+ sdkVersion: "4.17.0-rc.34",
62
62
  genVersion: "2.948.4",
63
- userAgent: "speakeasy-sdk/typescript 4.17.0-rc.33 2.948.4 2.0 @orq-ai/node",
63
+ userAgent: "speakeasy-sdk/typescript 4.17.0-rc.34 2.948.4 2.0 @orq-ai/node",
64
64
  } as const;
@@ -0,0 +1,100 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ AuditLogDeliveryKind,
12
+ AuditLogDeliveryKind$inboundSchema,
13
+ } from "./auditlogdeliverykind.js";
14
+ import {
15
+ AuditLogDeliveryStatus,
16
+ AuditLogDeliveryStatus$inboundSchema,
17
+ } from "./auditlogdeliverystatus.js";
18
+
19
+ export type AuditLogDelivery = {
20
+ id: string;
21
+ destinationId: string;
22
+ /**
23
+ * Audit log entry ID carried in the payload. Replays reuse the original event ID.
24
+ */
25
+ eventId: string;
26
+ kind: AuditLogDeliveryKind;
27
+ status: AuditLogDeliveryStatus;
28
+ /**
29
+ * Number of HTTP attempts made so far.
30
+ */
31
+ attempts: number;
32
+ /**
33
+ * When the next attempt is due, while pending.
34
+ */
35
+ nextAttemptAt?: Date | undefined;
36
+ lastAttemptAt?: Date | undefined;
37
+ /**
38
+ * HTTP status of the last attempt, 0 when the request never completed.
39
+ */
40
+ lastStatusCode?: number | undefined;
41
+ /**
42
+ * Short description of the last failure.
43
+ */
44
+ lastError?: string | undefined;
45
+ deliveredAt?: Date | undefined;
46
+ createdAt: Date;
47
+ /**
48
+ * Replay request that queued this delivery, empty for live deliveries.
49
+ */
50
+ replayId?: string | undefined;
51
+ };
52
+
53
+ /** @internal */
54
+ export const AuditLogDelivery$inboundSchema: z.ZodType<
55
+ AuditLogDelivery,
56
+ z.ZodTypeDef,
57
+ unknown
58
+ > = z.object({
59
+ id: z.string(),
60
+ destination_id: z.string(),
61
+ event_id: z.string(),
62
+ kind: AuditLogDeliveryKind$inboundSchema,
63
+ status: AuditLogDeliveryStatus$inboundSchema,
64
+ attempts: z.number().int(),
65
+ next_attempt_at: z.string().datetime({ offset: true }).transform(v =>
66
+ new Date(v)
67
+ ).optional(),
68
+ last_attempt_at: z.string().datetime({ offset: true }).transform(v =>
69
+ new Date(v)
70
+ ).optional(),
71
+ last_status_code: z.number().int().optional(),
72
+ last_error: z.string().optional(),
73
+ delivered_at: z.string().datetime({ offset: true }).transform(v =>
74
+ new Date(v)
75
+ ).optional(),
76
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
77
+ replay_id: z.string().optional(),
78
+ }).transform((v) => {
79
+ return remap$(v, {
80
+ "destination_id": "destinationId",
81
+ "event_id": "eventId",
82
+ "next_attempt_at": "nextAttemptAt",
83
+ "last_attempt_at": "lastAttemptAt",
84
+ "last_status_code": "lastStatusCode",
85
+ "last_error": "lastError",
86
+ "delivered_at": "deliveredAt",
87
+ "created_at": "createdAt",
88
+ "replay_id": "replayId",
89
+ });
90
+ });
91
+
92
+ export function auditLogDeliveryFromJSON(
93
+ jsonString: string,
94
+ ): SafeParseResult<AuditLogDelivery, SDKValidationError> {
95
+ return safeParse(
96
+ jsonString,
97
+ (x) => AuditLogDelivery$inboundSchema.parse(JSON.parse(x)),
98
+ `Failed to parse 'AuditLogDelivery' from JSON`,
99
+ );
100
+ }
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const AuditLogDeliveryKind = {
9
+ AuditLogDeliveryKindEvent: "AUDIT_LOG_DELIVERY_KIND_EVENT",
10
+ AuditLogDeliveryKindReplay: "AUDIT_LOG_DELIVERY_KIND_REPLAY",
11
+ AuditLogDeliveryKindTest: "AUDIT_LOG_DELIVERY_KIND_TEST",
12
+ } as const;
13
+ export type AuditLogDeliveryKind = ClosedEnum<typeof AuditLogDeliveryKind>;
14
+
15
+ /** @internal */
16
+ export const AuditLogDeliveryKind$inboundSchema: z.ZodNativeEnum<
17
+ typeof AuditLogDeliveryKind
18
+ > = z.nativeEnum(AuditLogDeliveryKind);
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const AuditLogDeliveryStatus = {
9
+ AuditLogDeliveryStatusPending: "AUDIT_LOG_DELIVERY_STATUS_PENDING",
10
+ AuditLogDeliveryStatusDelivering: "AUDIT_LOG_DELIVERY_STATUS_DELIVERING",
11
+ AuditLogDeliveryStatusSucceeded: "AUDIT_LOG_DELIVERY_STATUS_SUCCEEDED",
12
+ AuditLogDeliveryStatusFailed: "AUDIT_LOG_DELIVERY_STATUS_FAILED",
13
+ AuditLogDeliveryStatusCancelled: "AUDIT_LOG_DELIVERY_STATUS_CANCELLED",
14
+ } as const;
15
+ export type AuditLogDeliveryStatus = ClosedEnum<typeof AuditLogDeliveryStatus>;
16
+
17
+ /** @internal */
18
+ export const AuditLogDeliveryStatus$inboundSchema: z.ZodNativeEnum<
19
+ typeof AuditLogDeliveryStatus
20
+ > = z.nativeEnum(AuditLogDeliveryStatus);
21
+ /** @internal */
22
+ export const AuditLogDeliveryStatus$outboundSchema: z.ZodNativeEnum<
23
+ typeof AuditLogDeliveryStatus
24
+ > = AuditLogDeliveryStatus$inboundSchema;
@@ -0,0 +1,83 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ AuditLogDestinationStatus,
12
+ AuditLogDestinationStatus$inboundSchema,
13
+ } from "./auditlogdestinationstatus.js";
14
+
15
+ export type AuditLogDestination = {
16
+ id: string;
17
+ /**
18
+ * Human-readable destination name, unique within the workspace.
19
+ */
20
+ displayName: string;
21
+ /**
22
+ * Optional description of the receiving system.
23
+ */
24
+ description?: string | undefined;
25
+ /**
26
+ * HTTPS endpoint that receives signed audit log events.
27
+ */
28
+ url: string;
29
+ status: AuditLogDestinationStatus;
30
+ /**
31
+ * Last four characters of the current signing secret, to tell rotations apart.
32
+ */
33
+ signingSecretHint?: string | undefined;
34
+ /**
35
+ * Time the current signing secret was issued.
36
+ */
37
+ secretRotatedAt?: Date | undefined;
38
+ createdAt: Date;
39
+ updatedAt: Date;
40
+ createdById?: string | undefined;
41
+ updatedById?: string | undefined;
42
+ };
43
+
44
+ /** @internal */
45
+ export const AuditLogDestination$inboundSchema: z.ZodType<
46
+ AuditLogDestination,
47
+ z.ZodTypeDef,
48
+ unknown
49
+ > = z.object({
50
+ id: z.string(),
51
+ display_name: z.string(),
52
+ description: z.string().optional(),
53
+ url: z.string(),
54
+ status: AuditLogDestinationStatus$inboundSchema,
55
+ signing_secret_hint: z.string().optional(),
56
+ secret_rotated_at: z.string().datetime({ offset: true }).transform(v =>
57
+ new Date(v)
58
+ ).optional(),
59
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
60
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
61
+ created_by_id: z.string().optional(),
62
+ updated_by_id: z.string().optional(),
63
+ }).transform((v) => {
64
+ return remap$(v, {
65
+ "display_name": "displayName",
66
+ "signing_secret_hint": "signingSecretHint",
67
+ "secret_rotated_at": "secretRotatedAt",
68
+ "created_at": "createdAt",
69
+ "updated_at": "updatedAt",
70
+ "created_by_id": "createdById",
71
+ "updated_by_id": "updatedById",
72
+ });
73
+ });
74
+
75
+ export function auditLogDestinationFromJSON(
76
+ jsonString: string,
77
+ ): SafeParseResult<AuditLogDestination, SDKValidationError> {
78
+ return safeParse(
79
+ jsonString,
80
+ (x) => AuditLogDestination$inboundSchema.parse(JSON.parse(x)),
81
+ `Failed to parse 'AuditLogDestination' from JSON`,
82
+ );
83
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const AuditLogDestinationStatus = {
9
+ AuditLogDestinationStatusActive: "AUDIT_LOG_DESTINATION_STATUS_ACTIVE",
10
+ AuditLogDestinationStatusPaused: "AUDIT_LOG_DESTINATION_STATUS_PAUSED",
11
+ } as const;
12
+ export type AuditLogDestinationStatus = ClosedEnum<
13
+ typeof AuditLogDestinationStatus
14
+ >;
15
+
16
+ /** @internal */
17
+ export const AuditLogDestinationStatus$inboundSchema: z.ZodNativeEnum<
18
+ typeof AuditLogDestinationStatus
19
+ > = z.nativeEnum(AuditLogDestinationStatus);
20
+ /** @internal */
21
+ export const AuditLogDestinationStatus$outboundSchema: z.ZodNativeEnum<
22
+ typeof AuditLogDestinationStatus
23
+ > = AuditLogDestinationStatus$inboundSchema;
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+
8
+ export type CreateAuditLogDestinationRequest = {
9
+ /**
10
+ * Required. Human-readable destination name, unique within the workspace.
11
+ */
12
+ displayName: string;
13
+ /**
14
+ * Optional. Description of the receiving system.
15
+ */
16
+ description?: string | undefined;
17
+ /**
18
+ * Required. Absolute HTTPS URL. Private and loopback addresses are rejected.
19
+ */
20
+ url: string;
21
+ };
22
+
23
+ /** @internal */
24
+ export type CreateAuditLogDestinationRequest$Outbound = {
25
+ display_name: string;
26
+ description?: string | undefined;
27
+ url: string;
28
+ };
29
+
30
+ /** @internal */
31
+ export const CreateAuditLogDestinationRequest$outboundSchema: z.ZodType<
32
+ CreateAuditLogDestinationRequest$Outbound,
33
+ z.ZodTypeDef,
34
+ CreateAuditLogDestinationRequest
35
+ > = z.object({
36
+ displayName: z.string(),
37
+ description: z.string().optional(),
38
+ url: z.string(),
39
+ }).transform((v) => {
40
+ return remap$(v, {
41
+ displayName: "display_name",
42
+ });
43
+ });
44
+
45
+ export function createAuditLogDestinationRequestToJSON(
46
+ createAuditLogDestinationRequest: CreateAuditLogDestinationRequest,
47
+ ): string {
48
+ return JSON.stringify(
49
+ CreateAuditLogDestinationRequest$outboundSchema.parse(
50
+ createAuditLogDestinationRequest,
51
+ ),
52
+ );
53
+ }
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ AuditLogDestination,
12
+ AuditLogDestination$inboundSchema,
13
+ } from "./auditlogdestination.js";
14
+
15
+ export type CreateAuditLogDestinationResponse = {
16
+ destination: AuditLogDestination;
17
+ /**
18
+ * Signing secret for verifying deliveries. Shown only in this response; store it securely.
19
+ */
20
+ signingSecret: string;
21
+ };
22
+
23
+ /** @internal */
24
+ export const CreateAuditLogDestinationResponse$inboundSchema: z.ZodType<
25
+ CreateAuditLogDestinationResponse,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ destination: AuditLogDestination$inboundSchema,
30
+ signing_secret: z.string(),
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "signing_secret": "signingSecret",
34
+ });
35
+ });
36
+
37
+ export function createAuditLogDestinationResponseFromJSON(
38
+ jsonString: string,
39
+ ): SafeParseResult<CreateAuditLogDestinationResponse, SDKValidationError> {
40
+ return safeParse(
41
+ jsonString,
42
+ (x) => CreateAuditLogDestinationResponse$inboundSchema.parse(JSON.parse(x)),
43
+ `Failed to parse 'CreateAuditLogDestinationResponse' from JSON`,
44
+ );
45
+ }
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type DeleteAuditLogDestinationResponse = {};
11
+
12
+ /** @internal */
13
+ export const DeleteAuditLogDestinationResponse$inboundSchema: z.ZodType<
14
+ DeleteAuditLogDestinationResponse,
15
+ z.ZodTypeDef,
16
+ unknown
17
+ > = z.object({});
18
+
19
+ export function deleteAuditLogDestinationResponseFromJSON(
20
+ jsonString: string,
21
+ ): SafeParseResult<DeleteAuditLogDestinationResponse, SDKValidationError> {
22
+ return safeParse(
23
+ jsonString,
24
+ (x) => DeleteAuditLogDestinationResponse$inboundSchema.parse(JSON.parse(x)),
25
+ `Failed to parse 'DeleteAuditLogDestinationResponse' from JSON`,
26
+ );
27
+ }
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type EffectiveUserPermissions = {
11
+ permissions?: Array<string> | undefined;
12
+ };
13
+
14
+ /** @internal */
15
+ export const EffectiveUserPermissions$inboundSchema: z.ZodType<
16
+ EffectiveUserPermissions,
17
+ z.ZodTypeDef,
18
+ unknown
19
+ > = z.object({
20
+ permissions: z.array(z.string()).optional(),
21
+ });
22
+
23
+ export function effectiveUserPermissionsFromJSON(
24
+ jsonString: string,
25
+ ): SafeParseResult<EffectiveUserPermissions, SDKValidationError> {
26
+ return safeParse(
27
+ jsonString,
28
+ (x) => EffectiveUserPermissions$inboundSchema.parse(JSON.parse(x)),
29
+ `Failed to parse 'EffectiveUserPermissions' from JSON`,
30
+ );
31
+ }
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ AuditLogDestination,
11
+ AuditLogDestination$inboundSchema,
12
+ } from "./auditlogdestination.js";
13
+
14
+ export type GetAuditLogDestinationResponse = {
15
+ destination: AuditLogDestination;
16
+ };
17
+
18
+ /** @internal */
19
+ export const GetAuditLogDestinationResponse$inboundSchema: z.ZodType<
20
+ GetAuditLogDestinationResponse,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ destination: AuditLogDestination$inboundSchema,
25
+ });
26
+
27
+ export function getAuditLogDestinationResponseFromJSON(
28
+ jsonString: string,
29
+ ): SafeParseResult<GetAuditLogDestinationResponse, SDKValidationError> {
30
+ return safeParse(
31
+ jsonString,
32
+ (x) => GetAuditLogDestinationResponse$inboundSchema.parse(JSON.parse(x)),
33
+ `Failed to parse 'GetAuditLogDestinationResponse' from JSON`,
34
+ );
35
+ }