@orq-ai/node 4.8.1 → 4.8.4

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 (199) hide show
  1. package/FUNCTIONS.md +2 -2
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +3 -3
  4. package/lib/config.js +3 -3
  5. package/lib/config.js.map +1 -1
  6. package/models/components/reasoningpart.js +1 -1
  7. package/models/operations/createcontact.js +1 -1
  8. package/models/operations/createdataset.js +1 -1
  9. package/models/operations/createdatasetitem.js +4 -4
  10. package/models/operations/createdatasource.js +1 -1
  11. package/models/operations/createeval.js +16 -16
  12. package/models/operations/createidentity.js +1 -1
  13. package/models/operations/createprompt.d.ts +1 -0
  14. package/models/operations/createprompt.d.ts.map +1 -1
  15. package/models/operations/createprompt.js +1 -0
  16. package/models/operations/createprompt.js.map +1 -1
  17. package/models/operations/createtool.js +6 -6
  18. package/models/operations/deploymentgetconfig.d.ts +1 -0
  19. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  20. package/models/operations/deploymentgetconfig.js +1 -0
  21. package/models/operations/deploymentgetconfig.js.map +1 -1
  22. package/models/operations/deployments.d.ts +1 -0
  23. package/models/operations/deployments.d.ts.map +1 -1
  24. package/models/operations/deployments.js +1 -0
  25. package/models/operations/deployments.js.map +1 -1
  26. package/models/operations/getallprompts.d.ts +1 -0
  27. package/models/operations/getallprompts.d.ts.map +1 -1
  28. package/models/operations/getallprompts.js +1 -0
  29. package/models/operations/getallprompts.js.map +1 -1
  30. package/models/operations/getalltools.js +6 -6
  31. package/models/operations/getevals.js +16 -16
  32. package/models/operations/getoneprompt.d.ts +1 -0
  33. package/models/operations/getoneprompt.d.ts.map +1 -1
  34. package/models/operations/getoneprompt.js +1 -0
  35. package/models/operations/getoneprompt.js.map +1 -1
  36. package/models/operations/getpromptversion.d.ts +1 -0
  37. package/models/operations/getpromptversion.d.ts.map +1 -1
  38. package/models/operations/getpromptversion.js +1 -0
  39. package/models/operations/getpromptversion.js.map +1 -1
  40. package/models/operations/getv2humanevalsets.js +2 -2
  41. package/models/operations/getv2humanevalsetsid.js +2 -2
  42. package/models/operations/listdatasetdatapoints.js +4 -4
  43. package/models/operations/listdatasets.js +1 -1
  44. package/models/operations/listdatasources.js +1 -1
  45. package/models/operations/listidentities.js +1 -1
  46. package/models/operations/listpromptversions.d.ts +1 -0
  47. package/models/operations/listpromptversions.d.ts.map +1 -1
  48. package/models/operations/listpromptversions.js +1 -0
  49. package/models/operations/listpromptversions.js.map +1 -1
  50. package/models/operations/patchv2humanevalsetsid.js +2 -2
  51. package/models/operations/policyupdate.d.ts +5 -0
  52. package/models/operations/policyupdate.d.ts.map +1 -1
  53. package/models/operations/policyupdate.js +2 -0
  54. package/models/operations/policyupdate.js.map +1 -1
  55. package/models/operations/postv2feedbackevaluation.js +3 -3
  56. package/models/operations/postv2humanevalsets.js +2 -2
  57. package/models/operations/retrievedatapoint.js +4 -4
  58. package/models/operations/retrievedataset.js +1 -1
  59. package/models/operations/retrievedatasource.js +1 -1
  60. package/models/operations/retrieveidentity.js +1 -1
  61. package/models/operations/retrievetool.js +6 -6
  62. package/models/operations/runagent.js +1 -1
  63. package/models/operations/streamrunagent.js +1 -1
  64. package/models/operations/updatedatapoint.js +4 -4
  65. package/models/operations/updatedataset.js +1 -1
  66. package/models/operations/updatedatasource.js +1 -1
  67. package/models/operations/updateeval.js +16 -16
  68. package/models/operations/updateidentity.js +1 -1
  69. package/models/operations/updateprompt.d.ts +1 -0
  70. package/models/operations/updateprompt.d.ts.map +1 -1
  71. package/models/operations/updateprompt.js +1 -0
  72. package/models/operations/updateprompt.js.map +1 -1
  73. package/models/operations/updatetool.js +7 -7
  74. package/package.json +6 -6
  75. package/packages/orq-rc/src/funcs/filesCreate.ts +13 -48
  76. package/packages/orq-rc/src/funcs/filesDelete.ts +8 -8
  77. package/packages/orq-rc/src/funcs/filesGet.ts +6 -5
  78. package/packages/orq-rc/src/funcs/filesGetContent.ts +9 -9
  79. package/packages/orq-rc/src/funcs/filesList.ts +6 -5
  80. package/packages/orq-rc/src/funcs/filesUpdate.ts +8 -7
  81. package/packages/orq-rc/src/funcs/skillsCreate.ts +162 -0
  82. package/packages/orq-rc/src/funcs/skillsDelete.ts +165 -0
  83. package/packages/orq-rc/src/funcs/skillsGet.ts +168 -0
  84. package/packages/orq-rc/src/funcs/skillsList.ts +170 -0
  85. package/packages/orq-rc/src/funcs/skillsUpdate.ts +171 -0
  86. package/packages/orq-rc/src/lib/config.ts +3 -3
  87. package/packages/orq-rc/src/models/components/createfilerequest.ts +45 -0
  88. package/packages/orq-rc/src/models/components/createfileresponse.ts +32 -0
  89. package/packages/orq-rc/src/models/components/createskillrequest.ts +55 -0
  90. package/packages/orq-rc/src/models/components/createskillresponse.ts +32 -0
  91. package/packages/orq-rc/src/models/components/deletefileresponse.ts +27 -0
  92. package/packages/orq-rc/src/models/components/deleteskillresponse.ts +27 -0
  93. package/packages/orq-rc/src/models/components/file.ts +48 -0
  94. package/packages/orq-rc/src/models/components/filepart.ts +21 -16
  95. package/packages/orq-rc/src/models/components/getfilecontentresponse.ts +36 -0
  96. package/packages/orq-rc/src/models/components/getfileresponse.ts +32 -0
  97. package/packages/orq-rc/src/models/components/getskillresponse.ts +32 -0
  98. package/packages/orq-rc/src/models/components/index.ts +17 -1
  99. package/packages/orq-rc/src/models/components/listfilesresponse.ts +41 -0
  100. package/packages/orq-rc/src/models/components/listskillsresponse.ts +41 -0
  101. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  102. package/packages/orq-rc/src/models/components/skill.ts +77 -0
  103. package/packages/orq-rc/src/models/components/updatefilerequest.ts +40 -0
  104. package/packages/orq-rc/src/models/components/updatefileresponse.ts +32 -0
  105. package/packages/orq-rc/src/models/components/updateskillrequest.ts +55 -0
  106. package/packages/orq-rc/src/models/components/updateskillresponse.ts +32 -0
  107. package/packages/orq-rc/src/models/operations/createagentrequest.ts +11 -0
  108. package/packages/orq-rc/src/models/operations/createcontact.ts +1 -1
  109. package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
  110. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +4 -4
  111. package/packages/orq-rc/src/models/operations/createdatasource.ts +1 -1
  112. package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
  113. package/packages/orq-rc/src/models/operations/createidentity.ts +1 -1
  114. package/packages/orq-rc/src/models/operations/createtool.ts +6 -6
  115. package/packages/orq-rc/src/models/operations/filecontent.ts +0 -3
  116. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -3
  117. package/packages/orq-rc/src/models/operations/fileget.ts +0 -48
  118. package/packages/orq-rc/src/models/operations/filelist.ts +2 -46
  119. package/packages/orq-rc/src/models/operations/fileupdate.ts +5 -82
  120. package/packages/orq-rc/src/models/operations/getalltools.ts +6 -6
  121. package/packages/orq-rc/src/models/operations/getevals.ts +16 -16
  122. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
  123. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  124. package/packages/orq-rc/src/models/operations/index.ts +4 -1
  125. package/packages/orq-rc/src/models/operations/invokeeval.ts +5 -2
  126. package/packages/orq-rc/src/models/operations/listagents.ts +5 -0
  127. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +4 -4
  128. package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
  129. package/packages/orq-rc/src/models/operations/listdatasources.ts +1 -1
  130. package/packages/orq-rc/src/models/operations/listidentities.ts +1 -1
  131. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  132. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +3 -3
  133. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  134. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +5 -0
  135. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +4 -4
  136. package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
  137. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +1 -1
  138. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +1 -1
  139. package/packages/orq-rc/src/models/operations/retrievetool.ts +6 -6
  140. package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
  141. package/packages/orq-rc/src/models/operations/skilldelete.ts +36 -0
  142. package/packages/orq-rc/src/models/operations/skillget.ts +40 -0
  143. package/packages/orq-rc/src/models/operations/skilllist.ts +49 -0
  144. package/packages/orq-rc/src/models/operations/skillupdate.ts +41 -0
  145. package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
  146. package/packages/orq-rc/src/models/operations/updateagent.ts +20 -31
  147. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +4 -4
  148. package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
  149. package/packages/orq-rc/src/models/operations/updatedatasource.ts +1 -1
  150. package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
  151. package/packages/orq-rc/src/models/operations/updateidentity.ts +1 -1
  152. package/packages/orq-rc/src/models/operations/updatetool.ts +7 -7
  153. package/packages/orq-rc/src/sdk/files.ts +22 -21
  154. package/packages/orq-rc/src/sdk/sdk.ts +11 -5
  155. package/packages/orq-rc/src/sdk/skills.ts +97 -0
  156. package/src/lib/config.ts +3 -3
  157. package/src/models/components/reasoningpart.ts +1 -1
  158. package/src/models/operations/createcontact.ts +1 -1
  159. package/src/models/operations/createdataset.ts +1 -1
  160. package/src/models/operations/createdatasetitem.ts +4 -4
  161. package/src/models/operations/createdatasource.ts +1 -1
  162. package/src/models/operations/createeval.ts +16 -16
  163. package/src/models/operations/createidentity.ts +1 -1
  164. package/src/models/operations/createprompt.ts +1 -0
  165. package/src/models/operations/createtool.ts +6 -6
  166. package/src/models/operations/deploymentgetconfig.ts +1 -0
  167. package/src/models/operations/deployments.ts +1 -0
  168. package/src/models/operations/getallprompts.ts +1 -0
  169. package/src/models/operations/getalltools.ts +6 -6
  170. package/src/models/operations/getevals.ts +16 -16
  171. package/src/models/operations/getoneprompt.ts +1 -0
  172. package/src/models/operations/getpromptversion.ts +1 -0
  173. package/src/models/operations/getv2humanevalsets.ts +2 -2
  174. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  175. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  176. package/src/models/operations/listdatasets.ts +1 -1
  177. package/src/models/operations/listdatasources.ts +1 -1
  178. package/src/models/operations/listidentities.ts +1 -1
  179. package/src/models/operations/listpromptversions.ts +1 -0
  180. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  181. package/src/models/operations/policyupdate.ts +7 -0
  182. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  183. package/src/models/operations/postv2humanevalsets.ts +2 -2
  184. package/src/models/operations/retrievedatapoint.ts +4 -4
  185. package/src/models/operations/retrievedataset.ts +1 -1
  186. package/src/models/operations/retrievedatasource.ts +1 -1
  187. package/src/models/operations/retrieveidentity.ts +1 -1
  188. package/src/models/operations/retrievetool.ts +6 -6
  189. package/src/models/operations/runagent.ts +1 -1
  190. package/src/models/operations/streamrunagent.ts +1 -1
  191. package/src/models/operations/updatedatapoint.ts +4 -4
  192. package/src/models/operations/updatedataset.ts +1 -1
  193. package/src/models/operations/updatedatasource.ts +1 -1
  194. package/src/models/operations/updateeval.ts +16 -16
  195. package/src/models/operations/updateidentity.ts +1 -1
  196. package/src/models/operations/updateprompt.ts +1 -0
  197. package/src/models/operations/updatetool.ts +7 -7
  198. package/packages/orq-rc/src/models/components/filedocument.ts +0 -48
  199. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -135
