@meetkai/mka1 0.55.6 → 0.55.8
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.
- package/README.md +375 -361
- package/bin/mcp-server.js +517 -16
- package/bin/mcp-server.js.map +23 -19
- package/dist/commonjs/funcs/authOrgsGetInboundRules.d.ts +18 -0
- package/dist/commonjs/funcs/authOrgsGetInboundRules.d.ts.map +1 -0
- package/dist/commonjs/funcs/authOrgsGetInboundRules.js +145 -0
- package/dist/commonjs/funcs/authOrgsGetInboundRules.js.map +1 -0
- package/dist/commonjs/funcs/authOrgsUpdateInboundRules.d.ts +18 -0
- package/dist/commonjs/funcs/authOrgsUpdateInboundRules.d.ts.map +1 -0
- package/dist/commonjs/funcs/authOrgsUpdateInboundRules.js +140 -0
- package/dist/commonjs/funcs/authOrgsUpdateInboundRules.js.map +1 -0
- package/dist/commonjs/funcs/llmFilesList.js +1 -0
- package/dist/commonjs/funcs/llmFilesList.js.map +1 -1
- package/dist/commonjs/funcs/llmVectorStoresCreate.d.ts +1 -1
- package/dist/commonjs/funcs/llmVectorStoresCreate.js +1 -1
- package/dist/commonjs/funcs/llmVectorStoresCreateFile.d.ts +1 -1
- package/dist/commonjs/funcs/llmVectorStoresCreateFile.js +1 -1
- package/dist/commonjs/funcs/llmVectorStoresCreateFileBatch.d.ts +1 -1
- package/dist/commonjs/funcs/llmVectorStoresCreateFileBatch.js +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/tools/llmVectorStoresCreate.js +1 -1
- package/dist/commonjs/mcp-server/tools/llmVectorStoresCreate.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/llmVectorStoresCreateFile.js +1 -1
- package/dist/commonjs/mcp-server/tools/llmVectorStoresCreateFile.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/llmVectorStoresCreateFileBatch.js +1 -1
- package/dist/commonjs/mcp-server/tools/llmVectorStoresCreateFileBatch.js.map +1 -1
- package/dist/commonjs/models/components/createvectorstorefilebatchrequest.d.ts +5 -0
- package/dist/commonjs/models/components/createvectorstorefilebatchrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createvectorstorefilebatchrequest.js +4 -0
- package/dist/commonjs/models/components/createvectorstorefilebatchrequest.js.map +1 -1
- package/dist/commonjs/models/components/file.d.ts +5 -0
- package/dist/commonjs/models/components/file.d.ts.map +1 -1
- package/dist/commonjs/models/components/file.js +2 -0
- package/dist/commonjs/models/components/file.js.map +1 -1
- package/dist/commonjs/models/components/vectorstorefileerror.d.ts +4 -3
- package/dist/commonjs/models/components/vectorstorefileerror.d.ts.map +1 -1
- package/dist/commonjs/models/components/vectorstorefileerror.js +2 -1
- package/dist/commonjs/models/components/vectorstorefileerror.js.map +1 -1
- package/dist/commonjs/models/errors/getorginboundrules.d.ts +185 -0
- package/dist/commonjs/models/errors/getorginboundrules.d.ts.map +1 -0
- package/dist/commonjs/models/errors/getorginboundrules.js +266 -0
- package/dist/commonjs/models/errors/getorginboundrules.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +2 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +2 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/errors/updateorginboundrules.d.ts +188 -0
- package/dist/commonjs/models/errors/updateorginboundrules.d.ts.map +1 -0
- package/dist/commonjs/models/errors/updateorginboundrules.js +270 -0
- package/dist/commonjs/models/errors/updateorginboundrules.js.map +1 -0
- package/dist/commonjs/models/operations/getorginboundrules.d.ts +80 -0
- package/dist/commonjs/models/operations/getorginboundrules.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getorginboundrules.js +133 -0
- package/dist/commonjs/models/operations/getorginboundrules.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listfiles.d.ts +2 -0
- package/dist/commonjs/models/operations/listfiles.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listfiles.js +2 -0
- package/dist/commonjs/models/operations/listfiles.js.map +1 -1
- package/dist/commonjs/models/operations/updateorginboundrules.d.ts +110 -0
- package/dist/commonjs/models/operations/updateorginboundrules.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updateorginboundrules.js +172 -0
- package/dist/commonjs/models/operations/updateorginboundrules.js.map +1 -0
- package/dist/commonjs/react-query/authOrgsGetInboundRules.core.d.ts +14 -0
- package/dist/commonjs/react-query/authOrgsGetInboundRules.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/authOrgsGetInboundRules.core.js +36 -0
- package/dist/commonjs/react-query/authOrgsGetInboundRules.core.js.map +1 -0
- package/dist/commonjs/react-query/authOrgsGetInboundRules.d.ts +39 -0
- package/dist/commonjs/react-query/authOrgsGetInboundRules.d.ts.map +1 -0
- package/dist/commonjs/react-query/authOrgsGetInboundRules.js +60 -0
- package/dist/commonjs/react-query/authOrgsGetInboundRules.js.map +1 -0
- package/dist/commonjs/react-query/authOrgsUpdateInboundRules.d.ts +30 -0
- package/dist/commonjs/react-query/authOrgsUpdateInboundRules.d.ts.map +1 -0
- package/dist/commonjs/react-query/authOrgsUpdateInboundRules.js +47 -0
- package/dist/commonjs/react-query/authOrgsUpdateInboundRules.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +2 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +2 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/llmFilesList.core.d.ts +1 -0
- package/dist/commonjs/react-query/llmFilesList.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/llmFilesList.core.js +1 -0
- package/dist/commonjs/react-query/llmFilesList.core.js.map +1 -1
- package/dist/commonjs/react-query/llmFilesList.d.ts +2 -0
- package/dist/commonjs/react-query/llmFilesList.d.ts.map +1 -1
- package/dist/commonjs/react-query/llmFilesList.js.map +1 -1
- package/dist/commonjs/react-query/llmVectorStoresCreate.d.ts +1 -1
- package/dist/commonjs/react-query/llmVectorStoresCreate.js +1 -1
- package/dist/commonjs/react-query/llmVectorStoresCreateFile.d.ts +1 -1
- package/dist/commonjs/react-query/llmVectorStoresCreateFile.js +1 -1
- package/dist/commonjs/react-query/llmVectorStoresCreateFileBatch.d.ts +1 -1
- package/dist/commonjs/react-query/llmVectorStoresCreateFileBatch.js +1 -1
- package/dist/commonjs/sdk/orgs.d.ts +14 -0
- package/dist/commonjs/sdk/orgs.d.ts.map +1 -1
- package/dist/commonjs/sdk/orgs.js +20 -0
- package/dist/commonjs/sdk/orgs.js.map +1 -1
- package/dist/commonjs/sdk/vectorstores.d.ts +3 -3
- package/dist/commonjs/sdk/vectorstores.js +3 -3
- package/dist/esm/funcs/authOrgsGetInboundRules.d.ts +18 -0
- package/dist/esm/funcs/authOrgsGetInboundRules.d.ts.map +1 -0
- package/dist/esm/funcs/authOrgsGetInboundRules.js +109 -0
- package/dist/esm/funcs/authOrgsGetInboundRules.js.map +1 -0
- package/dist/esm/funcs/authOrgsUpdateInboundRules.d.ts +18 -0
- package/dist/esm/funcs/authOrgsUpdateInboundRules.d.ts.map +1 -0
- package/dist/esm/funcs/authOrgsUpdateInboundRules.js +104 -0
- package/dist/esm/funcs/authOrgsUpdateInboundRules.js.map +1 -0
- package/dist/esm/funcs/llmFilesList.js +1 -0
- package/dist/esm/funcs/llmFilesList.js.map +1 -1
- package/dist/esm/funcs/llmVectorStoresCreate.d.ts +1 -1
- package/dist/esm/funcs/llmVectorStoresCreate.js +1 -1
- package/dist/esm/funcs/llmVectorStoresCreateFile.d.ts +1 -1
- package/dist/esm/funcs/llmVectorStoresCreateFile.js +1 -1
- package/dist/esm/funcs/llmVectorStoresCreateFileBatch.d.ts +1 -1
- package/dist/esm/funcs/llmVectorStoresCreateFileBatch.js +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/tools/llmVectorStoresCreate.js +1 -1
- package/dist/esm/mcp-server/tools/llmVectorStoresCreate.js.map +1 -1
- package/dist/esm/mcp-server/tools/llmVectorStoresCreateFile.js +1 -1
- package/dist/esm/mcp-server/tools/llmVectorStoresCreateFile.js.map +1 -1
- package/dist/esm/mcp-server/tools/llmVectorStoresCreateFileBatch.js +1 -1
- package/dist/esm/mcp-server/tools/llmVectorStoresCreateFileBatch.js.map +1 -1
- package/dist/esm/models/components/createvectorstorefilebatchrequest.d.ts +5 -0
- package/dist/esm/models/components/createvectorstorefilebatchrequest.d.ts.map +1 -1
- package/dist/esm/models/components/createvectorstorefilebatchrequest.js +4 -0
- package/dist/esm/models/components/createvectorstorefilebatchrequest.js.map +1 -1
- package/dist/esm/models/components/file.d.ts +5 -0
- package/dist/esm/models/components/file.d.ts.map +1 -1
- package/dist/esm/models/components/file.js +2 -0
- package/dist/esm/models/components/file.js.map +1 -1
- package/dist/esm/models/components/vectorstorefileerror.d.ts +4 -3
- package/dist/esm/models/components/vectorstorefileerror.d.ts.map +1 -1
- package/dist/esm/models/components/vectorstorefileerror.js +2 -1
- package/dist/esm/models/components/vectorstorefileerror.js.map +1 -1
- package/dist/esm/models/errors/getorginboundrules.d.ts +185 -0
- package/dist/esm/models/errors/getorginboundrules.d.ts.map +1 -0
- package/dist/esm/models/errors/getorginboundrules.js +223 -0
- package/dist/esm/models/errors/getorginboundrules.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +2 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +2 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/errors/updateorginboundrules.d.ts +188 -0
- package/dist/esm/models/errors/updateorginboundrules.d.ts.map +1 -0
- package/dist/esm/models/errors/updateorginboundrules.js +227 -0
- package/dist/esm/models/errors/updateorginboundrules.js.map +1 -0
- package/dist/esm/models/operations/getorginboundrules.d.ts +80 -0
- package/dist/esm/models/operations/getorginboundrules.d.ts.map +1 -0
- package/dist/esm/models/operations/getorginboundrules.js +89 -0
- package/dist/esm/models/operations/getorginboundrules.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listfiles.d.ts +2 -0
- package/dist/esm/models/operations/listfiles.d.ts.map +1 -1
- package/dist/esm/models/operations/listfiles.js +2 -0
- package/dist/esm/models/operations/listfiles.js.map +1 -1
- package/dist/esm/models/operations/updateorginboundrules.d.ts +110 -0
- package/dist/esm/models/operations/updateorginboundrules.d.ts.map +1 -0
- package/dist/esm/models/operations/updateorginboundrules.js +124 -0
- package/dist/esm/models/operations/updateorginboundrules.js.map +1 -0
- package/dist/esm/react-query/authOrgsGetInboundRules.core.d.ts +14 -0
- package/dist/esm/react-query/authOrgsGetInboundRules.core.d.ts.map +1 -0
- package/dist/esm/react-query/authOrgsGetInboundRules.core.js +31 -0
- package/dist/esm/react-query/authOrgsGetInboundRules.core.js.map +1 -0
- package/dist/esm/react-query/authOrgsGetInboundRules.d.ts +39 -0
- package/dist/esm/react-query/authOrgsGetInboundRules.d.ts.map +1 -0
- package/dist/esm/react-query/authOrgsGetInboundRules.js +50 -0
- package/dist/esm/react-query/authOrgsGetInboundRules.js.map +1 -0
- package/dist/esm/react-query/authOrgsUpdateInboundRules.d.ts +30 -0
- package/dist/esm/react-query/authOrgsUpdateInboundRules.d.ts.map +1 -0
- package/dist/esm/react-query/authOrgsUpdateInboundRules.js +42 -0
- package/dist/esm/react-query/authOrgsUpdateInboundRules.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +2 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +2 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/llmFilesList.core.d.ts +1 -0
- package/dist/esm/react-query/llmFilesList.core.d.ts.map +1 -1
- package/dist/esm/react-query/llmFilesList.core.js +1 -0
- package/dist/esm/react-query/llmFilesList.core.js.map +1 -1
- package/dist/esm/react-query/llmFilesList.d.ts +2 -0
- package/dist/esm/react-query/llmFilesList.d.ts.map +1 -1
- package/dist/esm/react-query/llmFilesList.js.map +1 -1
- package/dist/esm/react-query/llmVectorStoresCreate.d.ts +1 -1
- package/dist/esm/react-query/llmVectorStoresCreate.js +1 -1
- package/dist/esm/react-query/llmVectorStoresCreateFile.d.ts +1 -1
- package/dist/esm/react-query/llmVectorStoresCreateFile.js +1 -1
- package/dist/esm/react-query/llmVectorStoresCreateFileBatch.d.ts +1 -1
- package/dist/esm/react-query/llmVectorStoresCreateFileBatch.js +1 -1
- package/dist/esm/sdk/orgs.d.ts +14 -0
- package/dist/esm/sdk/orgs.d.ts.map +1 -1
- package/dist/esm/sdk/orgs.js +20 -0
- package/dist/esm/sdk/orgs.js.map +1 -1
- package/dist/esm/sdk/vectorstores.d.ts +3 -3
- package/dist/esm/sdk/vectorstores.js +3 -3
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/authOrgsGetInboundRules.ts +248 -0
- package/src/funcs/authOrgsUpdateInboundRules.ts +246 -0
- package/src/funcs/llmFilesList.ts +1 -0
- package/src/funcs/llmVectorStoresCreate.ts +1 -1
- package/src/funcs/llmVectorStoresCreateFile.ts +1 -1
- package/src/funcs/llmVectorStoresCreateFileBatch.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/llmVectorStoresCreate.ts +1 -1
- package/src/mcp-server/tools/llmVectorStoresCreateFile.ts +1 -1
- package/src/mcp-server/tools/llmVectorStoresCreateFileBatch.ts +1 -1
- package/src/models/components/createvectorstorefilebatchrequest.ts +9 -0
- package/src/models/components/file.ts +7 -0
- package/src/models/components/vectorstorefileerror.ts +4 -3
- package/src/models/errors/getorginboundrules.ts +451 -0
- package/src/models/errors/index.ts +2 -0
- package/src/models/errors/updateorginboundrules.ts +461 -0
- package/src/models/operations/getorginboundrules.ts +233 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listfiles.ts +4 -0
- package/src/models/operations/updateorginboundrules.ts +328 -0
- package/src/react-query/authOrgsGetInboundRules.core.ts +80 -0
- package/src/react-query/authOrgsGetInboundRules.ts +153 -0
- package/src/react-query/authOrgsUpdateInboundRules.ts +120 -0
- package/src/react-query/index.ts +2 -0
- package/src/react-query/llmFilesList.core.ts +2 -0
- package/src/react-query/llmFilesList.ts +2 -0
- package/src/react-query/llmVectorStoresCreate.ts +1 -1
- package/src/react-query/llmVectorStoresCreateFile.ts +1 -1
- package/src/react-query/llmVectorStoresCreateFileBatch.ts +1 -1
- package/src/sdk/orgs.ts +40 -0
- package/src/sdk/vectorstores.ts +3 -3
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } 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 { resolveSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKError } from "../models/errors/sdkerror.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
|
+
* Get an org's inbound IP rules
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Source-IP allowlist for the org's API keys. `available` mirrors the cluster's INBOUND_RULES_ENABLED flag. Rules are ordered by createdAt, then id.
|
|
34
|
+
*/
|
|
35
|
+
export function authOrgsGetInboundRules(
|
|
36
|
+
client: SDKCore,
|
|
37
|
+
security: operations.GetOrgInboundRulesSecurity,
|
|
38
|
+
request: operations.GetOrgInboundRulesRequest,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
operations.GetOrgInboundRulesResponseBody,
|
|
43
|
+
| errors.GetOrgInboundRulesResponseBody
|
|
44
|
+
| errors.GetOrgInboundRulesAuthOrgsResponseBody
|
|
45
|
+
| errors.GetOrgInboundRulesAuthOrgsResponseResponseBody
|
|
46
|
+
| errors.GetOrgInboundRulesAuthOrgsResponse404ResponseBody
|
|
47
|
+
| errors.GetOrgInboundRulesAuthOrgsResponse409ResponseBody
|
|
48
|
+
| errors.GetOrgInboundRulesAuthOrgsResponse410ResponseBody
|
|
49
|
+
| errors.GetOrgInboundRulesAuthOrgsResponse429ResponseBody
|
|
50
|
+
| SDKError
|
|
51
|
+
| ResponseValidationError
|
|
52
|
+
| ConnectionError
|
|
53
|
+
| RequestAbortedError
|
|
54
|
+
| RequestTimeoutError
|
|
55
|
+
| InvalidRequestError
|
|
56
|
+
| UnexpectedClientError
|
|
57
|
+
| SDKValidationError
|
|
58
|
+
>
|
|
59
|
+
> {
|
|
60
|
+
return new APIPromise($do(
|
|
61
|
+
client,
|
|
62
|
+
security,
|
|
63
|
+
request,
|
|
64
|
+
options,
|
|
65
|
+
));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async function $do(
|
|
69
|
+
client: SDKCore,
|
|
70
|
+
security: operations.GetOrgInboundRulesSecurity,
|
|
71
|
+
request: operations.GetOrgInboundRulesRequest,
|
|
72
|
+
options?: RequestOptions,
|
|
73
|
+
): Promise<
|
|
74
|
+
[
|
|
75
|
+
Result<
|
|
76
|
+
operations.GetOrgInboundRulesResponseBody,
|
|
77
|
+
| errors.GetOrgInboundRulesResponseBody
|
|
78
|
+
| errors.GetOrgInboundRulesAuthOrgsResponseBody
|
|
79
|
+
| errors.GetOrgInboundRulesAuthOrgsResponseResponseBody
|
|
80
|
+
| errors.GetOrgInboundRulesAuthOrgsResponse404ResponseBody
|
|
81
|
+
| errors.GetOrgInboundRulesAuthOrgsResponse409ResponseBody
|
|
82
|
+
| errors.GetOrgInboundRulesAuthOrgsResponse410ResponseBody
|
|
83
|
+
| errors.GetOrgInboundRulesAuthOrgsResponse429ResponseBody
|
|
84
|
+
| SDKError
|
|
85
|
+
| ResponseValidationError
|
|
86
|
+
| ConnectionError
|
|
87
|
+
| RequestAbortedError
|
|
88
|
+
| RequestTimeoutError
|
|
89
|
+
| InvalidRequestError
|
|
90
|
+
| UnexpectedClientError
|
|
91
|
+
| SDKValidationError
|
|
92
|
+
>,
|
|
93
|
+
APICall,
|
|
94
|
+
]
|
|
95
|
+
> {
|
|
96
|
+
const parsed = safeParse(
|
|
97
|
+
request,
|
|
98
|
+
(value) => operations.GetOrgInboundRulesRequest$outboundSchema.parse(value),
|
|
99
|
+
"Input validation failed",
|
|
100
|
+
);
|
|
101
|
+
if (!parsed.ok) {
|
|
102
|
+
return [parsed, { status: "invalid" }];
|
|
103
|
+
}
|
|
104
|
+
const payload = parsed.value;
|
|
105
|
+
const body = null;
|
|
106
|
+
|
|
107
|
+
const pathParams = {
|
|
108
|
+
orgId: encodeSimple("orgId", payload.orgId, {
|
|
109
|
+
explode: false,
|
|
110
|
+
charEncoding: "percent",
|
|
111
|
+
}),
|
|
112
|
+
};
|
|
113
|
+
const path = pathToFunc("/api/v1/authentication/orgs/{orgId}/inbound-rules")(
|
|
114
|
+
pathParams,
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
const headers = new Headers(compactMap({
|
|
118
|
+
Accept: "application/json",
|
|
119
|
+
"X-On-Behalf-Of": encodeSimple(
|
|
120
|
+
"X-On-Behalf-Of",
|
|
121
|
+
payload["X-On-Behalf-Of"],
|
|
122
|
+
{ explode: false, charEncoding: "none" },
|
|
123
|
+
),
|
|
124
|
+
}));
|
|
125
|
+
|
|
126
|
+
const requestSecurity = resolveSecurity(
|
|
127
|
+
[
|
|
128
|
+
{
|
|
129
|
+
fieldName: "Authorization",
|
|
130
|
+
type: "http:bearer",
|
|
131
|
+
value: security?.bearerAuth,
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
[
|
|
135
|
+
{
|
|
136
|
+
fieldName: "__Secure-mka1-auth-v2.session_token",
|
|
137
|
+
type: "apiKey:cookie",
|
|
138
|
+
value: security?.sessionCookie,
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
const context = {
|
|
144
|
+
options: client._options,
|
|
145
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
146
|
+
operationID: "getOrgInboundRules",
|
|
147
|
+
oAuth2Scopes: null,
|
|
148
|
+
|
|
149
|
+
resolvedSecurity: requestSecurity,
|
|
150
|
+
|
|
151
|
+
securitySource: security,
|
|
152
|
+
retryConfig: options?.retries
|
|
153
|
+
|| client._options.retryConfig
|
|
154
|
+
|| {
|
|
155
|
+
strategy: "backoff",
|
|
156
|
+
backoff: {
|
|
157
|
+
initialInterval: 500,
|
|
158
|
+
maxInterval: 5000,
|
|
159
|
+
exponent: 1.5,
|
|
160
|
+
maxElapsedTime: 15000,
|
|
161
|
+
},
|
|
162
|
+
retryConnectionErrors: true,
|
|
163
|
+
}
|
|
164
|
+
|| { strategy: "none" },
|
|
165
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
const requestRes = client._createRequest(context, {
|
|
169
|
+
security: requestSecurity,
|
|
170
|
+
method: "GET",
|
|
171
|
+
baseURL: options?.serverURL,
|
|
172
|
+
path: path,
|
|
173
|
+
headers: headers,
|
|
174
|
+
body: body,
|
|
175
|
+
userAgent: client._options.userAgent,
|
|
176
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
177
|
+
}, options);
|
|
178
|
+
if (!requestRes.ok) {
|
|
179
|
+
return [requestRes, { status: "invalid" }];
|
|
180
|
+
}
|
|
181
|
+
const req = requestRes.value;
|
|
182
|
+
|
|
183
|
+
const doResult = await client._do(req, {
|
|
184
|
+
context,
|
|
185
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
186
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
187
|
+
retryConfig: context.retryConfig,
|
|
188
|
+
retryCodes: context.retryCodes,
|
|
189
|
+
});
|
|
190
|
+
if (!doResult.ok) {
|
|
191
|
+
return [doResult, { status: "request-error", request: req }];
|
|
192
|
+
}
|
|
193
|
+
const response = doResult.value;
|
|
194
|
+
|
|
195
|
+
const responseFields = {
|
|
196
|
+
HttpMeta: { Response: response, Request: req },
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
const [result] = await M.match<
|
|
200
|
+
operations.GetOrgInboundRulesResponseBody,
|
|
201
|
+
| errors.GetOrgInboundRulesResponseBody
|
|
202
|
+
| errors.GetOrgInboundRulesAuthOrgsResponseBody
|
|
203
|
+
| errors.GetOrgInboundRulesAuthOrgsResponseResponseBody
|
|
204
|
+
| errors.GetOrgInboundRulesAuthOrgsResponse404ResponseBody
|
|
205
|
+
| errors.GetOrgInboundRulesAuthOrgsResponse409ResponseBody
|
|
206
|
+
| errors.GetOrgInboundRulesAuthOrgsResponse410ResponseBody
|
|
207
|
+
| errors.GetOrgInboundRulesAuthOrgsResponse429ResponseBody
|
|
208
|
+
| SDKError
|
|
209
|
+
| ResponseValidationError
|
|
210
|
+
| ConnectionError
|
|
211
|
+
| RequestAbortedError
|
|
212
|
+
| RequestTimeoutError
|
|
213
|
+
| InvalidRequestError
|
|
214
|
+
| UnexpectedClientError
|
|
215
|
+
| SDKValidationError
|
|
216
|
+
>(
|
|
217
|
+
M.json(200, operations.GetOrgInboundRulesResponseBody$inboundSchema),
|
|
218
|
+
M.jsonErr(400, errors.GetOrgInboundRulesResponseBody$inboundSchema),
|
|
219
|
+
M.jsonErr(401, errors.GetOrgInboundRulesAuthOrgsResponseBody$inboundSchema),
|
|
220
|
+
M.jsonErr(
|
|
221
|
+
403,
|
|
222
|
+
errors.GetOrgInboundRulesAuthOrgsResponseResponseBody$inboundSchema,
|
|
223
|
+
),
|
|
224
|
+
M.jsonErr(
|
|
225
|
+
404,
|
|
226
|
+
errors.GetOrgInboundRulesAuthOrgsResponse404ResponseBody$inboundSchema,
|
|
227
|
+
),
|
|
228
|
+
M.jsonErr(
|
|
229
|
+
409,
|
|
230
|
+
errors.GetOrgInboundRulesAuthOrgsResponse409ResponseBody$inboundSchema,
|
|
231
|
+
),
|
|
232
|
+
M.jsonErr(
|
|
233
|
+
410,
|
|
234
|
+
errors.GetOrgInboundRulesAuthOrgsResponse410ResponseBody$inboundSchema,
|
|
235
|
+
),
|
|
236
|
+
M.jsonErr(
|
|
237
|
+
429,
|
|
238
|
+
errors.GetOrgInboundRulesAuthOrgsResponse429ResponseBody$inboundSchema,
|
|
239
|
+
),
|
|
240
|
+
M.fail("4XX"),
|
|
241
|
+
M.fail("5XX"),
|
|
242
|
+
)(response, req, { extraFields: responseFields });
|
|
243
|
+
if (!result.ok) {
|
|
244
|
+
return [result, { status: "complete", request: req, response }];
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return [result, { status: "complete", request: req, response }];
|
|
248
|
+
}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } 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 { resolveSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKError } from "../models/errors/sdkerror.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
|
+
* Replace an org's inbound IP rules (org owner/admin, browser session)
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Replaces the whole policy atomically. Each cidr is normalized (bare 0.0.0.0 / :: mean /0, other bare addresses are /32 or /128, host bits are cleared); duplicates after normalization are a 400. A request carrying an Authorization header is refused with 403.
|
|
34
|
+
*/
|
|
35
|
+
export function authOrgsUpdateInboundRules(
|
|
36
|
+
client: SDKCore,
|
|
37
|
+
security: operations.UpdateOrgInboundRulesSecurity,
|
|
38
|
+
request: operations.UpdateOrgInboundRulesRequest,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
operations.UpdateOrgInboundRulesResponseBody,
|
|
43
|
+
| errors.UpdateOrgInboundRulesResponseBody
|
|
44
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponseBody
|
|
45
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponseResponseBody
|
|
46
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponse404ResponseBody
|
|
47
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponse409ResponseBody
|
|
48
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponse410ResponseBody
|
|
49
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponse429ResponseBody
|
|
50
|
+
| SDKError
|
|
51
|
+
| ResponseValidationError
|
|
52
|
+
| ConnectionError
|
|
53
|
+
| RequestAbortedError
|
|
54
|
+
| RequestTimeoutError
|
|
55
|
+
| InvalidRequestError
|
|
56
|
+
| UnexpectedClientError
|
|
57
|
+
| SDKValidationError
|
|
58
|
+
>
|
|
59
|
+
> {
|
|
60
|
+
return new APIPromise($do(
|
|
61
|
+
client,
|
|
62
|
+
security,
|
|
63
|
+
request,
|
|
64
|
+
options,
|
|
65
|
+
));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async function $do(
|
|
69
|
+
client: SDKCore,
|
|
70
|
+
security: operations.UpdateOrgInboundRulesSecurity,
|
|
71
|
+
request: operations.UpdateOrgInboundRulesRequest,
|
|
72
|
+
options?: RequestOptions,
|
|
73
|
+
): Promise<
|
|
74
|
+
[
|
|
75
|
+
Result<
|
|
76
|
+
operations.UpdateOrgInboundRulesResponseBody,
|
|
77
|
+
| errors.UpdateOrgInboundRulesResponseBody
|
|
78
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponseBody
|
|
79
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponseResponseBody
|
|
80
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponse404ResponseBody
|
|
81
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponse409ResponseBody
|
|
82
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponse410ResponseBody
|
|
83
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponse429ResponseBody
|
|
84
|
+
| SDKError
|
|
85
|
+
| ResponseValidationError
|
|
86
|
+
| ConnectionError
|
|
87
|
+
| RequestAbortedError
|
|
88
|
+
| RequestTimeoutError
|
|
89
|
+
| InvalidRequestError
|
|
90
|
+
| UnexpectedClientError
|
|
91
|
+
| SDKValidationError
|
|
92
|
+
>,
|
|
93
|
+
APICall,
|
|
94
|
+
]
|
|
95
|
+
> {
|
|
96
|
+
const parsed = safeParse(
|
|
97
|
+
request,
|
|
98
|
+
(value) =>
|
|
99
|
+
operations.UpdateOrgInboundRulesRequest$outboundSchema.parse(value),
|
|
100
|
+
"Input validation failed",
|
|
101
|
+
);
|
|
102
|
+
if (!parsed.ok) {
|
|
103
|
+
return [parsed, { status: "invalid" }];
|
|
104
|
+
}
|
|
105
|
+
const payload = parsed.value;
|
|
106
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
107
|
+
|
|
108
|
+
const pathParams = {
|
|
109
|
+
orgId: encodeSimple("orgId", payload.orgId, {
|
|
110
|
+
explode: false,
|
|
111
|
+
charEncoding: "percent",
|
|
112
|
+
}),
|
|
113
|
+
};
|
|
114
|
+
const path = pathToFunc("/api/v1/authentication/orgs/{orgId}/inbound-rules")(
|
|
115
|
+
pathParams,
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
const headers = new Headers(compactMap({
|
|
119
|
+
"Content-Type": "application/json",
|
|
120
|
+
Accept: "application/json",
|
|
121
|
+
"X-On-Behalf-Of": encodeSimple(
|
|
122
|
+
"X-On-Behalf-Of",
|
|
123
|
+
payload["X-On-Behalf-Of"],
|
|
124
|
+
{ explode: false, charEncoding: "none" },
|
|
125
|
+
),
|
|
126
|
+
}));
|
|
127
|
+
|
|
128
|
+
const requestSecurity = resolveSecurity(
|
|
129
|
+
[
|
|
130
|
+
{
|
|
131
|
+
fieldName: "__Secure-mka1-auth-v2.session_token",
|
|
132
|
+
type: "apiKey:cookie",
|
|
133
|
+
value: security?.sessionCookie,
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
const context = {
|
|
139
|
+
options: client._options,
|
|
140
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
141
|
+
operationID: "updateOrgInboundRules",
|
|
142
|
+
oAuth2Scopes: null,
|
|
143
|
+
|
|
144
|
+
resolvedSecurity: requestSecurity,
|
|
145
|
+
|
|
146
|
+
securitySource: security,
|
|
147
|
+
retryConfig: options?.retries
|
|
148
|
+
|| client._options.retryConfig
|
|
149
|
+
|| {
|
|
150
|
+
strategy: "backoff",
|
|
151
|
+
backoff: {
|
|
152
|
+
initialInterval: 500,
|
|
153
|
+
maxInterval: 5000,
|
|
154
|
+
exponent: 1.5,
|
|
155
|
+
maxElapsedTime: 15000,
|
|
156
|
+
},
|
|
157
|
+
retryConnectionErrors: true,
|
|
158
|
+
}
|
|
159
|
+
|| { strategy: "none" },
|
|
160
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const requestRes = client._createRequest(context, {
|
|
164
|
+
security: requestSecurity,
|
|
165
|
+
method: "PUT",
|
|
166
|
+
baseURL: options?.serverURL,
|
|
167
|
+
path: path,
|
|
168
|
+
headers: headers,
|
|
169
|
+
body: body,
|
|
170
|
+
userAgent: client._options.userAgent,
|
|
171
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
172
|
+
}, options);
|
|
173
|
+
if (!requestRes.ok) {
|
|
174
|
+
return [requestRes, { status: "invalid" }];
|
|
175
|
+
}
|
|
176
|
+
const req = requestRes.value;
|
|
177
|
+
|
|
178
|
+
const doResult = await client._do(req, {
|
|
179
|
+
context,
|
|
180
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
181
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
182
|
+
retryConfig: context.retryConfig,
|
|
183
|
+
retryCodes: context.retryCodes,
|
|
184
|
+
});
|
|
185
|
+
if (!doResult.ok) {
|
|
186
|
+
return [doResult, { status: "request-error", request: req }];
|
|
187
|
+
}
|
|
188
|
+
const response = doResult.value;
|
|
189
|
+
|
|
190
|
+
const responseFields = {
|
|
191
|
+
HttpMeta: { Response: response, Request: req },
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const [result] = await M.match<
|
|
195
|
+
operations.UpdateOrgInboundRulesResponseBody,
|
|
196
|
+
| errors.UpdateOrgInboundRulesResponseBody
|
|
197
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponseBody
|
|
198
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponseResponseBody
|
|
199
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponse404ResponseBody
|
|
200
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponse409ResponseBody
|
|
201
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponse410ResponseBody
|
|
202
|
+
| errors.UpdateOrgInboundRulesAuthOrgsResponse429ResponseBody
|
|
203
|
+
| SDKError
|
|
204
|
+
| ResponseValidationError
|
|
205
|
+
| ConnectionError
|
|
206
|
+
| RequestAbortedError
|
|
207
|
+
| RequestTimeoutError
|
|
208
|
+
| InvalidRequestError
|
|
209
|
+
| UnexpectedClientError
|
|
210
|
+
| SDKValidationError
|
|
211
|
+
>(
|
|
212
|
+
M.json(200, operations.UpdateOrgInboundRulesResponseBody$inboundSchema),
|
|
213
|
+
M.jsonErr(400, errors.UpdateOrgInboundRulesResponseBody$inboundSchema),
|
|
214
|
+
M.jsonErr(
|
|
215
|
+
401,
|
|
216
|
+
errors.UpdateOrgInboundRulesAuthOrgsResponseBody$inboundSchema,
|
|
217
|
+
),
|
|
218
|
+
M.jsonErr(
|
|
219
|
+
403,
|
|
220
|
+
errors.UpdateOrgInboundRulesAuthOrgsResponseResponseBody$inboundSchema,
|
|
221
|
+
),
|
|
222
|
+
M.jsonErr(
|
|
223
|
+
404,
|
|
224
|
+
errors.UpdateOrgInboundRulesAuthOrgsResponse404ResponseBody$inboundSchema,
|
|
225
|
+
),
|
|
226
|
+
M.jsonErr(
|
|
227
|
+
409,
|
|
228
|
+
errors.UpdateOrgInboundRulesAuthOrgsResponse409ResponseBody$inboundSchema,
|
|
229
|
+
),
|
|
230
|
+
M.jsonErr(
|
|
231
|
+
410,
|
|
232
|
+
errors.UpdateOrgInboundRulesAuthOrgsResponse410ResponseBody$inboundSchema,
|
|
233
|
+
),
|
|
234
|
+
M.jsonErr(
|
|
235
|
+
429,
|
|
236
|
+
errors.UpdateOrgInboundRulesAuthOrgsResponse429ResponseBody$inboundSchema,
|
|
237
|
+
),
|
|
238
|
+
M.fail("4XX"),
|
|
239
|
+
M.fail("5XX"),
|
|
240
|
+
)(response, req, { extraFields: responseFields });
|
|
241
|
+
if (!result.ok) {
|
|
242
|
+
return [result, { status: "complete", request: req, response }];
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return [result, { status: "complete", request: req, response }];
|
|
246
|
+
}
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Create a vector store
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Creates a new vector store for storing and searching through document embeddings.
|
|
33
|
+
* Creates a new vector store for storing and searching through document embeddings. With file_ids, two files of the same content in the request are refused with 409 before the store is created.
|
|
34
34
|
*
|
|
35
35
|
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
36
36
|
*/
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Add a file to a vector store
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Adds a file to a vector store for semantic search indexing. Returns 410 once the vector store has expired.
|
|
33
|
+
* Adds a file to a vector store for semantic search indexing. Returns 409 when the store already holds a file with the same content (the error names that file; the store indexes each content once), 410 once the vector store has expired.
|
|
34
34
|
*
|
|
35
35
|
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
36
36
|
*/
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Batch add multiple files to vector store
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Adds multiple files to a vector store in a single batch operation. Returns 410 once the vector store has expired.
|
|
33
|
+
* Adds multiple files to a vector store in a single batch operation. A file with the same content as one the store already holds, or as an earlier file in the batch, fails the batch with 409 unless skip_duplicates is set, in which case it is recorded as cancelled with duplicate_file and the rest are attached. Returns 410 once the vector store has expired.
|
|
34
34
|
*
|
|
35
35
|
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
36
36
|
*/
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.1.0",
|
|
68
|
-
sdkVersion: "0.55.
|
|
68
|
+
sdkVersion: "0.55.8",
|
|
69
69
|
genVersion: "2.950.2",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.55.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.55.8 2.950.2 1.1.0 @meetkai/mka1",
|
|
71
71
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -14,7 +14,7 @@ export const tool$llmVectorStoresCreate: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "llm-vector-stores-create",
|
|
15
15
|
description: `Create a vector store
|
|
16
16
|
|
|
17
|
-
Creates a new vector store for storing and searching through document embeddings.`,
|
|
17
|
+
Creates a new vector store for storing and searching through document embeddings. With file_ids, two files of the same content in the request are refused with 409 before the store is created.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await llmVectorStoresCreate(
|
|
@@ -14,7 +14,7 @@ export const tool$llmVectorStoresCreateFile: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "llm-vector-stores-create-file",
|
|
15
15
|
description: `Add a file to a vector store
|
|
16
16
|
|
|
17
|
-
Adds a file to a vector store for semantic search indexing. Returns 410 once the vector store has expired.`,
|
|
17
|
+
Adds a file to a vector store for semantic search indexing. Returns 409 when the store already holds a file with the same content (the error names that file; the store indexes each content once), 410 once the vector store has expired.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await llmVectorStoresCreateFile(
|
|
@@ -15,7 +15,7 @@ export const tool$llmVectorStoresCreateFileBatch: ToolDefinition<typeof args> =
|
|
|
15
15
|
name: "llm-vector-stores-create-file-batch",
|
|
16
16
|
description: `Batch add multiple files to vector store
|
|
17
17
|
|
|
18
|
-
Adds multiple files to a vector store in a single batch operation. Returns 410 once the vector store has expired.`,
|
|
18
|
+
Adds multiple files to a vector store in a single batch operation. A file with the same content as one the store already holds, or as an earlier file in the batch, fails the batch with 409 unless skip_duplicates is set, in which case it is recorded as cancelled with duplicate_file and the rest are attached. Returns 410 once the vector store has expired.`,
|
|
19
19
|
args,
|
|
20
20
|
tool: async (client, args, ctx) => {
|
|
21
21
|
const [result, apiCall] = await llmVectorStoresCreateFileBatch(
|
|
@@ -58,6 +58,10 @@ export type CreateVectorStoreFileBatchRequest = {
|
|
|
58
58
|
* Batch-wide default chunking strategy, applied to every file that does not carry its own (a 'files' entry's chunking_strategy overrides this).
|
|
59
59
|
*/
|
|
60
60
|
chunkingStrategy?: AutoChunkingStrategy | StaticChunkingStrategy | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* When a file has the same content (SHA-256) as a file the store already holds, or as an earlier file in this batch, skip it instead of refusing the batch. A skipped file gets a cancelled row whose last_error is duplicate_file and names the file that holds the content. Default false: a duplicate fails the whole batch with 409 and nothing is attached.
|
|
63
|
+
*/
|
|
64
|
+
skipDuplicates?: boolean | undefined;
|
|
61
65
|
};
|
|
62
66
|
|
|
63
67
|
/** @internal */
|
|
@@ -173,10 +177,12 @@ export const CreateVectorStoreFileBatchRequest$inboundSchema: z.ZodType<
|
|
|
173
177
|
AutoChunkingStrategy$inboundSchema,
|
|
174
178
|
StaticChunkingStrategy$inboundSchema,
|
|
175
179
|
]).optional(),
|
|
180
|
+
skip_duplicates: z.boolean().default(false),
|
|
176
181
|
}).transform((v) => {
|
|
177
182
|
return remap$(v, {
|
|
178
183
|
"file_ids": "fileIds",
|
|
179
184
|
"chunking_strategy": "chunkingStrategy",
|
|
185
|
+
"skip_duplicates": "skipDuplicates",
|
|
180
186
|
});
|
|
181
187
|
});
|
|
182
188
|
/** @internal */
|
|
@@ -188,6 +194,7 @@ export type CreateVectorStoreFileBatchRequest$Outbound = {
|
|
|
188
194
|
| AutoChunkingStrategy$Outbound
|
|
189
195
|
| StaticChunkingStrategy$Outbound
|
|
190
196
|
| undefined;
|
|
197
|
+
skip_duplicates: boolean;
|
|
191
198
|
};
|
|
192
199
|
|
|
193
200
|
/** @internal */
|
|
@@ -204,10 +211,12 @@ export const CreateVectorStoreFileBatchRequest$outboundSchema: z.ZodType<
|
|
|
204
211
|
AutoChunkingStrategy$outboundSchema,
|
|
205
212
|
StaticChunkingStrategy$outboundSchema,
|
|
206
213
|
]).optional(),
|
|
214
|
+
skipDuplicates: z.boolean().default(false),
|
|
207
215
|
}).transform((v) => {
|
|
208
216
|
return remap$(v, {
|
|
209
217
|
fileIds: "file_ids",
|
|
210
218
|
chunkingStrategy: "chunking_strategy",
|
|
219
|
+
skipDuplicates: "skip_duplicates",
|
|
211
220
|
});
|
|
212
221
|
});
|
|
213
222
|
|
|
@@ -72,6 +72,10 @@ export type FileT = {
|
|
|
72
72
|
* DEPRECATED: Details about file status
|
|
73
73
|
*/
|
|
74
74
|
statusDetails?: string | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* SHA-256 of the file's bytes, lowercase hex. Two files with the same value hold the same content; a vector store refuses a second one. Null for files uploaded before hashing, until they are attached to a store or backfilled.
|
|
77
|
+
*/
|
|
78
|
+
sha256?: string | null | undefined;
|
|
75
79
|
};
|
|
76
80
|
|
|
77
81
|
/** @internal */
|
|
@@ -100,6 +104,7 @@ export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
|
|
|
100
104
|
purpose: Purpose$inboundSchema,
|
|
101
105
|
status: FileStatus$inboundSchema.optional(),
|
|
102
106
|
status_details: z.string().optional(),
|
|
107
|
+
sha256: z.nullable(z.string()).optional(),
|
|
103
108
|
}).transform((v) => {
|
|
104
109
|
return remap$(v, {
|
|
105
110
|
"created_at": "createdAt",
|
|
@@ -118,6 +123,7 @@ export type FileT$Outbound = {
|
|
|
118
123
|
purpose: string;
|
|
119
124
|
status?: string | undefined;
|
|
120
125
|
status_details?: string | undefined;
|
|
126
|
+
sha256?: string | null | undefined;
|
|
121
127
|
};
|
|
122
128
|
|
|
123
129
|
/** @internal */
|
|
@@ -135,6 +141,7 @@ export const FileT$outboundSchema: z.ZodType<
|
|
|
135
141
|
purpose: Purpose$outboundSchema,
|
|
136
142
|
status: FileStatus$outboundSchema.optional(),
|
|
137
143
|
statusDetails: z.string().optional(),
|
|
144
|
+
sha256: z.nullable(z.string()).optional(),
|
|
138
145
|
}).transform((v) => {
|
|
139
146
|
return remap$(v, {
|
|
140
147
|
createdAt: "created_at",
|