@orq-ai/node 4.14.0 → 4.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/evaluatorresponsefunction.js +2 -2
  5. package/models/components/evaluatorresponsehttp.js +2 -2
  6. package/models/components/evaluatorresponsejsonschema.js +2 -2
  7. package/models/components/evaluatorresponsellm.js +2 -2
  8. package/models/components/evaluatorresponsepython.js +2 -2
  9. package/models/components/evaluatorresponseragas.js +2 -2
  10. package/models/components/evaluatorresponsetypescript.js +2 -2
  11. package/models/components/reasoningpart.js +1 -1
  12. package/models/operations/createannotationqueue.js +1 -1
  13. package/models/operations/createdataset.js +1 -1
  14. package/models/operations/createdatasetitem.js +5 -5
  15. package/models/operations/createtool.js +4 -4
  16. package/models/operations/getalltools.js +4 -4
  17. package/models/operations/geteval.js +16 -16
  18. package/models/operations/getv2humanevalsets.js +2 -2
  19. package/models/operations/getv2humanevalsetsid.js +2 -2
  20. package/models/operations/listannotationqueues.js +1 -1
  21. package/models/operations/listdatasetdatapoints.js +5 -5
  22. package/models/operations/listdatasets.js +1 -1
  23. package/models/operations/patchv2humanevalsetsid.js +2 -2
  24. package/models/operations/postv2feedbackevaluation.js +4 -4
  25. package/models/operations/postv2humanevalsets.js +2 -2
  26. package/models/operations/retrieveannotationqueue.js +1 -1
  27. package/models/operations/retrievedatapoint.js +5 -5
  28. package/models/operations/retrievedataset.js +1 -1
  29. package/models/operations/retrievetool.js +4 -4
  30. package/models/operations/runagent.js +1 -1
  31. package/models/operations/streamrunagent.js +1 -1
  32. package/models/operations/updateannotationqueue.js +1 -1
  33. package/models/operations/updatedatapoint.js +5 -5
  34. package/models/operations/updatedataset.js +1 -1
  35. package/models/operations/updatetool.js +4 -4
  36. package/package.json +1 -1
  37. package/packages/orq-rc/src/funcs/{mcpServersTest.ts → fileSystemsCreate.ts} +13 -13
  38. package/packages/orq-rc/src/funcs/fileSystemsCreateFolder.ts +173 -0
  39. package/packages/orq-rc/src/funcs/fileSystemsDelete.ts +169 -0
  40. package/packages/orq-rc/src/funcs/fileSystemsDeleteFile.ts +183 -0
  41. package/packages/orq-rc/src/funcs/fileSystemsList.ts +172 -0
  42. package/packages/orq-rc/src/funcs/fileSystemsListFiles.ts +177 -0
  43. package/packages/orq-rc/src/funcs/fileSystemsMoveFile.ts +173 -0
  44. package/packages/orq-rc/src/funcs/fileSystemsRetrieve.ts +168 -0
  45. package/packages/orq-rc/src/funcs/fileSystemsStatFile.ts +175 -0
  46. package/packages/orq-rc/src/funcs/fileSystemsUpdate.ts +171 -0
  47. package/packages/orq-rc/src/lib/config.ts +2 -2
  48. package/packages/orq-rc/src/models/components/agenttoolinputcrud.ts +8 -0
  49. package/packages/orq-rc/src/models/components/createfilesystemfolderrequest.ts +36 -0
  50. package/packages/orq-rc/src/models/components/createfilesystemfolderresponse.ts +31 -0
  51. package/packages/orq-rc/src/models/components/createfilesystemrequest.ts +94 -0
  52. package/packages/orq-rc/src/models/components/deletefilesystemfileresponse.ts +49 -0
  53. package/packages/orq-rc/src/models/components/deletefilesystemresponse.ts +27 -0
  54. package/packages/orq-rc/src/models/components/evaluatorresponsefunction.ts +2 -2
  55. package/packages/orq-rc/src/models/components/evaluatorresponsehttp.ts +2 -2
  56. package/packages/orq-rc/src/models/components/evaluatorresponsejsonschema.ts +2 -2
  57. package/packages/orq-rc/src/models/components/evaluatorresponsellm.ts +2 -2
  58. package/packages/orq-rc/src/models/components/evaluatorresponsepython.ts +2 -2
  59. package/packages/orq-rc/src/models/components/evaluatorresponseragas.ts +2 -2
  60. package/packages/orq-rc/src/models/components/evaluatorresponsetypescript.ts +2 -2
  61. package/packages/orq-rc/src/models/components/fileentry.ts +86 -0
  62. package/packages/orq-rc/src/models/components/filesystem.ts +116 -0
  63. package/packages/orq-rc/src/models/components/filesystemexternalaccess.ts +20 -0
  64. package/packages/orq-rc/src/models/components/filesystemtoolinput.ts +51 -0
  65. package/packages/orq-rc/src/models/components/index.ts +16 -3
  66. package/packages/orq-rc/src/models/components/knowledgebasesservicelistresponse.ts +9 -6
  67. package/packages/orq-rc/src/models/components/listfilesystemfilesresponse.ts +57 -0
  68. package/packages/orq-rc/src/models/components/listfilesystemsresponse.ts +51 -0
  69. package/packages/orq-rc/src/models/components/mcpaccess.ts +13 -0
  70. package/packages/orq-rc/src/models/components/movefilesystemfilerequest.ts +40 -0
  71. package/packages/orq-rc/src/models/components/movefilesystemfileresponse.ts +33 -0
  72. package/packages/orq-rc/src/models/components/orqsidekicktool.ts +22 -5
  73. package/packages/orq-rc/src/models/components/publicusage.ts +7 -0
  74. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  75. package/packages/orq-rc/src/models/components/servertoolusedetails.ts +63 -0
  76. package/packages/orq-rc/src/models/components/statfilesystemfileresponse.ts +63 -0
  77. package/packages/orq-rc/src/models/components/updatefilesystemrequest.ts +83 -0
  78. package/packages/orq-rc/src/models/operations/createannotationqueue.ts +1 -1
  79. package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
  80. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +5 -5
  81. package/packages/orq-rc/src/models/operations/createfolder.ts +43 -0
  82. package/packages/orq-rc/src/models/operations/createrouterresponse.ts +139 -9
  83. package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
  84. package/packages/orq-rc/src/models/operations/deletefile.ts +42 -0
  85. package/packages/orq-rc/src/models/operations/deletefilesystem.ts +36 -0
  86. package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
  87. package/packages/orq-rc/src/models/operations/geteval.ts +16 -16
  88. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
  89. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  90. package/packages/orq-rc/src/models/operations/index.ts +9 -0
  91. package/packages/orq-rc/src/models/operations/listannotationqueues.ts +1 -1
  92. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +5 -5
  93. package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
  94. package/packages/orq-rc/src/models/operations/listfiles.ts +46 -0
  95. package/packages/orq-rc/src/models/operations/listfilesystems.ts +50 -0
  96. package/packages/orq-rc/src/models/operations/movefile.ts +40 -0
  97. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +4 -4
  99. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  100. package/packages/orq-rc/src/models/operations/retrieveannotationqueue.ts +1 -1
  101. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +5 -5
  102. package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
  103. package/packages/orq-rc/src/models/operations/retrievefilesystem.ts +36 -0
  104. package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
  105. package/packages/orq-rc/src/models/operations/runagent.ts +15 -9
  106. package/packages/orq-rc/src/models/operations/statfile.ts +37 -0
  107. package/packages/orq-rc/src/models/operations/streamrunagent.ts +15 -9
  108. package/packages/orq-rc/src/models/operations/updateannotationqueue.ts +1 -1
  109. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +5 -5
  110. package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
  111. package/packages/orq-rc/src/models/operations/updatefilesystem.ts +41 -0
  112. package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
  113. package/packages/orq-rc/src/sdk/filesystems.ts +190 -0
  114. package/packages/orq-rc/src/sdk/mcpservers.ts +0 -18
  115. package/packages/orq-rc/src/sdk/sdk.ts +6 -0
  116. package/src/lib/config.ts +2 -2
  117. package/src/models/components/evaluatorresponsefunction.ts +2 -2
  118. package/src/models/components/evaluatorresponsehttp.ts +2 -2
  119. package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
  120. package/src/models/components/evaluatorresponsellm.ts +2 -2
  121. package/src/models/components/evaluatorresponsepython.ts +2 -2
  122. package/src/models/components/evaluatorresponseragas.ts +2 -2
  123. package/src/models/components/evaluatorresponsetypescript.ts +2 -2
  124. package/src/models/components/reasoningpart.ts +1 -1
  125. package/src/models/operations/createannotationqueue.ts +1 -1
  126. package/src/models/operations/createdataset.ts +1 -1
  127. package/src/models/operations/createdatasetitem.ts +5 -5
  128. package/src/models/operations/createtool.ts +4 -4
  129. package/src/models/operations/getalltools.ts +4 -4
  130. package/src/models/operations/geteval.ts +16 -16
  131. package/src/models/operations/getv2humanevalsets.ts +2 -2
  132. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  133. package/src/models/operations/listannotationqueues.ts +1 -1
  134. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  135. package/src/models/operations/listdatasets.ts +1 -1
  136. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  137. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  138. package/src/models/operations/postv2humanevalsets.ts +2 -2
  139. package/src/models/operations/retrieveannotationqueue.ts +1 -1
  140. package/src/models/operations/retrievedatapoint.ts +5 -5
  141. package/src/models/operations/retrievedataset.ts +1 -1
  142. package/src/models/operations/retrievetool.ts +4 -4
  143. package/src/models/operations/runagent.ts +1 -1
  144. package/src/models/operations/streamrunagent.ts +1 -1
  145. package/src/models/operations/updateannotationqueue.ts +1 -1
  146. package/src/models/operations/updatedatapoint.ts +5 -5
  147. package/src/models/operations/updatedataset.ts +1 -1
  148. package/src/models/operations/updatetool.ts +4 -4
  149. package/packages/orq-rc/src/models/components/mcptestresult.ts +0 -61
  150. package/packages/orq-rc/src/models/components/testmcpserverrequest.ts +0 -67
  151. package/packages/orq-rc/src/models/components/testmcpserverresponse.ts +0 -32