@@ -0,0 +1,170 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { OrqCore } from "../core.js";
6
+ import { encodeFormQuery } 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 { OrqError } from "../models/errors/orqerror.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * List all skills
31
+ *
32
+ * @remarks
33
+ * Returns a list of skills. Skills are sorted by creation date, with the most recently created skills appearing first.
34
+ */
35
+ export function skillsList(
36
+ client: OrqCore,
37
+ request?: operations.SkillListRequest | undefined,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ components.ListSkillsResponse,
42
+ | OrqError
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: OrqCore,
61
+ request?: operations.SkillListRequest | undefined,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ components.ListSkillsResponse,
67
+ | OrqError
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.SkillListRequest$outboundSchema.optional().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 path = pathToFunc("/v2/skills")();
92
+
93
+ const query = encodeFormQuery({
94
+ "ending_before": payload?.ending_before,
95
+ "limit": payload?.limit,
96
+ "starting_after": payload?.starting_after,
97
+ });
98
+
99
+ const headers = new Headers(compactMap({
100
+ Accept: "application/json",
101
+ }));
102
+
103
+ const secConfig = await extractSecurity(client._options.apiKey);
104
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
105
+ const requestSecurity = resolveGlobalSecurity(securityInput);
106
+
107
+ const context = {
108
+ options: client._options,
109
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
110
+ operationID: "SkillList",
111
+ oAuth2Scopes: null,
112
+
113
+ resolvedSecurity: requestSecurity,
114
+
115
+ securitySource: client._options.apiKey,
116
+ retryConfig: options?.retries
117
+ || client._options.retryConfig
118
+ || { strategy: "none" },
119
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
120
+ };
121
+
122
+ const requestRes = client._createRequest(context, {
123
+ security: requestSecurity,
124
+ method: "GET",
125
+ baseURL: options?.serverURL,
126
+ path: path,
127
+ headers: headers,
128
+ query: query,
129
+ body: body,
130
+ userAgent: client._options.userAgent,
131
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
132
+ }, options);
133
+ if (!requestRes.ok) {
134
+ return [requestRes, { status: "invalid" }];
135
+ }
136
+ const req = requestRes.value;
137
+
138
+ const doResult = await client._do(req, {
139
+ context,
140
+ isErrorStatusCode: (statusCode: number) =>
141
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
142
+ retryConfig: context.retryConfig,
143
+ retryCodes: context.retryCodes,
144
+ });
145
+ if (!doResult.ok) {
146
+ return [doResult, { status: "request-error", request: req }];
147
+ }
148
+ const response = doResult.value;
149
+
150
+ const [result] = await M.match<
151
+ components.ListSkillsResponse,
152
+ | OrqError
153
+ | ResponseValidationError
154
+ | ConnectionError
155
+ | RequestAbortedError
156
+ | RequestTimeoutError
157
+ | InvalidRequestError
158
+ | UnexpectedClientError
159
+ | SDKValidationError
160
+ >(
161
+ M.json(200, components.ListSkillsResponse$inboundSchema),
162
+ M.fail("4XX"),
163
+ M.fail("5XX"),
164
+ )(response, req);
165
+ if (!result.ok) {
166
+ return [result, { status: "complete", request: req, response }];
167
+ }
168
+
169
+ return [result, { status: "complete", request: req, response }];
170
+ }
@@ -0,0 +1,171 @@
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 { OrqError } from "../models/errors/orqerror.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Update a skill
31
+ *
32
+ * @remarks
33
+ * Updates the specified skill by setting the values of the parameters passed.
34
+ */
35
+ export function skillsUpdate(
36
+ client: OrqCore,
37
+ request: operations.SkillUpdateRequest,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ components.UpdateSkillResponse,
42
+ | OrqError
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: OrqCore,
61
+ request: operations.SkillUpdateRequest,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ components.UpdateSkillResponse,
67
+ | OrqError
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) => operations.SkillUpdateRequest$outboundSchema.parse(value),
82
+ "Input validation failed",
83
+ );
84
+ if (!parsed.ok) {
85
+ return [parsed, { status: "invalid" }];
86
+ }
87
+ const payload = parsed.value;
88
+ const body = encodeJSON("body", payload.UpdateSkillRequest, {
89
+ explode: true,
90
+ });
91
+
92
+ const pathParams = {
93
+ skill_id: encodeSimple("skill_id", payload.skill_id, {
94
+ explode: false,
95
+ charEncoding: "percent",
96
+ }),
97
+ };
98
+ const path = pathToFunc("/v2/skills/{skill_id}")(pathParams);
99
+
100
+ const headers = new Headers(compactMap({
101
+ "Content-Type": "application/json",
102
+ Accept: "application/json",
103
+ }));
104
+
105
+ const secConfig = await extractSecurity(client._options.apiKey);
106
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
107
+ const requestSecurity = resolveGlobalSecurity(securityInput);
108
+
109
+ const context = {
110
+ options: client._options,
111
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
112
+ operationID: "SkillUpdate",
113
+ oAuth2Scopes: null,
114
+
115
+ resolvedSecurity: requestSecurity,
116
+
117
+ securitySource: client._options.apiKey,
118
+ retryConfig: options?.retries
119
+ || client._options.retryConfig
120
+ || { strategy: "none" },
121
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
122
+ };
123
+
124
+ const requestRes = client._createRequest(context, {
125
+ security: requestSecurity,
126
+ method: "PATCH",
127
+ baseURL: options?.serverURL,
128
+ path: path,
129
+ headers: headers,
130
+ body: body,
131
+ userAgent: client._options.userAgent,
132
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
133
+ }, options);
134
+ if (!requestRes.ok) {
135
+ return [requestRes, { status: "invalid" }];
136
+ }
137
+ const req = requestRes.value;
138
+
139
+ const doResult = await client._do(req, {
140
+ context,
141
+ isErrorStatusCode: (statusCode: number) =>
142
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
143
+ retryConfig: context.retryConfig,
144
+ retryCodes: context.retryCodes,
145
+ });
146
+ if (!doResult.ok) {
147
+ return [doResult, { status: "request-error", request: req }];
148
+ }
149
+ const response = doResult.value;
150
+
151
+ const [result] = await M.match<
152
+ components.UpdateSkillResponse,
153
+ | OrqError
154
+ | ResponseValidationError
155
+ | ConnectionError
156
+ | RequestAbortedError
157
+ | RequestTimeoutError
158
+ | InvalidRequestError
159
+ | UnexpectedClientError
160
+ | SDKValidationError
161
+ >(
162
+ M.json(200, components.UpdateSkillResponse$inboundSchema),
163
+ M.fail("4XX"),
164
+ M.fail("5XX"),
165
+ )(response, req);
166
+ if (!result.ok) {
167
+ return [result, { status: "complete", request: req, response }];
168
+ }
169
+
170
+ return [result, { status: "complete", request: req, response }];
171
+ }
@@ -68,7 +68,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
68
68
  export const SDK_METADATA = {
69
69
  language: "typescript",
70
70
  openapiDocVersion: "2.0",
71
- sdkVersion: "4.9.0-rc.4",
72
- genVersion: "2.881.4",
73
- userAgent: "speakeasy-sdk/typescript 4.9.0-rc.4 2.881.4 2.0 @orq-ai/node",
71
+ sdkVersion: "4.9.0-rc.13",
72
+ genVersion: "2.881.16",
73
+ userAgent: "speakeasy-sdk/typescript 4.9.0-rc.13 2.881.16 2.0 @orq-ai/node",
74
74
  } as const;
