@mistralai/mistralai 2.4.1 → 2.5.0
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 +80 -9
- package/esm/funcs/betaAgentsList.d.ts +3 -1
- package/esm/funcs/betaAgentsList.d.ts.map +1 -1
- package/esm/funcs/betaAgentsList.js +3 -1
- package/esm/funcs/betaAgentsList.js.map +1 -1
- package/esm/funcs/betaAgentsListPages.d.ts +21 -0
- package/esm/funcs/betaAgentsListPages.d.ts.map +1 -0
- package/esm/funcs/betaAgentsListPages.js +131 -0
- package/esm/funcs/betaAgentsListPages.js.map +1 -0
- package/esm/funcs/betaConnectorsDeleteAllUserCredentials.d.ts +19 -0
- package/esm/funcs/betaConnectorsDeleteAllUserCredentials.d.ts.map +1 -0
- package/esm/funcs/betaConnectorsDeleteAllUserCredentials.js +88 -0
- package/esm/funcs/betaConnectorsDeleteAllUserCredentials.js.map +1 -0
- package/esm/funcs/betaRagSearchIndexesGenerateIndexSummary.d.ts +22 -0
- package/esm/funcs/betaRagSearchIndexesGenerateIndexSummary.d.ts.map +1 -0
- package/esm/funcs/betaRagSearchIndexesGenerateIndexSummary.js +110 -0
- package/esm/funcs/betaRagSearchIndexesGenerateIndexSummary.js.map +1 -0
- package/esm/funcs/betaRagSearchIndexesGenerateSchemaSummary.d.ts +22 -0
- package/esm/funcs/betaRagSearchIndexesGenerateSchemaSummary.d.ts.map +1 -0
- package/esm/funcs/betaRagSearchIndexesGenerateSchemaSummary.js +114 -0
- package/esm/funcs/betaRagSearchIndexesGenerateSchemaSummary.js.map +1 -0
- package/esm/funcs/betaRagSearchIndexesGetIndexSummary.d.ts +19 -0
- package/esm/funcs/betaRagSearchIndexesGetIndexSummary.d.ts.map +1 -0
- package/esm/funcs/betaRagSearchIndexesGetIndexSummary.js +96 -0
- package/esm/funcs/betaRagSearchIndexesGetIndexSummary.js.map +1 -0
- package/esm/funcs/betaRagSearchIndexesGetSchemaSummary.d.ts +19 -0
- package/esm/funcs/betaRagSearchIndexesGetSchemaSummary.d.ts.map +1 -0
- package/esm/funcs/betaRagSearchIndexesGetSchemaSummary.js +100 -0
- package/esm/funcs/betaRagSearchIndexesGetSchemaSummary.js.map +1 -0
- package/esm/funcs/betaRagSearchIndexesSetIndexSummary.d.ts +1 -1
- package/esm/funcs/betaRagSearchIndexesSetIndexSummary.d.ts.map +1 -1
- package/esm/funcs/betaRagSearchIndexesSetIndexSummary.js +8 -4
- package/esm/funcs/betaRagSearchIndexesSetIndexSummary.js.map +1 -1
- package/esm/funcs/betaRagSearchIndexesSetSchemaSummary.d.ts +1 -1
- package/esm/funcs/betaRagSearchIndexesSetSchemaSummary.d.ts.map +1 -1
- package/esm/funcs/betaRagSearchIndexesSetSchemaSummary.js +8 -4
- package/esm/funcs/betaRagSearchIndexesSetSchemaSummary.js.map +1 -1
- package/esm/funcs/betaUsersGetIdentity.d.ts +2 -1
- package/esm/funcs/betaUsersGetIdentity.d.ts.map +1 -1
- package/esm/funcs/betaUsersGetIdentity.js +12 -8
- package/esm/funcs/betaUsersGetIdentity.js.map +1 -1
- package/esm/lib/config.d.ts +13 -3
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +14 -4
- package/esm/lib/config.js.map +1 -1
- package/esm/lib/jsonl.d.ts +10 -0
- package/esm/lib/jsonl.d.ts.map +1 -0
- package/esm/lib/jsonl.js +103 -0
- package/esm/lib/jsonl.js.map +1 -0
- package/esm/models/components/agentlistpage.d.ts +13 -0
- package/esm/models/components/agentlistpage.d.ts.map +1 -0
- package/esm/models/components/agentlistpage.js +23 -0
- package/esm/models/components/agentlistpage.js.map +1 -0
- package/esm/models/components/authenticationconfiguration.d.ts +1 -0
- package/esm/models/components/authenticationconfiguration.d.ts.map +1 -1
- package/esm/models/components/authenticationconfiguration.js +1 -0
- package/esm/models/components/authenticationconfiguration.js.map +1 -1
- package/esm/models/components/connector.d.ts +1 -0
- package/esm/models/components/connector.d.ts.map +1 -1
- package/esm/models/components/connector.js +2 -0
- package/esm/models/components/connector.js.map +1 -1
- package/esm/models/components/credentialscreateorupdate.d.ts +5 -0
- package/esm/models/components/credentialscreateorupdate.d.ts.map +1 -1
- package/esm/models/components/credentialscreateorupdate.js +1 -0
- package/esm/models/components/credentialscreateorupdate.js.map +1 -1
- package/esm/models/components/getsearchindexdetailresponseindex.d.ts +0 -1
- package/esm/models/components/getsearchindexdetailresponseindex.d.ts.map +1 -1
- package/esm/models/components/getsearchindexdetailresponseindex.js +0 -1
- package/esm/models/components/getsearchindexdetailresponseindex.js.map +1 -1
- package/esm/models/components/getsearchindexschemadetailresponseschemamodel.d.ts +0 -1
- package/esm/models/components/getsearchindexschemadetailresponseschemamodel.d.ts.map +1 -1
- package/esm/models/components/getsearchindexschemadetailresponseschemamodel.js +0 -1
- package/esm/models/components/getsearchindexschemadetailresponseschemamodel.js.map +1 -1
- package/esm/models/components/getsummaryresponsesummary.d.ts +13 -0
- package/esm/models/components/getsummaryresponsesummary.d.ts.map +1 -0
- package/esm/models/components/getsummaryresponsesummary.js +17 -0
- package/esm/models/components/getsummaryresponsesummary.js.map +1 -0
- package/esm/models/components/index.d.ts +8 -2
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +8 -2
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/locationtype.d.ts +1 -0
- package/esm/models/components/locationtype.d.ts.map +1 -1
- package/esm/models/components/locationtype.js +1 -0
- package/esm/models/components/locationtype.js.map +1 -1
- package/esm/models/components/modelcapabilities.d.ts +1 -0
- package/esm/models/components/modelcapabilities.d.ts.map +1 -1
- package/esm/models/components/modelcapabilities.js +2 -0
- package/esm/models/components/modelcapabilities.js.map +1 -1
- package/esm/models/components/speechrequest.d.ts +2 -0
- package/esm/models/components/speechrequest.d.ts.map +1 -1
- package/esm/models/components/speechrequest.js +2 -0
- package/esm/models/components/speechrequest.js.map +1 -1
- package/esm/models/components/summarychunk.d.ts +13 -0
- package/esm/models/components/summarychunk.d.ts.map +1 -0
- package/esm/models/components/summarychunk.js +15 -0
- package/esm/models/components/summarychunk.js.map +1 -0
- package/esm/models/components/summaryerror.d.ts +13 -0
- package/esm/models/components/summaryerror.d.ts.map +1 -0
- package/esm/models/components/summaryerror.js +15 -0
- package/esm/models/components/summaryerror.js.map +1 -0
- package/esm/models/components/summarymetadata.d.ts +15 -0
- package/esm/models/components/summarymetadata.d.ts.map +1 -0
- package/esm/models/components/summarymetadata.js +16 -0
- package/esm/models/components/summarymetadata.js.map +1 -0
- package/esm/models/components/summarystatus.d.ts +11 -0
- package/esm/models/components/summarystatus.d.ts.map +1 -0
- package/esm/models/components/summarystatus.js +13 -0
- package/esm/models/components/summarystatus.js.map +1 -0
- package/esm/models/components/summarystatusdollardefs.d.ts +11 -0
- package/esm/models/components/summarystatusdollardefs.d.ts.map +1 -0
- package/esm/models/components/summarystatusdollardefs.js +13 -0
- package/esm/models/components/summarystatusdollardefs.js.map +1 -0
- package/esm/models/components/updatesummaryrequestsummary.d.ts +24 -0
- package/esm/models/components/updatesummaryrequestsummary.d.ts.map +1 -0
- package/esm/models/components/updatesummaryrequestsummary.js +21 -0
- package/esm/models/components/updatesummaryrequestsummary.js.map +1 -0
- package/esm/models/operations/agentsapiv1agentslistpages.d.ts +51 -0
- package/esm/models/operations/agentsapiv1agentslistpages.d.ts.map +1 -0
- package/esm/models/operations/agentsapiv1agentslistpages.js +41 -0
- package/esm/models/operations/agentsapiv1agentslistpages.js.map +1 -0
- package/esm/models/operations/connectordeleteallusercredentialsv1.d.ts +12 -0
- package/esm/models/operations/connectordeleteallusercredentialsv1.d.ts.map +1 -0
- package/esm/models/operations/connectordeleteallusercredentialsv1.js +18 -0
- package/esm/models/operations/connectordeleteallusercredentialsv1.js.map +1 -0
- package/esm/models/operations/generateindexsummaryv1ragindexesindexindexidsummaryfieldlanguagepost.d.ts +39 -0
- package/esm/models/operations/generateindexsummaryv1ragindexesindexindexidsummaryfieldlanguagepost.d.ts.map +1 -0
- package/esm/models/operations/generateindexsummaryv1ragindexesindexindexidsummaryfieldlanguagepost.js +46 -0
- package/esm/models/operations/generateindexsummaryv1ragindexesindexindexidsummaryfieldlanguagepost.js.map +1 -0
- package/esm/models/operations/generateschemasummarypostv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguagepost.d.ts +41 -0
- package/esm/models/operations/generateschemasummarypostv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguagepost.d.ts.map +1 -0
- package/esm/models/operations/generateschemasummarypostv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguagepost.js +48 -0
- package/esm/models/operations/generateschemasummarypostv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguagepost.js.map +1 -0
- package/esm/models/operations/getindexsummaryv1ragindexesindexindexidsummaryfieldlanguageget.d.ts +29 -0
- package/esm/models/operations/getindexsummaryv1ragindexesindexindexidsummaryfieldlanguageget.d.ts.map +1 -0
- package/esm/models/operations/getindexsummaryv1ragindexesindexindexidsummaryfieldlanguageget.js +33 -0
- package/esm/models/operations/getindexsummaryv1ragindexesindexindexidsummaryfieldlanguageget.js.map +1 -0
- package/esm/models/operations/getschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguageget.d.ts +31 -0
- package/esm/models/operations/getschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguageget.d.ts.map +1 -0
- package/esm/models/operations/getschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguageget.js +35 -0
- package/esm/models/operations/getschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguageget.js.map +1 -0
- package/esm/models/operations/index.d.ts +9 -2
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +9 -2
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/setindexsummaryv1ragindexesindexindexidsummaryfieldlanguageput.d.ts +32 -0
- package/esm/models/operations/setindexsummaryv1ragindexesindexindexidsummaryfieldlanguageput.d.ts.map +1 -0
- package/esm/models/operations/setindexsummaryv1ragindexesindexindexidsummaryfieldlanguageput.js +36 -0
- package/esm/models/operations/setindexsummaryv1ragindexesindexindexidsummaryfieldlanguageput.js.map +1 -0
- package/esm/models/operations/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguageput.d.ts +34 -0
- package/esm/models/operations/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguageput.d.ts.map +1 -0
- package/esm/models/operations/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguageput.js +38 -0
- package/esm/models/operations/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguageput.js.map +1 -0
- package/esm/models/operations/usersapigetidentity.d.ts +12 -0
- package/esm/models/operations/usersapigetidentity.d.ts.map +1 -0
- package/esm/models/operations/usersapigetidentity.js +18 -0
- package/esm/models/operations/usersapigetidentity.js.map +1 -0
- package/esm/sdk/betaagents.d.ts +13 -1
- package/esm/sdk/betaagents.d.ts.map +1 -1
- package/esm/sdk/betaagents.js +14 -1
- package/esm/sdk/betaagents.js.map +1 -1
- package/esm/sdk/connectors.d.ts +7 -0
- package/esm/sdk/connectors.d.ts.map +1 -1
- package/esm/sdk/connectors.js +10 -0
- package/esm/sdk/connectors.js.map +1 -1
- package/esm/sdk/searchindexes.d.ts +40 -5
- package/esm/sdk/searchindexes.d.ts.map +1 -1
- package/esm/sdk/searchindexes.js +50 -4
- package/esm/sdk/searchindexes.js.map +1 -1
- package/esm/sdk/users.d.ts +2 -1
- package/esm/sdk/users.d.ts.map +1 -1
- package/esm/sdk/users.js +2 -2
- package/esm/sdk/users.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/betaAgentsList.ts +3 -1
- package/src/funcs/betaAgentsListPages.ts +265 -0
- package/src/funcs/betaConnectorsDeleteAllUserCredentials.ts +183 -0
- package/src/funcs/betaRagSearchIndexesGenerateIndexSummary.ts +215 -0
- package/src/funcs/betaRagSearchIndexesGenerateSchemaSummary.ts +219 -0
- package/src/funcs/betaRagSearchIndexesGetIndexSummary.ts +190 -0
- package/src/funcs/betaRagSearchIndexesGetSchemaSummary.ts +194 -0
- package/src/funcs/betaRagSearchIndexesSetIndexSummary.ts +12 -8
- package/src/funcs/betaRagSearchIndexesSetSchemaSummary.ts +10 -6
- package/src/funcs/betaUsersGetIdentity.ts +15 -5
- package/src/lib/config.ts +14 -4
- package/src/lib/jsonl.ts +128 -0
- package/src/models/components/agentlistpage.ts +39 -0
- package/src/models/components/authenticationconfiguration.ts +2 -0
- package/src/models/components/connector.ts +3 -0
- package/src/models/components/credentialscreateorupdate.ts +6 -0
- package/src/models/components/getsearchindexdetailresponseindex.ts +0 -2
- package/src/models/components/getsearchindexschemadetailresponseschemamodel.ts +0 -2
- package/src/models/components/getsummaryresponsesummary.ts +36 -0
- package/src/models/components/index.ts +8 -2
- package/src/models/components/locationtype.ts +1 -0
- package/src/models/components/modelcapabilities.ts +3 -0
- package/src/models/components/speechrequest.ts +4 -0
- package/src/models/components/summarychunk.ts +32 -0
- package/src/models/components/summaryerror.ts +32 -0
- package/src/models/components/summarymetadata.ts +40 -0
- package/src/models/components/summarystatus.ts +19 -0
- package/src/models/components/summarystatusdollardefs.ts +21 -0
- package/src/models/components/updatesummaryrequestsummary.ts +53 -0
- package/src/models/operations/agentsapiv1agentslistpages.ts +105 -0
- package/src/models/operations/connectordeleteallusercredentialsv1.ts +40 -0
- package/src/models/operations/generateindexsummaryv1ragindexesindexindexidsummaryfieldlanguagepost.ts +113 -0
- package/src/models/operations/generateschemasummarypostv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguagepost.ts +117 -0
- package/src/models/operations/getindexsummaryv1ragindexesindexindexidsummaryfieldlanguageget.ts +74 -0
- package/src/models/operations/getschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguageget.ts +78 -0
- package/src/models/operations/index.ts +9 -2
- package/src/models/operations/setindexsummaryv1ragindexesindexindexidsummaryfieldlanguageput.ts +81 -0
- package/src/models/operations/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldlanguageput.ts +85 -0
- package/src/models/operations/usersapigetidentity.ts +38 -0
- package/src/sdk/betaagents.ts +27 -1
- package/src/sdk/connectors.ts +18 -0
- package/src/sdk/searchindexes.ts +99 -8
- package/src/sdk/users.ts +3 -0
- package/esm/models/components/updateindexsummaryrequestsummary.d.ts +0 -12
- package/esm/models/components/updateindexsummaryrequestsummary.d.ts.map +0 -1
- package/esm/models/components/updateindexsummaryrequestsummary.js +0 -13
- package/esm/models/components/updateindexsummaryrequestsummary.js.map +0 -1
- package/esm/models/components/updateschemasummaryrequestsummary.d.ts +0 -12
- package/esm/models/components/updateschemasummaryrequestsummary.d.ts.map +0 -1
- package/esm/models/components/updateschemasummaryrequestsummary.js +0 -13
- package/esm/models/components/updateschemasummaryrequestsummary.js.map +0 -1
- package/esm/models/operations/setindexsummaryv1ragindexesindexindexidsummaryfieldput.d.ts +0 -15
- package/esm/models/operations/setindexsummaryv1ragindexesindexindexidsummaryfieldput.d.ts.map +0 -1
- package/esm/models/operations/setindexsummaryv1ragindexesindexindexidsummaryfieldput.js +0 -22
- package/esm/models/operations/setindexsummaryv1ragindexesindexindexidsummaryfieldput.js.map +0 -1
- package/esm/models/operations/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldput.d.ts +0 -17
- package/esm/models/operations/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldput.d.ts.map +0 -1
- package/esm/models/operations/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldput.js +0 -24
- package/esm/models/operations/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldput.js.map +0 -1
- package/src/models/components/updateindexsummaryrequestsummary.ts +0 -33
- package/src/models/components/updateschemasummaryrequestsummary.ts +0 -33
- package/src/models/operations/setindexsummaryv1ragindexesindexindexidsummaryfieldput.ts +0 -47
- package/src/models/operations/setschemasummaryv1ragindexesindexindexidschemasschemaschemaidsummaryfieldput.ts +0 -55
package/src/lib/jsonl.ts
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ab14e387f86f
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const LF = 0x0a;
|
|
7
|
+
const CR = 0x0d;
|
|
8
|
+
const RIGHT_BRACE = 0x7d;
|
|
9
|
+
const MESSAGE_BOUNDARIES = [
|
|
10
|
+
new Uint8Array([RIGHT_BRACE, CR, LF]),
|
|
11
|
+
new Uint8Array([RIGHT_BRACE, LF]),
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
export class JsonLStream<Event> {
|
|
15
|
+
private readonly stream: ReadableStream<Uint8Array>;
|
|
16
|
+
private readonly decoder: (rawEvent: string) => Event;
|
|
17
|
+
|
|
18
|
+
constructor(init: {
|
|
19
|
+
stream: ReadableStream<Uint8Array>;
|
|
20
|
+
decoder: (rawEvent: string) => Event;
|
|
21
|
+
}) {
|
|
22
|
+
this.stream = init.stream;
|
|
23
|
+
this.decoder = init.decoder;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async *[Symbol.asyncIterator](): AsyncGenerator<Event, void, unknown> {
|
|
27
|
+
const reader = this.stream.getReader();
|
|
28
|
+
let buffer = new Uint8Array([]);
|
|
29
|
+
let position = 0;
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
while (true) {
|
|
33
|
+
const { done, value } = await reader.read();
|
|
34
|
+
if (done) {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const newBuffer = new Uint8Array(buffer.length + value.length);
|
|
39
|
+
newBuffer.set(buffer);
|
|
40
|
+
newBuffer.set(value, buffer.length);
|
|
41
|
+
buffer = newBuffer;
|
|
42
|
+
|
|
43
|
+
for (let i = position; i < buffer.length; i++) {
|
|
44
|
+
const boundary = findBoundary(buffer, i);
|
|
45
|
+
if (boundary == null) {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const chunk = buffer.slice(position, i + 1);
|
|
50
|
+
position = i + boundary.length;
|
|
51
|
+
const event = parseEvent(chunk, this.decoder);
|
|
52
|
+
if (event != null) {
|
|
53
|
+
yield event;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (position > 0) {
|
|
58
|
+
buffer = buffer.slice(position);
|
|
59
|
+
position = 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (buffer.length > 0) {
|
|
64
|
+
const event = parseEvent(buffer, this.decoder);
|
|
65
|
+
if (event != null) {
|
|
66
|
+
yield event;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
} catch (e: unknown) {
|
|
70
|
+
if (e instanceof Error && e.name === "AbortError") {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
throw e;
|
|
75
|
+
} finally {
|
|
76
|
+
reader.releaseLock();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function findBoundary(buffer: Uint8Array, start: number): Uint8Array | null {
|
|
82
|
+
for (const s of MESSAGE_BOUNDARIES) {
|
|
83
|
+
const seq = peekSequence(start, buffer, s);
|
|
84
|
+
if (seq != null) {
|
|
85
|
+
return seq;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function peekSequence(
|
|
93
|
+
position: number,
|
|
94
|
+
buffer: Uint8Array,
|
|
95
|
+
sequence: Uint8Array,
|
|
96
|
+
): Uint8Array | null {
|
|
97
|
+
if (sequence.length > buffer.length - position) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
for (let i = 0; i < sequence.length; i++) {
|
|
102
|
+
if (buffer[position + i] !== sequence[i]) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return sequence;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function parseEvent<Event>(
|
|
111
|
+
chunk: Uint8Array,
|
|
112
|
+
decoder: (rawEvent: string) => Event,
|
|
113
|
+
) {
|
|
114
|
+
if (!chunk.length) {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const td = new TextDecoder();
|
|
119
|
+
const raw = td.decode(chunk);
|
|
120
|
+
|
|
121
|
+
try {
|
|
122
|
+
const parsed = JSON.parse(raw);
|
|
123
|
+
return decoder(parsed);
|
|
124
|
+
} catch (e) {
|
|
125
|
+
console.error("Error parsing JSON:", e);
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f71fd6f6fbd4
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import { Agent, Agent$inboundSchema } from "./agent.js";
|
|
12
|
+
|
|
13
|
+
export type AgentListPage = {
|
|
14
|
+
object: "list";
|
|
15
|
+
data: Array<Agent>;
|
|
16
|
+
nextPageToken?: string | null | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const AgentListPage$inboundSchema: z.ZodType<AgentListPage, unknown> = z
|
|
21
|
+
.object({
|
|
22
|
+
object: z.literal("list").default("list"),
|
|
23
|
+
data: z.array(Agent$inboundSchema),
|
|
24
|
+
next_page_token: z.nullable(z.string()).optional(),
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"next_page_token": "nextPageToken",
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export function agentListPageFromJSON(
|
|
32
|
+
jsonString: string,
|
|
33
|
+
): SafeParseResult<AgentListPage, SDKValidationError> {
|
|
34
|
+
return safeParse(
|
|
35
|
+
jsonString,
|
|
36
|
+
(x) => AgentListPage$inboundSchema.parse(JSON.parse(x)),
|
|
37
|
+
`Failed to parse 'AgentListPage' from JSON`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
|
|
21
21
|
export type AuthenticationConfiguration = {
|
|
22
22
|
name: string;
|
|
23
|
+
title?: string | null | undefined;
|
|
23
24
|
authenticationType: OutboundAuthenticationType;
|
|
24
25
|
scope: ConsumerType;
|
|
25
26
|
status?: CredentialsStatus | null | undefined;
|
|
@@ -32,6 +33,7 @@ export const AuthenticationConfiguration$inboundSchema: z.ZodType<
|
|
|
32
33
|
unknown
|
|
33
34
|
> = z.object({
|
|
34
35
|
name: z.string(),
|
|
36
|
+
title: z.nullable(z.string()).optional(),
|
|
35
37
|
authentication_type: OutboundAuthenticationType$inboundSchema,
|
|
36
38
|
scope: ConsumerType$inboundSchema,
|
|
37
39
|
status: z.nullable(CredentialsStatus$inboundSchema).optional(),
|
|
@@ -58,6 +58,7 @@ export type Connector = {
|
|
|
58
58
|
ownerId?: string | null | undefined;
|
|
59
59
|
ownerType: ResourceType;
|
|
60
60
|
visibility: ResourceVisibility;
|
|
61
|
+
creatorId?: string | null | undefined;
|
|
61
62
|
locale?: ConnectorLocale | null | undefined;
|
|
62
63
|
systemPrompt?: string | null | undefined;
|
|
63
64
|
supportedAuthMethods?: Array<PublicAuthenticationMethod> | null | undefined;
|
|
@@ -88,6 +89,7 @@ export const Connector$inboundSchema: z.ZodType<Connector, unknown> = z.object({
|
|
|
88
89
|
owner_id: z.nullable(z.string()).optional(),
|
|
89
90
|
owner_type: ResourceType$inboundSchema,
|
|
90
91
|
visibility: ResourceVisibility$inboundSchema,
|
|
92
|
+
creator_id: z.nullable(z.string()).optional(),
|
|
91
93
|
locale: z.nullable(ConnectorLocale$inboundSchema).optional(),
|
|
92
94
|
system_prompt: z.nullable(z.string()).optional(),
|
|
93
95
|
supported_auth_methods: z.nullable(
|
|
@@ -116,6 +118,7 @@ export const Connector$inboundSchema: z.ZodType<Connector, unknown> = z.object({
|
|
|
116
118
|
"server_card": "serverCard",
|
|
117
119
|
"owner_id": "ownerId",
|
|
118
120
|
"owner_type": "ownerType",
|
|
121
|
+
"creator_id": "creatorId",
|
|
119
122
|
"system_prompt": "systemPrompt",
|
|
120
123
|
"supported_auth_methods": "supportedAuthMethods",
|
|
121
124
|
"connection_preferences": "connectionPreferences",
|
|
@@ -19,6 +19,10 @@ export type CredentialsCreateOrUpdate = {
|
|
|
19
19
|
* Name of the credentials. Use this name to access or modify your credentials.
|
|
20
20
|
*/
|
|
21
21
|
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* Human-readable title for the credentials.
|
|
24
|
+
*/
|
|
25
|
+
title?: string | null | undefined;
|
|
22
26
|
/**
|
|
23
27
|
* Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged.
|
|
24
28
|
*/
|
|
@@ -32,6 +36,7 @@ export type CredentialsCreateOrUpdate = {
|
|
|
32
36
|
/** @internal */
|
|
33
37
|
export type CredentialsCreateOrUpdate$Outbound = {
|
|
34
38
|
name: string;
|
|
39
|
+
title?: string | null | undefined;
|
|
35
40
|
is_default?: boolean | null | undefined;
|
|
36
41
|
credentials?: ConnectionCredentials$Outbound | null | undefined;
|
|
37
42
|
};
|
|
@@ -42,6 +47,7 @@ export const CredentialsCreateOrUpdate$outboundSchema: z.ZodType<
|
|
|
42
47
|
CredentialsCreateOrUpdate
|
|
43
48
|
> = z.object({
|
|
44
49
|
name: z.string(),
|
|
50
|
+
title: z.nullable(z.string()).optional(),
|
|
45
51
|
isDefault: z.nullable(z.boolean()).optional(),
|
|
46
52
|
credentials: z.nullable(ConnectionCredentials$outboundSchema).optional(),
|
|
47
53
|
}).transform((v) => {
|
|
@@ -31,7 +31,6 @@ export type GetSearchIndexDetailResponseIndex = {
|
|
|
31
31
|
createdAt: Date;
|
|
32
32
|
modifiedAt: Date;
|
|
33
33
|
vespaVersion: string | null;
|
|
34
|
-
summary: string | null;
|
|
35
34
|
schemas: Array<GetSearchIndexDetailResponseSchemaModel>;
|
|
36
35
|
};
|
|
37
36
|
|
|
@@ -53,7 +52,6 @@ export const GetSearchIndexDetailResponseIndex$inboundSchema: z.ZodType<
|
|
|
53
52
|
created_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
|
|
54
53
|
modified_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
|
|
55
54
|
vespa_version: z.nullable(z.string()),
|
|
56
|
-
summary: z.nullable(z.string()),
|
|
57
55
|
schemas: z.array(GetSearchIndexDetailResponseSchemaModel$inboundSchema),
|
|
58
56
|
}).transform((v) => {
|
|
59
57
|
return remap$(v, {
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
|
|
16
16
|
export type GetSearchIndexSchemaDetailResponseSchemaModel = {
|
|
17
17
|
name: string;
|
|
18
|
-
summary: string | null;
|
|
19
18
|
embeddingDimensions: number | null;
|
|
20
19
|
fields: Array<GetSearchIndexSchemaDetailResponseField>;
|
|
21
20
|
};
|
|
@@ -24,7 +23,6 @@ export type GetSearchIndexSchemaDetailResponseSchemaModel = {
|
|
|
24
23
|
export const GetSearchIndexSchemaDetailResponseSchemaModel$inboundSchema:
|
|
25
24
|
z.ZodType<GetSearchIndexSchemaDetailResponseSchemaModel, unknown> = z.object({
|
|
26
25
|
name: z.string(),
|
|
27
|
-
summary: z.nullable(z.string()),
|
|
28
26
|
embedding_dimensions: z.nullable(z.int()),
|
|
29
27
|
fields: z.array(GetSearchIndexSchemaDetailResponseField$inboundSchema),
|
|
30
28
|
}).transform((v) => {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 0b23ba39be20
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import { SummaryStatus, SummaryStatus$inboundSchema } from "./summarystatus.js";
|
|
11
|
+
|
|
12
|
+
export type GetSummaryResponseSummary = {
|
|
13
|
+
content: string;
|
|
14
|
+
status: SummaryStatus;
|
|
15
|
+
translated: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const GetSummaryResponseSummary$inboundSchema: z.ZodType<
|
|
20
|
+
GetSummaryResponseSummary,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
content: z.string(),
|
|
24
|
+
status: SummaryStatus$inboundSchema,
|
|
25
|
+
translated: z.boolean(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function getSummaryResponseSummaryFromJSON(
|
|
29
|
+
jsonString: string,
|
|
30
|
+
): SafeParseResult<GetSummaryResponseSummary, SDKValidationError> {
|
|
31
|
+
return safeParse(
|
|
32
|
+
jsonString,
|
|
33
|
+
(x) => GetSummaryResponseSummary$inboundSchema.parse(JSON.parse(x)),
|
|
34
|
+
`Failed to parse 'GetSummaryResponseSummary' from JSON`,
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -17,6 +17,7 @@ export * from "./agentconversation.js";
|
|
|
17
17
|
export * from "./agenthandoffdoneevent.js";
|
|
18
18
|
export * from "./agenthandoffentry.js";
|
|
19
19
|
export * from "./agenthandoffstartedevent.js";
|
|
20
|
+
export * from "./agentlistpage.js";
|
|
20
21
|
export * from "./agentscompletionrequest.js";
|
|
21
22
|
export * from "./agentscompletionstreamrequest.js";
|
|
22
23
|
export * from "./aliaslist.js";
|
|
@@ -232,6 +233,7 @@ export * from "./getspanevaluations.js";
|
|
|
232
233
|
export * from "./getspanfieldoptions.js";
|
|
233
234
|
export * from "./getspanfields.js";
|
|
234
235
|
export * from "./getspans.js";
|
|
236
|
+
export * from "./getsummaryresponsesummary.js";
|
|
235
237
|
export * from "./gettrace.js";
|
|
236
238
|
export * from "./gettracefieldoptions.js";
|
|
237
239
|
export * from "./gettracefields.js";
|
|
@@ -461,6 +463,11 @@ export * from "./ssetypes.js";
|
|
|
461
463
|
export * from "./streamerror.js";
|
|
462
464
|
export * from "./streameventssepayload.js";
|
|
463
465
|
export * from "./streameventworkflowcontext.js";
|
|
466
|
+
export * from "./summarychunk.js";
|
|
467
|
+
export * from "./summaryerror.js";
|
|
468
|
+
export * from "./summarymetadata.js";
|
|
469
|
+
export * from "./summarystatus.js";
|
|
470
|
+
export * from "./summarystatusdollardefs.js";
|
|
464
471
|
export * from "./systemmessage.js";
|
|
465
472
|
export * from "./systemmessagecontentchunks.js";
|
|
466
473
|
export * from "./taskselicitationcapability.js";
|
|
@@ -530,13 +537,12 @@ export * from "./updatedocumentrequest.js";
|
|
|
530
537
|
export * from "./updateindexmetricsrequestindexmetricsoffline.js";
|
|
531
538
|
export * from "./updateindexmetricsrequestindexmetricsonline.js";
|
|
532
539
|
export * from "./updateindexmetricsrequestschemametrics.js";
|
|
533
|
-
export * from "./updateindexsummaryrequestsummary.js";
|
|
534
540
|
export * from "./updateinvocationbody.js";
|
|
535
541
|
export * from "./updatejudgerequest.js";
|
|
536
542
|
export * from "./updatelibraryrequest.js";
|
|
537
543
|
export * from "./updatemodelrequest.js";
|
|
538
544
|
export * from "./updateruninfo.js";
|
|
539
|
-
export * from "./
|
|
545
|
+
export * from "./updatesummaryrequestsummary.js";
|
|
540
546
|
export * from "./updateworkflowresponse.js";
|
|
541
547
|
export * from "./usageinfo.js";
|
|
542
548
|
export * from "./usageinfodollardefs.js";
|
|
@@ -29,6 +29,7 @@ export type ModelCapabilities = {
|
|
|
29
29
|
audioTranscription: boolean;
|
|
30
30
|
audioTranscriptionRealtime: boolean;
|
|
31
31
|
audioSpeech: boolean;
|
|
32
|
+
unifiedResources: boolean;
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
/** @internal */
|
|
@@ -49,6 +50,7 @@ export const ModelCapabilities$inboundSchema: z.ZodType<
|
|
|
49
50
|
audio_transcription: z.boolean().default(false),
|
|
50
51
|
audio_transcription_realtime: z.boolean().default(false),
|
|
51
52
|
audio_speech: z.boolean().default(false),
|
|
53
|
+
unified_resources: z.boolean().default(false),
|
|
52
54
|
}).transform((v) => {
|
|
53
55
|
return remap$(v, {
|
|
54
56
|
"completion_chat": "completionChat",
|
|
@@ -58,6 +60,7 @@ export const ModelCapabilities$inboundSchema: z.ZodType<
|
|
|
58
60
|
"audio_transcription": "audioTranscription",
|
|
59
61
|
"audio_transcription_realtime": "audioTranscriptionRealtime",
|
|
60
62
|
"audio_speech": "audioSpeech",
|
|
63
|
+
"unified_resources": "unifiedResources",
|
|
61
64
|
});
|
|
62
65
|
});
|
|
63
66
|
|
|
@@ -14,6 +14,7 @@ export type SpeechRequest = {
|
|
|
14
14
|
model?: string | null | undefined;
|
|
15
15
|
metadata?: { [k: string]: any } | null | undefined;
|
|
16
16
|
stream?: boolean | undefined;
|
|
17
|
+
promptCacheKey?: string | null | undefined;
|
|
17
18
|
/**
|
|
18
19
|
* The preset or custom voice to use for generating the speech.
|
|
19
20
|
*/
|
|
@@ -35,6 +36,7 @@ export type SpeechRequest$Outbound = {
|
|
|
35
36
|
model?: string | null | undefined;
|
|
36
37
|
metadata?: { [k: string]: any } | null | undefined;
|
|
37
38
|
stream: boolean;
|
|
39
|
+
prompt_cache_key?: string | null | undefined;
|
|
38
40
|
voice_id?: string | null | undefined;
|
|
39
41
|
ref_audio?: string | null | undefined;
|
|
40
42
|
input: string;
|
|
@@ -50,6 +52,7 @@ export const SpeechRequest$outboundSchema: z.ZodType<
|
|
|
50
52
|
model: z.nullable(z.string()).optional(),
|
|
51
53
|
metadata: z.nullable(z.record(z.string(), z.any())).optional(),
|
|
52
54
|
stream: z.boolean().default(false),
|
|
55
|
+
promptCacheKey: z.nullable(z.string()).optional(),
|
|
53
56
|
voiceId: z.nullable(z.string()).optional(),
|
|
54
57
|
refAudio: z.nullable(z.string()).optional(),
|
|
55
58
|
input: z.string(),
|
|
@@ -57,6 +60,7 @@ export const SpeechRequest$outboundSchema: z.ZodType<
|
|
|
57
60
|
}).catchall(z.any()).transform((v) => {
|
|
58
61
|
return {
|
|
59
62
|
...remap$(v, {
|
|
63
|
+
promptCacheKey: "prompt_cache_key",
|
|
60
64
|
voiceId: "voice_id",
|
|
61
65
|
refAudio: "ref_audio",
|
|
62
66
|
responseFormat: "response_format",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 653a15fd7774
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Regular content.
|
|
13
|
+
*/
|
|
14
|
+
export type SummaryChunk = {
|
|
15
|
+
content: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const SummaryChunk$inboundSchema: z.ZodType<SummaryChunk, unknown> = z
|
|
20
|
+
.object({
|
|
21
|
+
content: z.string(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function summaryChunkFromJSON(
|
|
25
|
+
jsonString: string,
|
|
26
|
+
): SafeParseResult<SummaryChunk, SDKValidationError> {
|
|
27
|
+
return safeParse(
|
|
28
|
+
jsonString,
|
|
29
|
+
(x) => SummaryChunk$inboundSchema.parse(JSON.parse(x)),
|
|
30
|
+
`Failed to parse 'SummaryChunk' from JSON`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: e599c659fdee
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* If an error is encountered while streaming responses this is returned.
|
|
13
|
+
*/
|
|
14
|
+
export type SummaryError = {
|
|
15
|
+
error: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const SummaryError$inboundSchema: z.ZodType<SummaryError, unknown> = z
|
|
20
|
+
.object({
|
|
21
|
+
error: z.string(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function summaryErrorFromJSON(
|
|
25
|
+
jsonString: string,
|
|
26
|
+
): SafeParseResult<SummaryError, SDKValidationError> {
|
|
27
|
+
return safeParse(
|
|
28
|
+
jsonString,
|
|
29
|
+
(x) => SummaryError$inboundSchema.parse(JSON.parse(x)),
|
|
30
|
+
`Failed to parse 'SummaryError' from JSON`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 377e322f69a3
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
SummaryStatusDollarDefs,
|
|
12
|
+
SummaryStatusDollarDefs$inboundSchema,
|
|
13
|
+
} from "./summarystatusdollardefs.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Summary content. Expected to be the first value returned.
|
|
17
|
+
*/
|
|
18
|
+
export type SummaryMetadata = {
|
|
19
|
+
status: SummaryStatusDollarDefs;
|
|
20
|
+
translated: boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const SummaryMetadata$inboundSchema: z.ZodType<
|
|
25
|
+
SummaryMetadata,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
status: SummaryStatusDollarDefs$inboundSchema,
|
|
29
|
+
translated: z.boolean(),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export function summaryMetadataFromJSON(
|
|
33
|
+
jsonString: string,
|
|
34
|
+
): SafeParseResult<SummaryMetadata, SDKValidationError> {
|
|
35
|
+
return safeParse(
|
|
36
|
+
jsonString,
|
|
37
|
+
(x) => SummaryMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
38
|
+
`Failed to parse 'SummaryMetadata' from JSON`,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: daf2d5710279
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
9
|
+
|
|
10
|
+
export const SummaryStatus = {
|
|
11
|
+
Handwritten: "handwritten",
|
|
12
|
+
Generated: "generated",
|
|
13
|
+
GeneratedConfirmed: "generated_confirmed",
|
|
14
|
+
} as const;
|
|
15
|
+
export type SummaryStatus = OpenEnum<typeof SummaryStatus>;
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const SummaryStatus$inboundSchema: z.ZodType<SummaryStatus, unknown> =
|
|
19
|
+
openEnums.inboundSchema(SummaryStatus);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 199f1ffe4bef
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
9
|
+
|
|
10
|
+
export const SummaryStatusDollarDefs = {
|
|
11
|
+
Handwritten: "handwritten",
|
|
12
|
+
Generated: "generated",
|
|
13
|
+
GeneratedConfirmed: "generated_confirmed",
|
|
14
|
+
} as const;
|
|
15
|
+
export type SummaryStatusDollarDefs = OpenEnum<typeof SummaryStatusDollarDefs>;
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const SummaryStatusDollarDefs$inboundSchema: z.ZodType<
|
|
19
|
+
SummaryStatusDollarDefs,
|
|
20
|
+
unknown
|
|
21
|
+
> = openEnums.inboundSchema(SummaryStatusDollarDefs);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: e503e00d86eb
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
export const UpdateSummaryRequestSummaryStatus = {
|
|
10
|
+
Handwritten: "handwritten",
|
|
11
|
+
GeneratedConfirmed: "generated_confirmed",
|
|
12
|
+
} as const;
|
|
13
|
+
export type UpdateSummaryRequestSummaryStatus = ClosedEnum<
|
|
14
|
+
typeof UpdateSummaryRequestSummaryStatus
|
|
15
|
+
>;
|
|
16
|
+
|
|
17
|
+
export type UpdateSummaryRequestSummary = {
|
|
18
|
+
content: string;
|
|
19
|
+
status: UpdateSummaryRequestSummaryStatus;
|
|
20
|
+
translated: boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const UpdateSummaryRequestSummaryStatus$outboundSchema: z.ZodEnum<
|
|
25
|
+
typeof UpdateSummaryRequestSummaryStatus
|
|
26
|
+
> = z.enum(UpdateSummaryRequestSummaryStatus);
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type UpdateSummaryRequestSummary$Outbound = {
|
|
30
|
+
content: string;
|
|
31
|
+
status: string;
|
|
32
|
+
translated: boolean;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const UpdateSummaryRequestSummary$outboundSchema: z.ZodType<
|
|
37
|
+
UpdateSummaryRequestSummary$Outbound,
|
|
38
|
+
UpdateSummaryRequestSummary
|
|
39
|
+
> = z.object({
|
|
40
|
+
content: z.string(),
|
|
41
|
+
status: UpdateSummaryRequestSummaryStatus$outboundSchema,
|
|
42
|
+
translated: z.boolean(),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export function updateSummaryRequestSummaryToJSON(
|
|
46
|
+
updateSummaryRequestSummary: UpdateSummaryRequestSummary,
|
|
47
|
+
): string {
|
|
48
|
+
return JSON.stringify(
|
|
49
|
+
UpdateSummaryRequestSummary$outboundSchema.parse(
|
|
50
|
+
updateSummaryRequestSummary,
|
|
51
|
+
),
|
|
52
|
+
);
|
|
53
|
+
}
|