@@ -0,0 +1,168 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { OrqCore } 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 * 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
+ * Retrieve file system
31
+ *
32
+ * @remarks
33
+ * Retrieves detailed information about a specific file system, including its quota and external access configuration.
34
+ */
35
+ export function fileSystemsRetrieve(
36
+ client: OrqCore,
37
+ request: operations.RetrieveFileSystemRequest,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ components.FileSystem,
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.RetrieveFileSystemRequest,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ components.FileSystem,
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.RetrieveFileSystemRequest$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 = null;
89
+
90
+ const pathParams = {
91
+ file_system_key: encodeSimple("file_system_key", payload.file_system_key, {
92
+ explode: false,
93
+ charEncoding: "percent",
94
+ }),
95
+ };
96
+ const path = pathToFunc("/v2/file-systems/{file_system_key}")(pathParams);
97
+
98
+ const headers = new Headers(compactMap({
99
+ Accept: "application/json",
100
+ }));
101
+
102
+ const secConfig = await extractSecurity(client._options.apiKey);
103
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
104
+ const requestSecurity = resolveGlobalSecurity(securityInput);
105
+
106
+ const context = {
107
+ options: client._options,
108
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
109
+ operationID: "RetrieveFileSystem",
110
+ oAuth2Scopes: null,
111
+
112
+ resolvedSecurity: requestSecurity,
113
+
114
+ securitySource: client._options.apiKey,
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: "GET",
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 || 600000,
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
+ components.FileSystem,
150
+ | OrqError
151
+ | ResponseValidationError
152
+ | ConnectionError
153
+ | RequestAbortedError
154
+ | RequestTimeoutError
155
+ | InvalidRequestError
156
+ | UnexpectedClientError
157
+ | SDKValidationError
158
+ >(
159
+ M.json(200, components.FileSystem$inboundSchema),
160
+ M.fail([404, "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,175 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { OrqCore } from "../core.js";
6
+ import { encodeFormQuery, 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
+ * Stat file
31
+ *
32
+ * @remarks
33
+ * Retrieves the metadata of one file or folder without transferring its content.
34
+ */
35
+ export function fileSystemsStatFile(
36
+ client: OrqCore,
37
+ request: operations.StatFileRequest,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ components.StatFileSystemFileResponse,
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.StatFileRequest,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ components.StatFileSystemFileResponse,
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.StatFileRequest$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 = null;
89
+
90
+ const pathParams = {
91
+ file_system_key: encodeSimple("file_system_key", payload.file_system_key, {
92
+ explode: false,
93
+ charEncoding: "percent",
94
+ }),
95
+ };
96
+ const path = pathToFunc("/v2/file-systems/{file_system_key}/files/stat")(
97
+ pathParams,
98
+ );
99
+
100
+ const query = encodeFormQuery({
101
+ "path": payload.path,
102
+ });
103
+
104
+ const headers = new Headers(compactMap({
105
+ Accept: "application/json",
106
+ }));
107
+
108
+ const secConfig = await extractSecurity(client._options.apiKey);
109
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
110
+ const requestSecurity = resolveGlobalSecurity(securityInput);
111
+
112
+ const context = {
113
+ options: client._options,
114
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
115
+ operationID: "StatFile",
116
+ oAuth2Scopes: null,
117
+
118
+ resolvedSecurity: requestSecurity,
119
+
120
+ securitySource: client._options.apiKey,
121
+ retryConfig: options?.retries
122
+ || client._options.retryConfig
123
+ || { strategy: "none" },
124
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
125
+ };
126
+
127
+ const requestRes = client._createRequest(context, {
128
+ security: requestSecurity,
129
+ method: "GET",
130
+ baseURL: options?.serverURL,
131
+ path: path,
132
+ headers: headers,
133
+ query: query,
134
+ body: body,
135
+ userAgent: client._options.userAgent,
136
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
137
+ }, options);
138
+ if (!requestRes.ok) {
139
+ return [requestRes, { status: "invalid" }];
140
+ }
141
+ const req = requestRes.value;
142
+
143
+ const doResult = await client._do(req, {
144
+ context,
145
+ isErrorStatusCode: (statusCode: number) =>
146
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
147
+ retryConfig: context.retryConfig,
148
+ retryCodes: context.retryCodes,
149
+ });
150
+ if (!doResult.ok) {
151
+ return [doResult, { status: "request-error", request: req }];
152
+ }
153
+ const response = doResult.value;
154
+
155
+ const [result] = await M.match<
156
+ components.StatFileSystemFileResponse,
157
+ | OrqError
158
+ | ResponseValidationError
159
+ | ConnectionError
160
+ | RequestAbortedError
161
+ | RequestTimeoutError
162
+ | InvalidRequestError
163
+ | UnexpectedClientError
164
+ | SDKValidationError
165
+ >(
166
+ M.json(200, components.StatFileSystemFileResponse$inboundSchema),
167
+ M.fail([404, "4XX"]),
168
+ M.fail("5XX"),
169
+ )(response, req);
170
+ if (!result.ok) {
171
+ return [result, { status: "complete", request: req, response }];
172
+ }
173
+
174
+ return [result, { status: "complete", request: req, response }];
175
+ }
@@ -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 file system
31
+ *
32
+ * @remarks
33
+ * Updates the mutable file system configuration. The key is immutable.
34
+ */
35
+ export function fileSystemsUpdate(
36
+ client: OrqCore,
37
+ request: operations.UpdateFileSystemRequest,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ components.FileSystem,
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.UpdateFileSystemRequest,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ components.FileSystem,
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.UpdateFileSystemRequest$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.UpdateFileSystemRequest, {
89
+ explode: true,
90
+ });
91
+
92
+ const pathParams = {
93
+ file_system_key: encodeSimple("file_system_key", payload.file_system_key, {
94
+ explode: false,
95
+ charEncoding: "percent",
96
+ }),
97
+ };
98
+ const path = pathToFunc("/v2/file-systems/{file_system_key}")(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: "UpdateFileSystem",
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.FileSystem,
153
+ | OrqError
154
+ | ResponseValidationError
155
+ | ConnectionError
156
+ | RequestAbortedError
157
+ | RequestTimeoutError
158
+ | InvalidRequestError
159
+ | UnexpectedClientError
160
+ | SDKValidationError
161
+ >(
162
+ M.json(200, components.FileSystem$inboundSchema),
163
+ M.fail([404, "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
+ }
@@ -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.14.0-rc.55",
61
+ sdkVersion: "4.15.0-rc.3",
62
62
  genVersion: "2.932.9",
63
- userAgent: "speakeasy-sdk/typescript 4.14.0-rc.55 2.932.9 2.0 @orq-ai/node",
63
+ userAgent: "speakeasy-sdk/typescript 4.15.0-rc.3 2.932.9 2.0 @orq-ai/node",
64
64
  } as const;
@@ -33,6 +33,11 @@ import {
33
33
  DeleteMemoryDocumentToolInput$Outbound,
34
34
  DeleteMemoryDocumentToolInput$outboundSchema,
35
35
  } from "./deletememorydocumenttoolinput.js";
36
+ import {
37
+ FileSystemToolInput,
38
+ FileSystemToolInput$Outbound,
39
+ FileSystemToolInput$outboundSchema,
40
+ } from "./filesystemtoolinput.js";
36
41
  import {
37
42
  FunctionToolInput,
38
43
  FunctionToolInput$Outbound,
@@ -117,6 +122,7 @@ export type AgentToolInputCRUD =
117
122
  | AdvisorToolInput
118
123
  | SidekickToolInput
119
124
  | CodeInterpreterToolInput
125
+ | FileSystemToolInput
120
126
  | HttpToolInput
121
127
  | CodeToolInput
122
128
  | FunctionToolInput
@@ -139,6 +145,7 @@ export type AgentToolInputCRUD$Outbound =
139
145
  | AdvisorToolInput$Outbound
140
146
  | SidekickToolInput$Outbound
141
147
  | CodeInterpreterToolInput$Outbound
148
+ | FileSystemToolInput$Outbound
142
149
  | HttpToolInput$Outbound
143
150
  | CodeToolInput$Outbound
144
151
  | FunctionToolInput$Outbound
@@ -165,6 +172,7 @@ export const AgentToolInputCRUD$outboundSchema: z.ZodType<
165
172
  AdvisorToolInput$outboundSchema,
166
173
  SidekickToolInput$outboundSchema,
167
174
  CodeInterpreterToolInput$outboundSchema,
175
+ FileSystemToolInput$outboundSchema,
168
176
  HttpToolInput$outboundSchema,
169
177
  CodeToolInput$outboundSchema,
170
178
  FunctionToolInput$outboundSchema,
@@ -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 CreateFileSystemFolderRequest = {
8
+ /**
9
+ * Folder to create, relative to the file system root
10
+ */
11
+ path: string;
12
+ };
13
+
14
+ /** @internal */
15
+ export type CreateFileSystemFolderRequest$Outbound = {
16
+ path: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export const CreateFileSystemFolderRequest$outboundSchema: z.ZodType<
21
+ CreateFileSystemFolderRequest$Outbound,
22
+ z.ZodTypeDef,
23
+ CreateFileSystemFolderRequest
24
+ > = z.object({
25
+ path: z.string(),
26
+ });
27
+
28
+ export function createFileSystemFolderRequestToJSON(
29
+ createFileSystemFolderRequest: CreateFileSystemFolderRequest,
30
+ ): string {
31
+ return JSON.stringify(
32
+ CreateFileSystemFolderRequest$outboundSchema.parse(
33
+ createFileSystemFolderRequest,
34
+ ),
35
+ );
36
+ }
@@ -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 CreateFileSystemFolderResponse = {
11
+ path: string;
12
+ };
13
+
14
+ /** @internal */
15
+ export const CreateFileSystemFolderResponse$inboundSchema: z.ZodType<
16
+ CreateFileSystemFolderResponse,
17
+ z.ZodTypeDef,
18
+ unknown
19
+ > = z.object({
20
+ path: z.string(),
21
+ });
22
+
23
+ export function createFileSystemFolderResponseFromJSON(
24
+ jsonString: string,
25
+ ): SafeParseResult<CreateFileSystemFolderResponse, SDKValidationError> {
26
+ return safeParse(
27
+ jsonString,
28
+ (x) => CreateFileSystemFolderResponse$inboundSchema.parse(JSON.parse(x)),
29
+ `Failed to parse 'CreateFileSystemFolderResponse' from JSON`,
30
+ );
31
+ }