@@ -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
+
8
+ export type CreateFileRequest = {
9
+ filename?: string | undefined;
10
+ content?: string | undefined;
11
+ purpose?: number | undefined;
12
+ contentType?: string | undefined;
13
+ };
14
+
15
+ /** @internal */
16
+ export type CreateFileRequest$Outbound = {
17
+ filename?: string | undefined;
18
+ content?: string | undefined;
19
+ purpose?: number | undefined;
20
+ content_type?: string | undefined;
21
+ };
22
+
23
+ /** @internal */
24
+ export const CreateFileRequest$outboundSchema: z.ZodType<
25
+ CreateFileRequest$Outbound,
26
+ z.ZodTypeDef,
27
+ CreateFileRequest
28
+ > = z.object({
29
+ filename: z.string().optional(),
30
+ content: z.string().optional(),
31
+ purpose: z.number().int().optional(),
32
+ contentType: z.string().optional(),
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ contentType: "content_type",
36
+ });
37
+ });
38
+
39
+ export function createFileRequestToJSON(
40
+ createFileRequest: CreateFileRequest,
41
+ ): string {
42
+ return JSON.stringify(
43
+ CreateFileRequest$outboundSchema.parse(createFileRequest),
44
+ );
45
+ }
@@ -0,0 +1,32 @@
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 { FileT, FileT$inboundSchema } from "./file.js";
10
+
11
+ export type CreateFileResponse = {
12
+ file?: FileT | undefined;
13
+ };
14
+
15
+ /** @internal */
16
+ export const CreateFileResponse$inboundSchema: z.ZodType<
17
+ CreateFileResponse,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ file: FileT$inboundSchema.optional(),
22
+ });
23
+
24
+ export function createFileResponseFromJSON(
25
+ jsonString: string,
26
+ ): SafeParseResult<CreateFileResponse, SDKValidationError> {
27
+ return safeParse(
28
+ jsonString,
29
+ (x) => CreateFileResponse$inboundSchema.parse(JSON.parse(x)),
30
+ `Failed to parse 'CreateFileResponse' from JSON`,
31
+ );
32
+ }
@@ -0,0 +1,55 @@
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 CreateSkillRequest = {
9
+ displayName?: string | undefined;
10
+ description?: string | undefined;
11
+ enabled?: boolean | undefined;
12
+ tags?: Array<string> | undefined;
13
+ path?: string | undefined;
14
+ projectId?: string | undefined;
15
+ instructions?: string | undefined;
16
+ };
17
+
18
+ /** @internal */
19
+ export type CreateSkillRequest$Outbound = {
20
+ display_name?: string | undefined;
21
+ description?: string | undefined;
22
+ enabled?: boolean | undefined;
23
+ tags?: Array<string> | undefined;
24
+ path?: string | undefined;
25
+ project_id?: string | undefined;
26
+ instructions?: string | undefined;
27
+ };
28
+
29
+ /** @internal */
30
+ export const CreateSkillRequest$outboundSchema: z.ZodType<
31
+ CreateSkillRequest$Outbound,
32
+ z.ZodTypeDef,
33
+ CreateSkillRequest
34
+ > = z.object({
35
+ displayName: z.string().optional(),
36
+ description: z.string().optional(),
37
+ enabled: z.boolean().optional(),
38
+ tags: z.array(z.string()).optional(),
39
+ path: z.string().optional(),
40
+ projectId: z.string().optional(),
41
+ instructions: z.string().optional(),
42
+ }).transform((v) => {
43
+ return remap$(v, {
44
+ displayName: "display_name",
45
+ projectId: "project_id",
46
+ });
47
+ });
48
+
49
+ export function createSkillRequestToJSON(
50
+ createSkillRequest: CreateSkillRequest,
51
+ ): string {
52
+ return JSON.stringify(
53
+ CreateSkillRequest$outboundSchema.parse(createSkillRequest),
54
+ );
55
+ }
@@ -0,0 +1,32 @@
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 { Skill, Skill$inboundSchema } from "./skill.js";
10
+
11
+ export type CreateSkillResponse = {
12
+ skill?: Skill | undefined;
13
+ };
14
+
15
+ /** @internal */
16
+ export const CreateSkillResponse$inboundSchema: z.ZodType<
17
+ CreateSkillResponse,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ skill: Skill$inboundSchema.optional(),
22
+ });
23
+
24
+ export function createSkillResponseFromJSON(
25
+ jsonString: string,
26
+ ): SafeParseResult<CreateSkillResponse, SDKValidationError> {
27
+ return safeParse(
28
+ jsonString,
29
+ (x) => CreateSkillResponse$inboundSchema.parse(JSON.parse(x)),
30
+ `Failed to parse 'CreateSkillResponse' from JSON`,
31
+ );
32
+ }
@@ -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 DeleteFileResponse = {};
11
+
12
+ /** @internal */
13
+ export const DeleteFileResponse$inboundSchema: z.ZodType<
14
+ DeleteFileResponse,
15
+ z.ZodTypeDef,
16
+ unknown
17
+ > = z.object({});
18
+
19
+ export function deleteFileResponseFromJSON(
20
+ jsonString: string,
21
+ ): SafeParseResult<DeleteFileResponse, SDKValidationError> {
22
+ return safeParse(
23
+ jsonString,
24
+ (x) => DeleteFileResponse$inboundSchema.parse(JSON.parse(x)),
25
+ `Failed to parse 'DeleteFileResponse' from JSON`,
26
+ );
27
+ }
@@ -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 DeleteSkillResponse = {};
11
+
12
+ /** @internal */
13
+ export const DeleteSkillResponse$inboundSchema: z.ZodType<
14
+ DeleteSkillResponse,
15
+ z.ZodTypeDef,
16
+ unknown
17
+ > = z.object({});
18
+
19
+ export function deleteSkillResponseFromJSON(
20
+ jsonString: string,
21
+ ): SafeParseResult<DeleteSkillResponse, SDKValidationError> {
22
+ return safeParse(
23
+ jsonString,
24
+ (x) => DeleteSkillResponse$inboundSchema.parse(JSON.parse(x)),
25
+ `Failed to parse 'DeleteSkillResponse' from JSON`,
26
+ );
27
+ }
@@ -0,0 +1,48 @@
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
+
11
+ export type FileT = {
12
+ fileId?: string | undefined;
13
+ purpose?: number | undefined;
14
+ fileName?: string | undefined;
15
+ workspaceId?: string | undefined;
16
+ bytes?: string | undefined;
17
+ createdAt?: Date | undefined;
18
+ };
19
+
20
+ /** @internal */
21
+ export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
22
+ .object({
23
+ file_id: z.string().optional(),
24
+ purpose: z.number().int().optional(),
25
+ file_name: z.string().optional(),
26
+ workspace_id: z.string().optional(),
27
+ bytes: z.string().optional(),
28
+ created_at: z.string().datetime({ offset: true }).transform(v =>
29
+ new Date(v)
30
+ ).optional(),
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "file_id": "fileId",
34
+ "file_name": "fileName",
35
+ "workspace_id": "workspaceId",
36
+ "created_at": "createdAt",
37
+ });
38
+ });
39
+
40
+ export function fileFromJSON(
41
+ jsonString: string,
42
+ ): SafeParseResult<FileT, SDKValidationError> {
43
+ return safeParse(
44
+ jsonString,
45
+ (x) => FileT$inboundSchema.parse(JSON.parse(x)),
46
+ `Failed to parse 'FileT' from JSON`,
47
+ );
48
+ }
@@ -43,7 +43,7 @@ export type BinaryFormat = {
43
43
  name?: string | undefined;
44
44
  };
