@orq-ai/node 3.3.0-rc.14 → 3.3.0-rc.15
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 +0 -2
- package/bin/mcp-server.js +421 -2515
- package/bin/mcp-server.js.map +28 -31
- package/docs/sdks/knowledge/README.md +2 -86
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +1 -3
- package/mcp-server/server.js.map +1 -1
- package/models/operations/bulkcreatedatapoints.js +2 -2
- package/models/operations/createchunk.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createknowledge.d.ts +106 -1300
- package/models/operations/createknowledge.d.ts.map +1 -1
- package/models/operations/createknowledge.js +85 -1183
- package/models/operations/createknowledge.js.map +1 -1
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getoneknowledge.d.ts +59 -676
- package/models/operations/getoneknowledge.d.ts.map +1 -1
- package/models/operations/getoneknowledge.js +49 -629
- package/models/operations/getoneknowledge.js.map +1 -1
- package/models/operations/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/listknowledgebases.d.ts +59 -676
- package/models/operations/listknowledgebases.d.ts.map +1 -1
- package/models/operations/listknowledgebases.js +50 -632
- package/models/operations/listknowledgebases.js.map +1 -1
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updateknowledge.d.ts +120 -1308
- package/models/operations/updateknowledge.d.ts.map +1 -1
- package/models/operations/updateknowledge.js +100 -1203
- package/models/operations/updateknowledge.js.map +1 -1
- package/package.json +1 -1
- package/sdk/knowledge.d.ts +0 -4
- package/sdk/knowledge.d.ts.map +1 -1
- package/sdk/knowledge.js +0 -7
- package/sdk/knowledge.js.map +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 -3
- package/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/src/models/operations/createchunk.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createknowledge.ts +324 -2562
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getoneknowledge.ts +101 -1282
- package/src/models/operations/index.ts +0 -1
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/listknowledgebases.ts +101 -1309
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updateknowledge.ts +383 -2710
- package/src/sdk/knowledge.ts +0 -15
- package/funcs/knowledgeRetrieveFileUrl.d.ts +0 -14
- package/funcs/knowledgeRetrieveFileUrl.d.ts.map +0 -1
- package/funcs/knowledgeRetrieveFileUrl.js +0 -124
- package/funcs/knowledgeRetrieveFileUrl.js.map +0 -1
- package/mcp-server/tools/knowledgeRetrieveFileUrl.d.ts +0 -8
- package/mcp-server/tools/knowledgeRetrieveFileUrl.d.ts.map +0 -1
- package/mcp-server/tools/knowledgeRetrieveFileUrl.js +0 -62
- package/mcp-server/tools/knowledgeRetrieveFileUrl.js.map +0 -1
- package/models/operations/getonefileuploadurl.d.ts +0 -68
- package/models/operations/getonefileuploadurl.d.ts.map +0 -1
- package/models/operations/getonefileuploadurl.js +0 -113
- package/models/operations/getonefileuploadurl.js.map +0 -1
- package/src/funcs/knowledgeRetrieveFileUrl.ts +0 -176
- package/src/mcp-server/tools/knowledgeRetrieveFileUrl.ts +0 -35
- package/src/models/operations/getonefileuploadurl.ts +0 -157
package/src/sdk/knowledge.ts
CHANGED
|
@@ -13,7 +13,6 @@ import { knowledgeListChunks } from "../funcs/knowledgeListChunks.js";
|
|
|
13
13
|
import { knowledgeListDatasources } from "../funcs/knowledgeListDatasources.js";
|
|
14
14
|
import { knowledgeRetrieve } from "../funcs/knowledgeRetrieve.js";
|
|
15
15
|
import { knowledgeRetrieveDatasource } from "../funcs/knowledgeRetrieveDatasource.js";
|
|
16
|
-
import { knowledgeRetrieveFileUrl } from "../funcs/knowledgeRetrieveFileUrl.js";
|
|
17
16
|
import { knowledgeSearch } from "../funcs/knowledgeSearch.js";
|
|
18
17
|
import { knowledgeUpdate } from "../funcs/knowledgeUpdate.js";
|
|
19
18
|
import { knowledgeUpdateChunk } from "../funcs/knowledgeUpdateChunk.js";
|
|
@@ -115,20 +114,6 @@ export class Knowledge extends ClientSDK {
|
|
|
115
114
|
));
|
|
116
115
|
}
|
|
117
116
|
|
|
118
|
-
/**
|
|
119
|
-
* Retrieves the file upload url
|
|
120
|
-
*/
|
|
121
|
-
async retrieveFileUrl(
|
|
122
|
-
request: operations.GetOneFileUploadUrlRequest,
|
|
123
|
-
options?: RequestOptions,
|
|
124
|
-
): Promise<operations.GetOneFileUploadUrlResponseBody> {
|
|
125
|
-
return unwrapAsync(knowledgeRetrieveFileUrl(
|
|
126
|
-
this,
|
|
127
|
-
request,
|
|
128
|
-
options,
|
|
129
|
-
));
|
|
130
|
-
}
|
|
131
|
-
|
|
132
117
|
/**
|
|
133
118
|
* List all datasources
|
|
134
119
|
*/
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { OrqCore } from "../core.js";
|
|
2
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
-
import { APIError } from "../models/errors/apierror.js";
|
|
4
|
-
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
-
import * as errors from "../models/errors/index.js";
|
|
6
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
7
|
-
import * as operations from "../models/operations/index.js";
|
|
8
|
-
import { APIPromise } from "../types/async.js";
|
|
9
|
-
import { Result } from "../types/fp.js";
|
|
10
|
-
/**
|
|
11
|
-
* Retrieves the file upload url
|
|
12
|
-
*/
|
|
13
|
-
export declare function knowledgeRetrieveFileUrl(client: OrqCore, request: operations.GetOneFileUploadUrlRequest, options?: RequestOptions): APIPromise<Result<operations.GetOneFileUploadUrlResponseBody, errors.HonoApiError | APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
14
|
-
//# sourceMappingURL=knowledgeRetrieveFileUrl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"knowledgeRetrieveFileUrl.d.ts","sourceRoot":"","sources":["../src/funcs/knowledgeRetrieveFileUrl.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,+BAA+B,EACxC,MAAM,CAAC,YAAY,GACnB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.knowledgeRetrieveFileUrl = knowledgeRetrieveFileUrl;
|
|
40
|
-
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
-
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
-
const primitives_js_1 = require("../lib/primitives.js");
|
|
43
|
-
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
-
const security_js_1 = require("../lib/security.js");
|
|
45
|
-
const url_js_1 = require("../lib/url.js");
|
|
46
|
-
const errors = __importStar(require("../models/errors/index.js"));
|
|
47
|
-
const operations = __importStar(require("../models/operations/index.js"));
|
|
48
|
-
const async_js_1 = require("../types/async.js");
|
|
49
|
-
/**
|
|
50
|
-
* Retrieves the file upload url
|
|
51
|
-
*/
|
|
52
|
-
function knowledgeRetrieveFileUrl(client, request, options) {
|
|
53
|
-
return new async_js_1.APIPromise($do(client, request, options));
|
|
54
|
-
}
|
|
55
|
-
async function $do(client, request, options) {
|
|
56
|
-
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.GetOneFileUploadUrlRequest$outboundSchema.parse(value), "Input validation failed");
|
|
57
|
-
if (!parsed.ok) {
|
|
58
|
-
return [parsed, { status: "invalid" }];
|
|
59
|
-
}
|
|
60
|
-
const payload = parsed.value;
|
|
61
|
-
const body = null;
|
|
62
|
-
const pathParams = {
|
|
63
|
-
knowledge_id: (0, encodings_js_1.encodeSimple)("knowledge_id", payload.knowledge_id, {
|
|
64
|
-
explode: false,
|
|
65
|
-
charEncoding: "percent",
|
|
66
|
-
}),
|
|
67
|
-
};
|
|
68
|
-
const path = (0, url_js_1.pathToFunc)("/v2/knowledge/{knowledge_id}/upload-file")(pathParams);
|
|
69
|
-
const query = (0, encodings_js_1.encodeFormQuery)({
|
|
70
|
-
"contentType": payload.contentType,
|
|
71
|
-
"datasourceId": payload.datasourceId,
|
|
72
|
-
"fileName": payload.fileName,
|
|
73
|
-
});
|
|
74
|
-
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
75
|
-
Accept: "application/json",
|
|
76
|
-
}));
|
|
77
|
-
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
78
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
79
|
-
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
80
|
-
const context = {
|
|
81
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
82
|
-
operationID: "GetOneFileUploadUrl",
|
|
83
|
-
oAuth2Scopes: [],
|
|
84
|
-
resolvedSecurity: requestSecurity,
|
|
85
|
-
securitySource: client._options.apiKey,
|
|
86
|
-
retryConfig: options?.retries
|
|
87
|
-
|| client._options.retryConfig
|
|
88
|
-
|| { strategy: "none" },
|
|
89
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
90
|
-
};
|
|
91
|
-
const requestRes = client._createRequest(context, {
|
|
92
|
-
security: requestSecurity,
|
|
93
|
-
method: "GET",
|
|
94
|
-
baseURL: options?.serverURL,
|
|
95
|
-
path: path,
|
|
96
|
-
headers: headers,
|
|
97
|
-
query: query,
|
|
98
|
-
body: body,
|
|
99
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
100
|
-
}, options);
|
|
101
|
-
if (!requestRes.ok) {
|
|
102
|
-
return [requestRes, { status: "invalid" }];
|
|
103
|
-
}
|
|
104
|
-
const req = requestRes.value;
|
|
105
|
-
const doResult = await client._do(req, {
|
|
106
|
-
context,
|
|
107
|
-
errorCodes: ["4XX", "500", "5XX"],
|
|
108
|
-
retryConfig: context.retryConfig,
|
|
109
|
-
retryCodes: context.retryCodes,
|
|
110
|
-
});
|
|
111
|
-
if (!doResult.ok) {
|
|
112
|
-
return [doResult, { status: "request-error", request: req }];
|
|
113
|
-
}
|
|
114
|
-
const response = doResult.value;
|
|
115
|
-
const responseFields = {
|
|
116
|
-
HttpMeta: { Response: response, Request: req },
|
|
117
|
-
};
|
|
118
|
-
const [result] = await M.match(M.json(200, operations.GetOneFileUploadUrlResponseBody$inboundSchema), M.jsonErr(500, errors.HonoApiError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, { extraFields: responseFields });
|
|
119
|
-
if (!result.ok) {
|
|
120
|
-
return [result, { status: "complete", request: req, response }];
|
|
121
|
-
}
|
|
122
|
-
return [result, { status: "complete", request: req, response }];
|
|
123
|
-
}
|
|
124
|
-
//# sourceMappingURL=knowledgeRetrieveFileUrl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"knowledgeRetrieveFileUrl.js","sourceRoot":"","sources":["../src/funcs/knowledgeRetrieveFileUrl.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BH,4DAsBC;AA9CD,sDAAoE;AACpE,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAS3C,kEAAoD;AAEpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;GAEG;AACH,SAAgB,wBAAwB,CACtC,MAAe,EACf,OAA8C,EAC9C,OAAw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AAK,EAAE,KAAK,CAAC;QACjC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAW5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,6CAA6C,CAAC,EACrE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,0BAA0B,CAAC,EACjD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as operations from "../../models/operations/index.js";
|
|
2
|
-
import { ToolDefinition } from "../tools.js";
|
|
3
|
-
declare const args: {
|
|
4
|
-
request: import("zod").ZodType<operations.GetOneFileUploadUrlRequest, import("zod").ZodTypeDef, unknown>;
|
|
5
|
-
};
|
|
6
|
-
export declare const tool$knowledgeRetrieveFileUrl: ToolDefinition<typeof args>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=knowledgeRetrieveFileUrl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"knowledgeRetrieveFileUrl.d.ts","sourceRoot":"","sources":["../../src/mcp-server/tools/knowledgeRetrieveFileUrl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,cAAc,CAAC,OAAO,IAAI,CAsBrE,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.tool$knowledgeRetrieveFileUrl = void 0;
|
|
40
|
-
const knowledgeRetrieveFileUrl_js_1 = require("../../funcs/knowledgeRetrieveFileUrl.js");
|
|
41
|
-
const operations = __importStar(require("../../models/operations/index.js"));
|
|
42
|
-
const tools_js_1 = require("../tools.js");
|
|
43
|
-
const args = {
|
|
44
|
-
request: operations.GetOneFileUploadUrlRequest$inboundSchema,
|
|
45
|
-
};
|
|
46
|
-
exports.tool$knowledgeRetrieveFileUrl = {
|
|
47
|
-
name: "knowledge-retrieve-file-url",
|
|
48
|
-
description: `Retrieves the file upload url`,
|
|
49
|
-
args,
|
|
50
|
-
tool: async (client, args, ctx) => {
|
|
51
|
-
const [result, apiCall] = await (0, knowledgeRetrieveFileUrl_js_1.knowledgeRetrieveFileUrl)(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
52
|
-
if (!result.ok) {
|
|
53
|
-
return {
|
|
54
|
-
content: [{ type: "text", text: result.error.message }],
|
|
55
|
-
isError: true,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const value = result.value;
|
|
59
|
-
return (0, tools_js_1.formatResult)(value, apiCall);
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
//# sourceMappingURL=knowledgeRetrieveFileUrl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"knowledgeRetrieveFileUrl.js","sourceRoot":"","sources":["../../src/mcp-server/tools/knowledgeRetrieveFileUrl.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yFAAmF;AACnF,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,wCAAwC;CAC7D,CAAC;AAEW,QAAA,6BAA6B,GAAgC;IACxE,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,+BAA+B;IAC5C,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,sDAAwB,EACtD,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CACzC,CAAC,QAAQ,EAAE,CAAC;QAEb,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,OAAO,IAAA,uBAAY,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
export type GetOneFileUploadUrlRequest = {
|
|
5
|
-
/**
|
|
6
|
-
* The unique identifier of the knowledge base
|
|
7
|
-
*/
|
|
8
|
-
knowledgeId: string;
|
|
9
|
-
fileName: string;
|
|
10
|
-
contentType: string;
|
|
11
|
-
datasourceId: string;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Expected upload request model
|
|
15
|
-
*/
|
|
16
|
-
export type GetOneFileUploadUrlResponseBody = {
|
|
17
|
-
objectName: string;
|
|
18
|
-
postPolicy?: any | undefined;
|
|
19
|
-
};
|
|
20
|
-
/** @internal */
|
|
21
|
-
export declare const GetOneFileUploadUrlRequest$inboundSchema: z.ZodType<GetOneFileUploadUrlRequest, z.ZodTypeDef, unknown>;
|
|
22
|
-
/** @internal */
|
|
23
|
-
export type GetOneFileUploadUrlRequest$Outbound = {
|
|
24
|
-
knowledge_id: string;
|
|
25
|
-
fileName: string;
|
|
26
|
-
contentType: string;
|
|
27
|
-
datasourceId: string;
|
|
28
|
-
};
|
|
29
|
-
/** @internal */
|
|
30
|
-
export declare const GetOneFileUploadUrlRequest$outboundSchema: z.ZodType<GetOneFileUploadUrlRequest$Outbound, z.ZodTypeDef, GetOneFileUploadUrlRequest>;
|
|
31
|
-
/**
|
|
32
|
-
* @internal
|
|
33
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
34
|
-
*/
|
|
35
|
-
export declare namespace GetOneFileUploadUrlRequest$ {
|
|
36
|
-
/** @deprecated use `GetOneFileUploadUrlRequest$inboundSchema` instead. */
|
|
37
|
-
const inboundSchema: z.ZodType<GetOneFileUploadUrlRequest, z.ZodTypeDef, unknown>;
|
|
38
|
-
/** @deprecated use `GetOneFileUploadUrlRequest$outboundSchema` instead. */
|
|
39
|
-
const outboundSchema: z.ZodType<GetOneFileUploadUrlRequest$Outbound, z.ZodTypeDef, GetOneFileUploadUrlRequest>;
|
|
40
|
-
/** @deprecated use `GetOneFileUploadUrlRequest$Outbound` instead. */
|
|
41
|
-
type Outbound = GetOneFileUploadUrlRequest$Outbound;
|
|
42
|
-
}
|
|
43
|
-
export declare function getOneFileUploadUrlRequestToJSON(getOneFileUploadUrlRequest: GetOneFileUploadUrlRequest): string;
|
|
44
|
-
export declare function getOneFileUploadUrlRequestFromJSON(jsonString: string): SafeParseResult<GetOneFileUploadUrlRequest, SDKValidationError>;
|
|
45
|
-
/** @internal */
|
|
46
|
-
export declare const GetOneFileUploadUrlResponseBody$inboundSchema: z.ZodType<GetOneFileUploadUrlResponseBody, z.ZodTypeDef, unknown>;
|
|
47
|
-
/** @internal */
|
|
48
|
-
export type GetOneFileUploadUrlResponseBody$Outbound = {
|
|
49
|
-
objectName: string;
|
|
50
|
-
postPolicy?: any | undefined;
|
|
51
|
-
};
|
|
52
|
-
/** @internal */
|
|
53
|
-
export declare const GetOneFileUploadUrlResponseBody$outboundSchema: z.ZodType<GetOneFileUploadUrlResponseBody$Outbound, z.ZodTypeDef, GetOneFileUploadUrlResponseBody>;
|
|
54
|
-
/**
|
|
55
|
-
* @internal
|
|
56
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
-
*/
|
|
58
|
-
export declare namespace GetOneFileUploadUrlResponseBody$ {
|
|
59
|
-
/** @deprecated use `GetOneFileUploadUrlResponseBody$inboundSchema` instead. */
|
|
60
|
-
const inboundSchema: z.ZodType<GetOneFileUploadUrlResponseBody, z.ZodTypeDef, unknown>;
|
|
61
|
-
/** @deprecated use `GetOneFileUploadUrlResponseBody$outboundSchema` instead. */
|
|
62
|
-
const outboundSchema: z.ZodType<GetOneFileUploadUrlResponseBody$Outbound, z.ZodTypeDef, GetOneFileUploadUrlResponseBody>;
|
|
63
|
-
/** @deprecated use `GetOneFileUploadUrlResponseBody$Outbound` instead. */
|
|
64
|
-
type Outbound = GetOneFileUploadUrlResponseBody$Outbound;
|
|
65
|
-
}
|
|
66
|
-
export declare function getOneFileUploadUrlResponseBodyToJSON(getOneFileUploadUrlResponseBody: GetOneFileUploadUrlResponseBody): string;
|
|
67
|
-
export declare function getOneFileUploadUrlResponseBodyFromJSON(jsonString: string): SafeParseResult<GetOneFileUploadUrlResponseBody, SDKValidationError>;
|
|
68
|
-
//# sourceMappingURL=getonefileuploadurl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getonefileuploadurl.d.ts","sourceRoot":"","sources":["../../src/models/operations/getonefileuploadurl.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,OAAO,CAUP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,mCAAmC,GAAG;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,OAAO,CAC/D,mCAAmC,EACnC,CAAC,CAAC,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|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.GetOneFileUploadUrlResponseBody$ = exports.GetOneFileUploadUrlResponseBody$outboundSchema = exports.GetOneFileUploadUrlResponseBody$inboundSchema = exports.GetOneFileUploadUrlRequest$ = exports.GetOneFileUploadUrlRequest$outboundSchema = exports.GetOneFileUploadUrlRequest$inboundSchema = void 0;
|
|
40
|
-
exports.getOneFileUploadUrlRequestToJSON = getOneFileUploadUrlRequestToJSON;
|
|
41
|
-
exports.getOneFileUploadUrlRequestFromJSON = getOneFileUploadUrlRequestFromJSON;
|
|
42
|
-
exports.getOneFileUploadUrlResponseBodyToJSON = getOneFileUploadUrlResponseBodyToJSON;
|
|
43
|
-
exports.getOneFileUploadUrlResponseBodyFromJSON = getOneFileUploadUrlResponseBodyFromJSON;
|
|
44
|
-
const z = __importStar(require("zod"));
|
|
45
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
46
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
47
|
-
/** @internal */
|
|
48
|
-
exports.GetOneFileUploadUrlRequest$inboundSchema = z.object({
|
|
49
|
-
knowledge_id: z.string(),
|
|
50
|
-
fileName: z.string(),
|
|
51
|
-
contentType: z.string(),
|
|
52
|
-
datasourceId: z.string(),
|
|
53
|
-
}).transform((v) => {
|
|
54
|
-
return (0, primitives_js_1.remap)(v, {
|
|
55
|
-
"knowledge_id": "knowledgeId",
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
/** @internal */
|
|
59
|
-
exports.GetOneFileUploadUrlRequest$outboundSchema = z.object({
|
|
60
|
-
knowledgeId: z.string(),
|
|
61
|
-
fileName: z.string(),
|
|
62
|
-
contentType: z.string(),
|
|
63
|
-
datasourceId: z.string(),
|
|
64
|
-
}).transform((v) => {
|
|
65
|
-
return (0, primitives_js_1.remap)(v, {
|
|
66
|
-
knowledgeId: "knowledge_id",
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
/**
|
|
70
|
-
* @internal
|
|
71
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
72
|
-
*/
|
|
73
|
-
var GetOneFileUploadUrlRequest$;
|
|
74
|
-
(function (GetOneFileUploadUrlRequest$) {
|
|
75
|
-
/** @deprecated use `GetOneFileUploadUrlRequest$inboundSchema` instead. */
|
|
76
|
-
GetOneFileUploadUrlRequest$.inboundSchema = exports.GetOneFileUploadUrlRequest$inboundSchema;
|
|
77
|
-
/** @deprecated use `GetOneFileUploadUrlRequest$outboundSchema` instead. */
|
|
78
|
-
GetOneFileUploadUrlRequest$.outboundSchema = exports.GetOneFileUploadUrlRequest$outboundSchema;
|
|
79
|
-
})(GetOneFileUploadUrlRequest$ || (exports.GetOneFileUploadUrlRequest$ = GetOneFileUploadUrlRequest$ = {}));
|
|
80
|
-
function getOneFileUploadUrlRequestToJSON(getOneFileUploadUrlRequest) {
|
|
81
|
-
return JSON.stringify(exports.GetOneFileUploadUrlRequest$outboundSchema.parse(getOneFileUploadUrlRequest));
|
|
82
|
-
}
|
|
83
|
-
function getOneFileUploadUrlRequestFromJSON(jsonString) {
|
|
84
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneFileUploadUrlRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneFileUploadUrlRequest' from JSON`);
|
|
85
|
-
}
|
|
86
|
-
/** @internal */
|
|
87
|
-
exports.GetOneFileUploadUrlResponseBody$inboundSchema = z.object({
|
|
88
|
-
objectName: z.string(),
|
|
89
|
-
postPolicy: z.any().optional(),
|
|
90
|
-
});
|
|
91
|
-
/** @internal */
|
|
92
|
-
exports.GetOneFileUploadUrlResponseBody$outboundSchema = z.object({
|
|
93
|
-
objectName: z.string(),
|
|
94
|
-
postPolicy: z.any().optional(),
|
|
95
|
-
});
|
|
96
|
-
/**
|
|
97
|
-
* @internal
|
|
98
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
99
|
-
*/
|
|
100
|
-
var GetOneFileUploadUrlResponseBody$;
|
|
101
|
-
(function (GetOneFileUploadUrlResponseBody$) {
|
|
102
|
-
/** @deprecated use `GetOneFileUploadUrlResponseBody$inboundSchema` instead. */
|
|
103
|
-
GetOneFileUploadUrlResponseBody$.inboundSchema = exports.GetOneFileUploadUrlResponseBody$inboundSchema;
|
|
104
|
-
/** @deprecated use `GetOneFileUploadUrlResponseBody$outboundSchema` instead. */
|
|
105
|
-
GetOneFileUploadUrlResponseBody$.outboundSchema = exports.GetOneFileUploadUrlResponseBody$outboundSchema;
|
|
106
|
-
})(GetOneFileUploadUrlResponseBody$ || (exports.GetOneFileUploadUrlResponseBody$ = GetOneFileUploadUrlResponseBody$ = {}));
|
|
107
|
-
function getOneFileUploadUrlResponseBodyToJSON(getOneFileUploadUrlResponseBody) {
|
|
108
|
-
return JSON.stringify(exports.GetOneFileUploadUrlResponseBody$outboundSchema.parse(getOneFileUploadUrlResponseBody));
|
|
109
|
-
}
|
|
110
|
-
function getOneFileUploadUrlResponseBodyFromJSON(jsonString) {
|
|
111
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneFileUploadUrlResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneFileUploadUrlResponseBody' from JSON`);
|
|
112
|
-
}
|
|
113
|
-
//# sourceMappingURL=getonefileuploadurl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getonefileuploadurl.js","sourceRoot":"","sources":["../../src/models/operations/getonefileuploadurl.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EH,4EAMC;AAED,gFAQC;AAyCD,sFAQC;AAED,0FAQC;AAxJD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAsBjD,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,MAAM,CAAC;IACX,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE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AAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAQH,gBAAgB;AACH,QAAA,8CAA8C,GAIvD,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,gCAAgC,CAOhD;AAPD,WAAiB,gCAAgC;IAC/C,+EAA+E;IAClE,8CAAa,GAAG,qDAA6C,CAAC;IAC3E,gFAAgF;IACnE,+CAAc,GAAG,sDAA8C,CAAC;AAG/E,CAAC,EAPgB,gCAAgC,gDAAhC,gCAAgC,QAOhD;AAED,SAAgB,qCAAqC,CACnD,+BAAgE;IAEhE,OAAO,IAAI,CAAC,SAAS,CACnB,sDAA8C,CAAC,KAAK,CAClD,+BAA+B,CAChC,CACF,CAAC;AACJ,CAAC;AAED,SAAgB,uCAAuC,CACrD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qDAA6C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzE,6DAA6D,CAC9D,CAAC;AACJ,CAAC"}
|
|
@@ -1,176 +0,0 @@
|
|
|
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 * as M from "../lib/matchers.js";
|
|
8
|
-
import { compactMap } from "../lib/primitives.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import { APIError } from "../models/errors/apierror.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 { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
-
import * as operations from "../models/operations/index.js";
|
|
24
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
25
|
-
import { Result } from "../types/fp.js";
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Retrieves the file upload url
|
|
29
|
-
*/
|
|
30
|
-
export function knowledgeRetrieveFileUrl(
|
|
31
|
-
client: OrqCore,
|
|
32
|
-
request: operations.GetOneFileUploadUrlRequest,
|
|
33
|
-
options?: RequestOptions,
|
|
34
|
-
): APIPromise<
|
|
35
|
-
Result<
|
|
36
|
-
operations.GetOneFileUploadUrlResponseBody,
|
|
37
|
-
| errors.HonoApiError
|
|
38
|
-
| APIError
|
|
39
|
-
| SDKValidationError
|
|
40
|
-
| UnexpectedClientError
|
|
41
|
-
| InvalidRequestError
|
|
42
|
-
| RequestAbortedError
|
|
43
|
-
| RequestTimeoutError
|
|
44
|
-
| ConnectionError
|
|
45
|
-
>
|
|
46
|
-
> {
|
|
47
|
-
return new APIPromise($do(
|
|
48
|
-
client,
|
|
49
|
-
request,
|
|
50
|
-
options,
|
|
51
|
-
));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
async function $do(
|
|
55
|
-
client: OrqCore,
|
|
56
|
-
request: operations.GetOneFileUploadUrlRequest,
|
|
57
|
-
options?: RequestOptions,
|
|
58
|
-
): Promise<
|
|
59
|
-
[
|
|
60
|
-
Result<
|
|
61
|
-
operations.GetOneFileUploadUrlResponseBody,
|
|
62
|
-
| errors.HonoApiError
|
|
63
|
-
| APIError
|
|
64
|
-
| SDKValidationError
|
|
65
|
-
| UnexpectedClientError
|
|
66
|
-
| InvalidRequestError
|
|
67
|
-
| RequestAbortedError
|
|
68
|
-
| RequestTimeoutError
|
|
69
|
-
| ConnectionError
|
|
70
|
-
>,
|
|
71
|
-
APICall,
|
|
72
|
-
]
|
|
73
|
-
> {
|
|
74
|
-
const parsed = safeParse(
|
|
75
|
-
request,
|
|
76
|
-
(value) =>
|
|
77
|
-
operations.GetOneFileUploadUrlRequest$outboundSchema.parse(value),
|
|
78
|
-
"Input validation failed",
|
|
79
|
-
);
|
|
80
|
-
if (!parsed.ok) {
|
|
81
|
-
return [parsed, { status: "invalid" }];
|
|
82
|
-
}
|
|
83
|
-
const payload = parsed.value;
|
|
84
|
-
const body = null;
|
|
85
|
-
|
|
86
|
-
const pathParams = {
|
|
87
|
-
knowledge_id: encodeSimple("knowledge_id", payload.knowledge_id, {
|
|
88
|
-
explode: false,
|
|
89
|
-
charEncoding: "percent",
|
|
90
|
-
}),
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
const path = pathToFunc("/v2/knowledge/{knowledge_id}/upload-file")(
|
|
94
|
-
pathParams,
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
const query = encodeFormQuery({
|
|
98
|
-
"contentType": payload.contentType,
|
|
99
|
-
"datasourceId": payload.datasourceId,
|
|
100
|
-
"fileName": payload.fileName,
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
const headers = new Headers(compactMap({
|
|
104
|
-
Accept: "application/json",
|
|
105
|
-
}));
|
|
106
|
-
|
|
107
|
-
const secConfig = await extractSecurity(client._options.apiKey);
|
|
108
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
109
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
110
|
-
|
|
111
|
-
const context = {
|
|
112
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
113
|
-
operationID: "GetOneFileUploadUrl",
|
|
114
|
-
oAuth2Scopes: [],
|
|
115
|
-
|
|
116
|
-
resolvedSecurity: requestSecurity,
|
|
117
|
-
|
|
118
|
-
securitySource: client._options.apiKey,
|
|
119
|
-
retryConfig: options?.retries
|
|
120
|
-
|| client._options.retryConfig
|
|
121
|
-
|| { strategy: "none" },
|
|
122
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
const requestRes = client._createRequest(context, {
|
|
126
|
-
security: requestSecurity,
|
|
127
|
-
method: "GET",
|
|
128
|
-
baseURL: options?.serverURL,
|
|
129
|
-
path: path,
|
|
130
|
-
headers: headers,
|
|
131
|
-
query: query,
|
|
132
|
-
body: body,
|
|
133
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
134
|
-
}, options);
|
|
135
|
-
if (!requestRes.ok) {
|
|
136
|
-
return [requestRes, { status: "invalid" }];
|
|
137
|
-
}
|
|
138
|
-
const req = requestRes.value;
|
|
139
|
-
|
|
140
|
-
const doResult = await client._do(req, {
|
|
141
|
-
context,
|
|
142
|
-
errorCodes: ["4XX", "500", "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 responseFields = {
|
|
152
|
-
HttpMeta: { Response: response, Request: req },
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
const [result] = await M.match<
|
|
156
|
-
operations.GetOneFileUploadUrlResponseBody,
|
|
157
|
-
| errors.HonoApiError
|
|
158
|
-
| APIError
|
|
159
|
-
| SDKValidationError
|
|
160
|
-
| UnexpectedClientError
|
|
161
|
-
| InvalidRequestError
|
|
162
|
-
| RequestAbortedError
|
|
163
|
-
| RequestTimeoutError
|
|
164
|
-
| ConnectionError
|
|
165
|
-
>(
|
|
166
|
-
M.json(200, operations.GetOneFileUploadUrlResponseBody$inboundSchema),
|
|
167
|
-
M.jsonErr(500, errors.HonoApiError$inboundSchema),
|
|
168
|
-
M.fail("4XX"),
|
|
169
|
-
M.fail("5XX"),
|
|
170
|
-
)(response, { extraFields: responseFields });
|
|
171
|
-
if (!result.ok) {
|
|
172
|
-
return [result, { status: "complete", request: req, response }];
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
return [result, { status: "complete", request: req, response }];
|
|
176
|
-
}
|