@orq-ai/node 3.10.0-rc.2 → 3.10.0-rc.20
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 +93 -91
- package/bin/mcp-server.js +1983 -1375
- package/bin/mcp-server.js.map +50 -47
- package/docs/sdks/{knowledgebases → chunking}/README.md +10 -10
- package/docs/sdks/knowledge/README.md +77 -0
- package/examples/README.md +5 -0
- package/examples/contactsCreate.example.ts +2 -0
- package/examples/package-lock.json +2 -2
- package/funcs/{knowledgeBasesChunkText.d.ts → chunkingParse.d.ts} +3 -3
- package/funcs/chunkingParse.d.ts.map +1 -0
- package/funcs/{knowledgeBasesChunkText.js → chunkingParse.js} +8 -8
- package/funcs/chunkingParse.js.map +1 -0
- package/funcs/knowledgeCreate.d.ts +14 -0
- package/funcs/knowledgeCreate.d.ts.map +1 -0
- package/funcs/knowledgeCreate.js +111 -0
- package/funcs/knowledgeCreate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/event-streams.d.ts +1 -1
- package/lib/event-streams.d.ts.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +5 -3
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/chunkingParse.d.ts +8 -0
- package/mcp-server/tools/chunkingParse.d.ts.map +1 -0
- package/mcp-server/tools/{knowledgeBasesChunkText.js → chunkingParse.js} +8 -8
- package/mcp-server/tools/chunkingParse.js.map +1 -0
- package/mcp-server/tools/knowledgeCreate.d.ts +8 -0
- package/mcp-server/tools/knowledgeCreate.d.ts.map +1 -0
- package/mcp-server/tools/knowledgeCreate.js +62 -0
- package/mcp-server/tools/knowledgeCreate.js.map +1 -0
- package/models/components/deployments.d.ts +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.d.ts +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +16 -16
- package/models/operations/createknowledge.d.ts +426 -0
- package/models/operations/createknowledge.d.ts.map +1 -0
- package/models/operations/createknowledge.js +431 -0
- package/models/operations/createknowledge.js.map +1 -0
- package/models/operations/createprompt.d.ts +14 -2
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +4 -0
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/deploymentcreatemetric.d.ts +2 -2
- package/models/operations/deploymentgetconfig.d.ts +3 -3
- package/models/operations/deploymentinvoke.d.ts +6 -0
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +2 -0
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +7 -1
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +2 -0
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +2 -2
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getallprompts.d.ts +7 -1
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +2 -0
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getevals.d.ts +525 -4
- package/models/operations/getevals.d.ts.map +1 -1
- package/models/operations/getevals.js +582 -36
- package/models/operations/getevals.js.map +1 -1
- package/models/operations/getoneprompt.d.ts +7 -1
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +2 -0
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +7 -1
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +2 -0
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/index.d.ts +2 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -1
- package/models/operations/index.js.map +1 -1
- package/models/operations/invokeeval.d.ts +5 -5
- package/models/operations/invokeeval.d.ts.map +1 -1
- package/models/operations/invokeeval.js +4 -4
- package/models/operations/invokeeval.js.map +1 -1
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.d.ts +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/listpromptversions.d.ts +7 -1
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +2 -0
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/{chunktext.d.ts → parse.d.ts} +83 -83
- package/models/operations/parse.d.ts.map +1 -0
- package/models/operations/{chunktext.js → parse.js} +113 -117
- package/models/operations/parse.js.map +1 -0
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.d.ts +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/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.d.ts +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updateknowledge.d.ts +106 -106
- package/models/operations/updateknowledge.d.ts.map +1 -1
- package/models/operations/updateknowledge.js +125 -129
- package/models/operations/updateknowledge.js.map +1 -1
- package/models/operations/updateprompt.d.ts +14 -2
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +4 -0
- package/models/operations/updateprompt.js.map +1 -1
- package/package.json +2 -2
- package/sdk/{knowledgebases.d.ts → chunking.d.ts} +4 -4
- package/sdk/chunking.d.ts.map +1 -0
- package/sdk/{knowledgebases.js → chunking.js} +8 -8
- package/sdk/chunking.js.map +1 -0
- package/sdk/knowledge.d.ts +4 -0
- package/sdk/knowledge.d.ts.map +1 -1
- package/sdk/knowledge.js +7 -0
- package/sdk/knowledge.js.map +1 -1
- package/sdk/sdk.d.ts +3 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +3 -3
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/{knowledgeBasesChunkText.ts → chunkingParse.ts} +11 -11
- package/src/funcs/knowledgeCreate.ts +158 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/event-streams.ts +1 -1
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -3
- package/src/mcp-server/tools/{knowledgeBasesChunkText.ts → chunkingParse.ts} +6 -6
- package/src/mcp-server/tools/knowledgeCreate.ts +35 -0
- package/src/models/components/deployments.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 +4 -4
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createknowledge.ts +846 -0
- package/src/models/operations/createprompt.ts +6 -2
- package/src/models/operations/deploymentcreatemetric.ts +2 -2
- package/src/models/operations/deploymentgetconfig.ts +3 -3
- package/src/models/operations/deploymentinvoke.ts +2 -0
- package/src/models/operations/deployments.ts +3 -1
- package/src/models/operations/deploymentstream.ts +2 -2
- 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/getallprompts.ts +3 -1
- package/src/models/operations/getevals.ts +1159 -32
- package/src/models/operations/getoneprompt.ts +3 -1
- package/src/models/operations/getpromptversion.ts +3 -1
- package/src/models/operations/index.ts +2 -1
- package/src/models/operations/invokeeval.ts +9 -9
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +3 -3
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/listpromptversions.ts +3 -1
- package/src/models/operations/{chunktext.ts → parse.ts} +164 -183
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +3 -3
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updateknowledge.ts +266 -206
- package/src/models/operations/updateprompt.ts +6 -2
- package/src/sdk/{knowledgebases.ts → chunking.ts} +7 -7
- package/src/sdk/knowledge.ts +15 -0
- package/src/sdk/sdk.ts +4 -4
- package/funcs/knowledgeBasesChunkText.d.ts.map +0 -1
- package/funcs/knowledgeBasesChunkText.js.map +0 -1
- package/mcp-server/tools/knowledgeBasesChunkText.d.ts +0 -8
- package/mcp-server/tools/knowledgeBasesChunkText.d.ts.map +0 -1
- package/mcp-server/tools/knowledgeBasesChunkText.js.map +0 -1
- package/models/operations/chunktext.d.ts.map +0 -1
- package/models/operations/chunktext.js.map +0 -1
- package/sdk/knowledgebases.d.ts.map +0 -1
- package/sdk/knowledgebases.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
2
|
import * as operations from "../models/operations/index.js";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class Chunking extends ClientSDK {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Parse text
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
8
|
* Split large text documents into smaller, manageable chunks using different chunking strategies optimized for RAG (Retrieval-Augmented Generation) workflows. This endpoint supports multiple chunking algorithms including token-based, sentence-based, recursive, semantic, and specialized strategies.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
parse(request: operations.ParseChunkingRequest, options?: RequestOptions): Promise<operations.ParseResponseBody>;
|
|
11
11
|
}
|
|
12
|
-
//# sourceMappingURL=
|
|
12
|
+
//# sourceMappingURL=chunking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunking.d.ts","sourceRoot":"","sources":["../src/sdk/chunking.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,QAAS,SAAQ,SAAS;IACrC;;;;;OAKG;IACG,KAAK,CACT,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC;CAOzC"}
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
const
|
|
6
|
+
exports.Chunking = void 0;
|
|
7
|
+
const chunkingParse_js_1 = require("../funcs/chunkingParse.js");
|
|
8
8
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
9
9
|
const fp_js_1 = require("../types/fp.js");
|
|
10
|
-
class
|
|
10
|
+
class Chunking extends sdks_js_1.ClientSDK {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Parse text
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Split large text documents into smaller, manageable chunks using different chunking strategies optimized for RAG (Retrieval-Augmented Generation) workflows. This endpoint supports multiple chunking algorithms including token-based, sentence-based, recursive, semantic, and specialized strategies.
|
|
16
16
|
*/
|
|
17
|
-
async
|
|
18
|
-
return (0, fp_js_1.unwrapAsync)((0,
|
|
17
|
+
async parse(request, options) {
|
|
18
|
+
return (0, fp_js_1.unwrapAsync)((0, chunkingParse_js_1.chunkingParse)(this, request, options));
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
exports.
|
|
22
|
-
//# sourceMappingURL=
|
|
21
|
+
exports.Chunking = Chunking;
|
|
22
|
+
//# sourceMappingURL=chunking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunking.js","sourceRoot":"","sources":["../src/sdk/chunking.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gEAA0D;AAC1D,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,QAAS,SAAQ,mBAAS;IACrC;;;;;OAKG;IACH,KAAK,CAAC,KAAK,CACT,OAAwC,EACxC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gCAAa,EAC9B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAjBD,4BAiBC"}
|
package/sdk/knowledge.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ export declare class Knowledge extends ClientSDK {
|
|
|
8
8
|
* Returns a list of your knowledge bases. The knowledge bases are returned sorted by creation date, with the most recent knowledge bases appearing first
|
|
9
9
|
*/
|
|
10
10
|
list(request?: operations.ListKnowledgeBasesRequest | undefined, options?: RequestOptions): Promise<operations.ListKnowledgeBasesResponseBody>;
|
|
11
|
+
/**
|
|
12
|
+
* Create a knowledge
|
|
13
|
+
*/
|
|
14
|
+
create(request: operations.CreateKnowledgeRequestBody, options?: RequestOptions): Promise<operations.CreateKnowledgeResponseBody>;
|
|
11
15
|
/**
|
|
12
16
|
* Retrieves a knowledge base
|
|
13
17
|
*
|
package/sdk/knowledge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge.d.ts","sourceRoot":"","sources":["../src/sdk/knowledge.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"knowledge.d.ts","sourceRoot":"","sources":["../src/sdk/knowledge.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,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"__esModule", { value: true });
|
|
6
6
|
exports.Knowledge = void 0;
|
|
7
|
+
const knowledgeCreate_js_1 = require("../funcs/knowledgeCreate.js");
|
|
7
8
|
const knowledgeCreateChunks_js_1 = require("../funcs/knowledgeCreateChunks.js");
|
|
8
9
|
const knowledgeCreateDatasource_js_1 = require("../funcs/knowledgeCreateDatasource.js");
|
|
9
10
|
const knowledgeDelete_js_1 = require("../funcs/knowledgeDelete.js");
|
|
@@ -31,6 +32,12 @@ class Knowledge extends sdks_js_1.ClientSDK {
|
|
|
31
32
|
async list(request, options) {
|
|
32
33
|
return (0, fp_js_1.unwrapAsync)((0, knowledgeList_js_1.knowledgeList)(this, request, options));
|
|
33
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Create a knowledge
|
|
37
|
+
*/
|
|
38
|
+
async create(request, options) {
|
|
39
|
+
return (0, fp_js_1.unwrapAsync)((0, knowledgeCreate_js_1.knowledgeCreate)(this, request, options));
|
|
40
|
+
}
|
|
34
41
|
/**
|
|
35
42
|
* Retrieves a knowledge base
|
|
36
43
|
*
|
package/sdk/knowledge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge.js","sourceRoot":"","sources":["../src/sdk/knowledge.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gFAA0E;AAC1E,wFAAkF;AAClF,oEAA8D;AAC9D,8EAAwE;AACxE,wFAAkF;AAClF,gEAA0D;AAC1D,4EAAsE;AACtE,sFAAgF;AAChF,wEAAkE;AAClE,kFAA4E;AAC5E,4FAAsF;AACtF,oEAA8D;AAC9D,oEAA8D;AAC9D,8EAAwE;AACxE,wFAAkF;AAClF,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,SAAU,SAAQ,mBAAS;IACtC;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,OAA0D,EAC1D,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gCAAa,EAC9B,IAAI,EACJ,OAAO,EACP,OA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ACH,KAAK,CAAC,UAAU,CACd,OAAqC,EACrC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4CAAmB,EACpC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,aAAa,CACjB,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kDAAsB,EACvC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA/OD,8BA+OC"}
|
package/sdk/sdk.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ClientSDK } from "../lib/sdks.js";
|
|
2
|
+
import { Chunking } from "./chunking.js";
|
|
2
3
|
import { Contacts } from "./contacts.js";
|
|
3
4
|
import { Datasets } from "./datasets.js";
|
|
4
5
|
import { Deployments } from "./deployments.js";
|
|
@@ -6,7 +7,6 @@ import { Evals } from "./evals.js";
|
|
|
6
7
|
import { Feedback } from "./feedback.js";
|
|
7
8
|
import { Files } from "./files.js";
|
|
8
9
|
import { Knowledge } from "./knowledge.js";
|
|
9
|
-
import { KnowledgeBases } from "./knowledgebases.js";
|
|
10
10
|
import { Models } from "./models.js";
|
|
11
11
|
import { Prompts } from "./prompts.js";
|
|
12
12
|
import { Remoteconfigs } from "./remoteconfigs.js";
|
|
@@ -29,8 +29,8 @@ export declare class Orq extends ClientSDK {
|
|
|
29
29
|
get datasets(): Datasets;
|
|
30
30
|
private _knowledge?;
|
|
31
31
|
get knowledge(): Knowledge;
|
|
32
|
-
private
|
|
33
|
-
get
|
|
32
|
+
private _chunking?;
|
|
33
|
+
get chunking(): Chunking;
|
|
34
34
|
private _evals?;
|
|
35
35
|
get evals(): Evals;
|
|
36
36
|
}
|
package/sdk/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM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
+
const chunking_js_1 = require("./chunking.js");
|
|
8
9
|
const contacts_js_1 = require("./contacts.js");
|
|
9
10
|
const datasets_js_1 = require("./datasets.js");
|
|
10
11
|
const deployments_js_1 = require("./deployments.js");
|
|
@@ -12,7 +13,6 @@ const evals_js_1 = require("./evals.js");
|
|
|
12
13
|
const feedback_js_1 = require("./feedback.js");
|
|
13
14
|
const files_js_1 = require("./files.js");
|
|
14
15
|
const knowledge_js_1 = require("./knowledge.js");
|
|
15
|
-
const knowledgebases_js_1 = require("./knowledgebases.js");
|
|
16
16
|
const models_js_1 = require("./models.js");
|
|
17
17
|
const prompts_js_1 = require("./prompts.js");
|
|
18
18
|
const remoteconfigs_js_1 = require("./remoteconfigs.js");
|
|
@@ -44,8 +44,8 @@ class Orq extends sdks_js_1.ClientSDK {
|
|
|
44
44
|
get knowledge() {
|
|
45
45
|
return (this._knowledge ?? (this._knowledge = new knowledge_js_1.Knowledge(this._options)));
|
|
46
46
|
}
|
|
47
|
-
get
|
|
48
|
-
return (this.
|
|
47
|
+
get chunking() {
|
|
48
|
+
return (this._chunking ?? (this._chunking = new chunking_js_1.Chunking(this._options)));
|
|
49
49
|
}
|
|
50
50
|
get evals() {
|
|
51
51
|
return (this._evals ?? (this._evals = new evals_js_1.Evals(this._options)));
|
package/sdk/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,+CAAyC;AACzC,+CAAyC;AACzC,qDAA+C;AAC/C,yCAAmC;AACnC,+CAAyC;AACzC,yCAAmC;AACnC,iDAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,+CAAyC;AACzC,+CAAyC;AACzC,+CAAyC;AACzC,qDAA+C;AAC/C,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AO,CAAC,IAAI,CAAC,SAAS,KAAd,IAAI,CAAC,SAAS,GAAK,IAAI,sBAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC1D,CAAC;IAGD,IAAI,SAAS;QACX,OAAO,CAAC,IAAI,CAAC,UAAU,KAAf,IAAI,CAAC,UAAU,GAAK,IAAI,wBAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC5D,CAAC;IAGD,IAAI,QAAQ;QACV,OAAO,CAAC,IAAI,CAAC,SAAS,KAAd,IAAI,CAAC,SAAS,GAAK,IAAI,sBAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC1D,CAAC;IAGD,IAAI,KAAK;QACP,OAAO,CAAC,IAAI,CAAC,MAAM,KAAX,IAAI,CAAC,MAAM,GAAK,IAAI,gBAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpD,CAAC;CACF;AAvDD,kBAuDC"}
|
|
@@ -25,18 +25,18 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Parse text
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
31
|
* Split large text documents into smaller, manageable chunks using different chunking strategies optimized for RAG (Retrieval-Augmented Generation) workflows. This endpoint supports multiple chunking algorithms including token-based, sentence-based, recursive, semantic, and specialized strategies.
|
|
32
32
|
*/
|
|
33
|
-
export function
|
|
33
|
+
export function chunkingParse(
|
|
34
34
|
client: OrqCore,
|
|
35
|
-
request: operations.
|
|
35
|
+
request: operations.ParseChunkingRequest,
|
|
36
36
|
options?: RequestOptions,
|
|
37
37
|
): APIPromise<
|
|
38
38
|
Result<
|
|
39
|
-
operations.
|
|
39
|
+
operations.ParseResponseBody,
|
|
40
40
|
| OrqError
|
|
41
41
|
| ResponseValidationError
|
|
42
42
|
| ConnectionError
|
|
@@ -56,12 +56,12 @@ export function knowledgeBasesChunkText(
|
|
|
56
56
|
|
|
57
57
|
async function $do(
|
|
58
58
|
client: OrqCore,
|
|
59
|
-
request: operations.
|
|
59
|
+
request: operations.ParseChunkingRequest,
|
|
60
60
|
options?: RequestOptions,
|
|
61
61
|
): Promise<
|
|
62
62
|
[
|
|
63
63
|
Result<
|
|
64
|
-
operations.
|
|
64
|
+
operations.ParseResponseBody,
|
|
65
65
|
| OrqError
|
|
66
66
|
| ResponseValidationError
|
|
67
67
|
| ConnectionError
|
|
@@ -76,7 +76,7 @@ async function $do(
|
|
|
76
76
|
> {
|
|
77
77
|
const parsed = safeParse(
|
|
78
78
|
request,
|
|
79
|
-
(value) => operations.
|
|
79
|
+
(value) => operations.ParseChunkingRequest$outboundSchema.parse(value),
|
|
80
80
|
"Input validation failed",
|
|
81
81
|
);
|
|
82
82
|
if (!parsed.ok) {
|
|
@@ -85,7 +85,7 @@ async function $do(
|
|
|
85
85
|
const payload = parsed.value;
|
|
86
86
|
const body = encodeJSON("body", payload, { explode: true });
|
|
87
87
|
|
|
88
|
-
const path = pathToFunc("/v2/
|
|
88
|
+
const path = pathToFunc("/v2/chunking")();
|
|
89
89
|
|
|
90
90
|
const headers = new Headers(compactMap({
|
|
91
91
|
"Content-Type": "application/json",
|
|
@@ -99,7 +99,7 @@ async function $do(
|
|
|
99
99
|
const context = {
|
|
100
100
|
options: client._options,
|
|
101
101
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
102
|
-
operationID: "
|
|
102
|
+
operationID: "parse",
|
|
103
103
|
oAuth2Scopes: [],
|
|
104
104
|
|
|
105
105
|
resolvedSecurity: requestSecurity,
|
|
@@ -138,7 +138,7 @@ async function $do(
|
|
|
138
138
|
const response = doResult.value;
|
|
139
139
|
|
|
140
140
|
const [result] = await M.match<
|
|
141
|
-
operations.
|
|
141
|
+
operations.ParseResponseBody,
|
|
142
142
|
| OrqError
|
|
143
143
|
| ResponseValidationError
|
|
144
144
|
| ConnectionError
|
|
@@ -148,7 +148,7 @@ async function $do(
|
|
|
148
148
|
| UnexpectedClientError
|
|
149
149
|
| SDKValidationError
|
|
150
150
|
>(
|
|
151
|
-
M.json(200, operations.
|
|
151
|
+
M.json(200, operations.ParseResponseBody$inboundSchema),
|
|
152
152
|
M.fail("4XX"),
|
|
153
153
|
M.fail("5XX"),
|
|
154
154
|
)(response, req);
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OrqCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } 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 {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import { OrqError } from "../models/errors/orqerror.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.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
|
+
* Create a knowledge
|
|
29
|
+
*/
|
|
30
|
+
export function knowledgeCreate(
|
|
31
|
+
client: OrqCore,
|
|
32
|
+
request: operations.CreateKnowledgeRequestBody,
|
|
33
|
+
options?: RequestOptions,
|
|
34
|
+
): APIPromise<
|
|
35
|
+
Result<
|
|
36
|
+
operations.CreateKnowledgeResponseBody,
|
|
37
|
+
| OrqError
|
|
38
|
+
| ResponseValidationError
|
|
39
|
+
| ConnectionError
|
|
40
|
+
| RequestAbortedError
|
|
41
|
+
| RequestTimeoutError
|
|
42
|
+
| InvalidRequestError
|
|
43
|
+
| UnexpectedClientError
|
|
44
|
+
| SDKValidationError
|
|
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.CreateKnowledgeRequestBody,
|
|
57
|
+
options?: RequestOptions,
|
|
58
|
+
): Promise<
|
|
59
|
+
[
|
|
60
|
+
Result<
|
|
61
|
+
operations.CreateKnowledgeResponseBody,
|
|
62
|
+
| OrqError
|
|
63
|
+
| ResponseValidationError
|
|
64
|
+
| ConnectionError
|
|
65
|
+
| RequestAbortedError
|
|
66
|
+
| RequestTimeoutError
|
|
67
|
+
| InvalidRequestError
|
|
68
|
+
| UnexpectedClientError
|
|
69
|
+
| SDKValidationError
|
|
70
|
+
>,
|
|
71
|
+
APICall,
|
|
72
|
+
]
|
|
73
|
+
> {
|
|
74
|
+
const parsed = safeParse(
|
|
75
|
+
request,
|
|
76
|
+
(value) =>
|
|
77
|
+
operations.CreateKnowledgeRequestBody$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 = encodeJSON("body", payload, { explode: true });
|
|
85
|
+
|
|
86
|
+
const path = pathToFunc("/v2/knowledge")();
|
|
87
|
+
|
|
88
|
+
const headers = new Headers(compactMap({
|
|
89
|
+
"Content-Type": "application/json",
|
|
90
|
+
Accept: "application/json",
|
|
91
|
+
}));
|
|
92
|
+
|
|
93
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
94
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
95
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
96
|
+
|
|
97
|
+
const context = {
|
|
98
|
+
options: client._options,
|
|
99
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
100
|
+
operationID: "CreateKnowledge",
|
|
101
|
+
oAuth2Scopes: [],
|
|
102
|
+
|
|
103
|
+
resolvedSecurity: requestSecurity,
|
|
104
|
+
|
|
105
|
+
securitySource: client._options.apiKey,
|
|
106
|
+
retryConfig: options?.retries
|
|
107
|
+
|| client._options.retryConfig
|
|
108
|
+
|| { strategy: "none" },
|
|
109
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const requestRes = client._createRequest(context, {
|
|
113
|
+
security: requestSecurity,
|
|
114
|
+
method: "POST",
|
|
115
|
+
baseURL: options?.serverURL,
|
|
116
|
+
path: path,
|
|
117
|
+
headers: headers,
|
|
118
|
+
body: body,
|
|
119
|
+
userAgent: client._options.userAgent,
|
|
120
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
121
|
+
}, options);
|
|
122
|
+
if (!requestRes.ok) {
|
|
123
|
+
return [requestRes, { status: "invalid" }];
|
|
124
|
+
}
|
|
125
|
+
const req = requestRes.value;
|
|
126
|
+
|
|
127
|
+
const doResult = await client._do(req, {
|
|
128
|
+
context,
|
|
129
|
+
errorCodes: ["4XX", "5XX"],
|
|
130
|
+
retryConfig: context.retryConfig,
|
|
131
|
+
retryCodes: context.retryCodes,
|
|
132
|
+
});
|
|
133
|
+
if (!doResult.ok) {
|
|
134
|
+
return [doResult, { status: "request-error", request: req }];
|
|
135
|
+
}
|
|
136
|
+
const response = doResult.value;
|
|
137
|
+
|
|
138
|
+
const [result] = await M.match<
|
|
139
|
+
operations.CreateKnowledgeResponseBody,
|
|
140
|
+
| OrqError
|
|
141
|
+
| ResponseValidationError
|
|
142
|
+
| ConnectionError
|
|
143
|
+
| RequestAbortedError
|
|
144
|
+
| RequestTimeoutError
|
|
145
|
+
| InvalidRequestError
|
|
146
|
+
| UnexpectedClientError
|
|
147
|
+
| SDKValidationError
|
|
148
|
+
>(
|
|
149
|
+
M.json(200, operations.CreateKnowledgeResponseBody$inboundSchema),
|
|
150
|
+
M.fail("4XX"),
|
|
151
|
+
M.fail("5XX"),
|
|
152
|
+
)(response, req);
|
|
153
|
+
if (!result.ok) {
|
|
154
|
+
return [result, { status: "complete", request: req, response }];
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return [result, { status: "complete", request: req, response }];
|
|
158
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -68,7 +68,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
68
68
|
export const SDK_METADATA = {
|
|
69
69
|
language: "typescript",
|
|
70
70
|
openapiDocVersion: "2.0",
|
|
71
|
-
sdkVersion: "3.10.0-rc.
|
|
72
|
-
genVersion: "2.
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 3.10.0-rc.
|
|
71
|
+
sdkVersion: "3.10.0-rc.20",
|
|
72
|
+
genVersion: "2.664.0",
|
|
73
|
+
userAgent: "speakeasy-sdk/typescript 3.10.0-rc.20 2.664.0 2.0 @orq-ai/node",
|
|
74
74
|
} as const;
|
package/src/lib/event-streams.ts
CHANGED
|
@@ -43,7 +43,7 @@ export class EventStream<T extends ServerEvent<unknown>>
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
// Polyfill for older browsers
|
|
46
|
-
[Symbol.asyncIterator](): AsyncIterableIterator<T
|
|
46
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<T> {
|
|
47
47
|
const fn = (ReadableStream.prototype as any)[Symbol.asyncIterator];
|
|
48
48
|
if (typeof fn === "function") return fn.call(this);
|
|
49
49
|
const reader = this.getReader();
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
} from "./resources.js";
|
|
14
14
|
import { MCPScope } from "./scopes.js";
|
|
15
15
|
import { createRegisterTool } from "./tools.js";
|
|
16
|
+
import { tool$chunkingParse } from "./tools/chunkingParse.js";
|
|
16
17
|
import { tool$contactsCreate } from "./tools/contactsCreate.js";
|
|
17
18
|
import { tool$contactsDelete } from "./tools/contactsDelete.js";
|
|
18
19
|
import { tool$contactsList } from "./tools/contactsList.js";
|
|
@@ -81,7 +82,7 @@ import { tool$filesCreate } from "./tools/filesCreate.js";
|
|
|
81
82
|
import { tool$filesDelete } from "./tools/filesDelete.js";
|
|
82
83
|
import { tool$filesGet } from "./tools/filesGet.js";
|
|
83
84
|
import { tool$filesList } from "./tools/filesList.js";
|
|
84
|
-
import { tool$
|
|
85
|
+
import { tool$knowledgeCreate } from "./tools/knowledgeCreate.js";
|
|
85
86
|
import { tool$knowledgeCreateChunks } from "./tools/knowledgeCreateChunks.js";
|
|
86
87
|
import { tool$knowledgeCreateDatasource } from "./tools/knowledgeCreateDatasource.js";
|
|
87
88
|
import { tool$knowledgeDelete } from "./tools/knowledgeDelete.js";
|
|
@@ -119,7 +120,7 @@ export function createMCPServer(deps: {
|
|
|
119
120
|
}) {
|
|
120
121
|
const server = new McpServer({
|
|
121
122
|
name: "Orq",
|
|
122
|
-
version: "3.10.0-rc.
|
|
123
|
+
version: "3.10.0-rc.20",
|
|
123
124
|
});
|
|
124
125
|
|
|
125
126
|
const client = new OrqCore({
|
|
@@ -186,6 +187,7 @@ export function createMCPServer(deps: {
|
|
|
186
187
|
tool(tool$datasetsDeleteDatapoint);
|
|
187
188
|
tool(tool$datasetsClear);
|
|
188
189
|
tool(tool$knowledgeList);
|
|
190
|
+
tool(tool$knowledgeCreate);
|
|
189
191
|
tool(tool$knowledgeRetrieve);
|
|
190
192
|
tool(tool$knowledgeUpdate);
|
|
191
193
|
tool(tool$knowledgeDelete);
|
|
@@ -200,7 +202,7 @@ export function createMCPServer(deps: {
|
|
|
200
202
|
tool(tool$knowledgeUpdateChunk);
|
|
201
203
|
tool(tool$knowledgeDeleteChunk);
|
|
202
204
|
tool(tool$knowledgeRetrieveChunk);
|
|
203
|
-
tool(tool$
|
|
205
|
+
tool(tool$chunkingParse);
|
|
204
206
|
tool(tool$evalsAll);
|
|
205
207
|
tool(tool$evalsCreate);
|
|
206
208
|
tool(tool$evalsUpdate);
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { chunkingParse } from "../../funcs/chunkingParse.js";
|
|
6
6
|
import * as operations from "../../models/operations/index.js";
|
|
7
7
|
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
8
|
|
|
9
9
|
const args = {
|
|
10
|
-
request: operations.
|
|
10
|
+
request: operations.ParseChunkingRequest$inboundSchema,
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export const tool$
|
|
14
|
-
name: "
|
|
15
|
-
description: `
|
|
13
|
+
export const tool$chunkingParse: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "chunking-parse",
|
|
15
|
+
description: `Parse text
|
|
16
16
|
|
|
17
17
|
Split large text documents into smaller, manageable chunks using different chunking strategies optimized for RAG (Retrieval-Augmented Generation) workflows. This endpoint supports multiple chunking algorithms including token-based, sentence-based, recursive, semantic, and specialized strategies.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
|
-
const [result, apiCall] = await
|
|
20
|
+
const [result, apiCall] = await chunkingParse(
|
|
21
21
|
client,
|
|
22
22
|
args.request,
|
|
23
23
|
{ fetchOptions: { signal: ctx.signal } },
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { knowledgeCreate } from "../../funcs/knowledgeCreate.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.CreateKnowledgeRequestBody$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$knowledgeCreate: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "knowledge-create",
|
|
15
|
+
description: `Create a knowledge`,
|
|
16
|
+
args,
|
|
17
|
+
tool: async (client, args, ctx) => {
|
|
18
|
+
const [result, apiCall] = await knowledgeCreate(
|
|
19
|
+
client,
|
|
20
|
+
args.request,
|
|
21
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
22
|
+
).$inspect();
|
|
23
|
+
|
|
24
|
+
if (!result.ok) {
|
|
25
|
+
return {
|
|
26
|
+
content: [{ type: "text", text: result.error.message }],
|
|
27
|
+
isError: true,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const value = result.value;
|
|
32
|
+
|
|
33
|
+
return formatResult(value, apiCall);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -229,7 +229,7 @@ export type Deployments2PrefixMessagesType = ClosedEnum<
|
|
|
229
229
|
|
|
230
230
|
export type FileT = {
|
|
231
231
|
/**
|
|
232
|
-
* The
|
|
232
|
+
* The file data as a data URI string in the format 'data:<mime-type>;base64,<base64-encoded-data>'. Example: 'data:image/png;base64,iVBORw0KGgoAAAANS...'
|
|
233
233
|
*/
|
|
234
234
|
fileData: string;
|
|
235
235
|
/**
|
|
@@ -628,7 +628,7 @@ export type Deployments2Messages3Content4Type = ClosedEnum<
|
|
|
628
628
|
|
|
629
629
|
export type TwoFile = {
|
|
630
630
|
/**
|
|
631
|
-
* The
|
|
631
|
+
* The file data as a data URI string in the format 'data:<mime-type>;base64,<base64-encoded-data>'. Example: 'data:image/png;base64,iVBORw0KGgoAAAANS...'
|
|
632
632
|
*/
|
|
633
633
|
fileData: string;
|
|
634
634
|
/**
|
|
@@ -182,7 +182,7 @@ export const CreateContactResponseBody$inboundSchema: z.ZodType<
|
|
|
182
182
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
183
183
|
.optional(),
|
|
184
184
|
updated: z.string().datetime({ offset: true }).default(
|
|
185
|
-
"2025-07-
|
|
185
|
+
"2025-07-25T12:14:13.843Z",
|
|
186
186
|
).transform(v => new Date(v)),
|
|
187
187
|
}).transform((v) => {
|
|
188
188
|
return remap$(v, {
|
|
@@ -223,7 +223,7 @@ export const CreateContactResponseBody$outboundSchema: z.ZodType<
|
|
|
223
223
|
tags: z.array(z.string()).optional(),
|
|
224
224
|
metadata: z.record(z.any()).optional(),
|
|
225
225
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
226
|
-
updated: z.date().default(() => new Date("2025-07-
|
|
226
|
+
updated: z.date().default(() => new Date("2025-07-25T12:14:13.843Z"))
|
|
227
227
|
.transform(v => v.toISOString()),
|
|
228
228
|
}).transform((v) => {
|
|
229
229
|
return remap$(v, {
|
|
@@ -211,7 +211,7 @@ export const CreateDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
211
211
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
212
212
|
.optional(),
|
|
213
213
|
updated: z.string().datetime({ offset: true }).default(
|
|
214
|
-
"2025-07-
|
|
214
|
+
"2025-07-25T12:14:13.843Z",
|
|
215
215
|
).transform(v => new Date(v)),
|
|
216
216
|
}).transform((v) => {
|
|
217
217
|
return remap$(v, {
|
|
@@ -251,7 +251,7 @@ export const CreateDatasetResponseBody$outboundSchema: z.ZodType<
|
|
|
251
251
|
updatedById: z.string().optional(),
|
|
252
252
|
metadata: z.lazy(() => CreateDatasetMetadata$outboundSchema),
|
|
253
253
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
254
|
-
updated: z.date().default(() => new Date("2025-07-
|
|
254
|
+
updated: z.date().default(() => new Date("2025-07-25T12:14:13.843Z"))
|
|
255
255
|
.transform(v => v.toISOString()),
|
|
256
256
|
}).transform((v) => {
|
|
257
257
|
return remap$(v, {
|