45
45
 
46
- export type FileT = BinaryFormat | FileInURIFormat;
46
+ export type FilePartFile = BinaryFormat | FileInURIFormat;
47
47
 
48
48
  /**
49
49
  * File attachment part. Use this to send files (images, documents, etc.) to the agent for processing.
@@ -139,34 +139,39 @@ export function binaryFormatFromJSON(
139
139
  }
140
140
 
141
141
  /** @internal */
142
- export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
143
- .union([
144
- z.lazy(() => BinaryFormat$inboundSchema),
145
- z.lazy(() => FileInURIFormat$inboundSchema),
146
- ]);
142
+ export const FilePartFile$inboundSchema: z.ZodType<
143
+ FilePartFile,
144
+ z.ZodTypeDef,
145
+ unknown
146
+ > = z.union([
147
+ z.lazy(() => BinaryFormat$inboundSchema),
148
+ z.lazy(() => FileInURIFormat$inboundSchema),
149
+ ]);
147
150
  /** @internal */
148
- export type FileT$Outbound = BinaryFormat$Outbound | FileInURIFormat$Outbound;
151
+ export type FilePartFile$Outbound =
152
+ | BinaryFormat$Outbound
153
+ | FileInURIFormat$Outbound;
149
154
 
150
155
  /** @internal */
151
- export const FileT$outboundSchema: z.ZodType<
152
- FileT$Outbound,
156
+ export const FilePartFile$outboundSchema: z.ZodType<
157
+ FilePartFile$Outbound,
153
158
  z.ZodTypeDef,
154
- FileT
159
+ FilePartFile
155
160
  > = z.union([
156
161
  z.lazy(() => BinaryFormat$outboundSchema),
157
162
  z.lazy(() => FileInURIFormat$outboundSchema),
158
163
  ]);
159
164
 
160
- export function fileToJSON(fileT: FileT): string {
161
- return JSON.stringify(FileT$outboundSchema.parse(fileT));
165
+ export function filePartFileToJSON(filePartFile: FilePartFile): string {
166
+ return JSON.stringify(FilePartFile$outboundSchema.parse(filePartFile));
162
167
  }
163
- export function fileFromJSON(
168
+ export function filePartFileFromJSON(
164
169
  jsonString: string,
165
- ): SafeParseResult<FileT, SDKValidationError> {
170
+ ): SafeParseResult<FilePartFile, SDKValidationError> {
166
171
  return safeParse(
167
172
  jsonString,
168
- (x) => FileT$inboundSchema.parse(JSON.parse(x)),
169
- `Failed to parse 'FileT' from JSON`,
173
+ (x) => FilePartFile$inboundSchema.parse(JSON.parse(x)),
174
+ `Failed to parse 'FilePartFile' from JSON`,
170
175
  );
171
176
  }
172
177