syllable-sdk 0.1.0-alpha.44 → 0.1.0-alpha.46
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 +6 -2
- package/docs/sdks/datasources/README.md +26 -18
- package/docs/sdks/v1/README.md +158 -0
- package/funcs/dataSourcesDelete.d.ts.map +1 -1
- package/funcs/dataSourcesDelete.js +5 -2
- package/funcs/dataSourcesDelete.js.map +1 -1
- package/funcs/{dataSourcesGetByName.d.ts → dataSourcesGetById.d.ts} +2 -2
- package/funcs/dataSourcesGetById.d.ts.map +1 -0
- package/funcs/dataSourcesGetById.js +108 -0
- package/funcs/dataSourcesGetById.js.map +1 -0
- package/funcs/v1Delete.d.ts +16 -0
- package/funcs/v1Delete.d.ts.map +1 -0
- package/funcs/v1Delete.js +112 -0
- package/funcs/v1Delete.js.map +1 -0
- package/funcs/v1GetById.d.ts +17 -0
- package/funcs/v1GetById.d.ts.map +1 -0
- package/funcs/{dataSourcesGetByName.js → v1GetById.js} +10 -7
- package/funcs/v1GetById.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mintlify/mint.json +2 -0
- package/models/components/datasourcecreaterequest.d.ts +1 -1
- package/models/components/datasourcedetailresponse.d.ts +6 -1
- package/models/components/datasourcedetailresponse.d.ts.map +1 -1
- package/models/components/datasourcedetailresponse.js +2 -0
- package/models/components/datasourcedetailresponse.js.map +1 -1
- package/models/components/datasourcemetadataresponse.d.ts +6 -1
- package/models/components/datasourcemetadataresponse.d.ts.map +1 -1
- package/models/components/datasourcemetadataresponse.js +2 -0
- package/models/components/datasourcemetadataresponse.js.map +1 -1
- package/models/components/datasourceupdaterequest.d.ts +6 -1
- package/models/components/datasourceupdaterequest.d.ts.map +1 -1
- package/models/components/datasourceupdaterequest.js +2 -0
- package/models/components/datasourceupdaterequest.js.map +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/toolagentinfo.d.ts +40 -0
- package/models/components/toolagentinfo.d.ts.map +1 -0
- package/models/components/toolagentinfo.js +61 -0
- package/models/components/toolagentinfo.js.map +1 -0
- package/models/components/tooldetailresponse.d.ts +6 -0
- package/models/components/tooldetailresponse.d.ts.map +1 -1
- package/models/components/tooldetailresponse.js +5 -0
- package/models/components/tooldetailresponse.js.map +1 -1
- package/models/components/toolresponse.d.ts +6 -0
- package/models/components/toolresponse.d.ts.map +1 -1
- package/models/components/toolresponse.js +5 -0
- package/models/components/toolresponse.js.map +1 -1
- package/models/operations/datasourcesdelete.d.ts +2 -2
- package/models/operations/datasourcesdelete.d.ts.map +1 -1
- package/models/operations/datasourcesdelete.js +4 -4
- package/models/operations/datasourcesdelete.js.map +1 -1
- package/models/operations/datasourcesgetbyid.d.ts +29 -0
- package/models/operations/datasourcesgetbyid.d.ts.map +1 -0
- package/models/operations/{datasourcesgetbyname.js → datasourcesgetbyid.js} +21 -21
- package/models/operations/datasourcesgetbyid.js.map +1 -0
- package/models/operations/index.d.ts +1 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -1
- package/models/operations/index.js.map +1 -1
- package/openapi.json +172 -30
- package/package.json +1 -1
- package/sdk/datasources.d.ts +1 -1
- package/sdk/datasources.d.ts.map +1 -1
- package/sdk/datasources.js +3 -3
- package/sdk/datasources.js.map +1 -1
- package/sdk/sdk.d.ts +2 -2
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +3 -3
- package/sdk/sdk.js.map +1 -1
- package/sdk/v1.d.ts +14 -0
- package/sdk/v1.d.ts.map +1 -1
- package/sdk/v1.js +20 -0
- package/sdk/v1.js.map +1 -1
- package/src/funcs/dataSourcesDelete.ts +5 -8
- package/src/funcs/{dataSourcesGetByName.ts → dataSourcesGetById.ts} +9 -13
- package/src/funcs/v1Delete.ts +147 -0
- package/src/funcs/v1GetById.ts +142 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/datasourcecreaterequest.ts +1 -1
- package/src/models/components/datasourcedetailresponse.ts +8 -1
- package/src/models/components/datasourcemetadataresponse.ts +8 -1
- package/src/models/components/datasourceupdaterequest.ts +8 -1
- package/src/models/components/index.ts +1 -0
- package/src/models/components/toolagentinfo.ts +75 -0
- package/src/models/components/tooldetailresponse.ts +15 -0
- package/src/models/components/toolresponse.ts +15 -0
- package/src/models/operations/datasourcesdelete.ts +6 -6
- package/src/models/operations/datasourcesgetbyid.ts +75 -0
- package/src/models/operations/index.ts +1 -1
- package/src/sdk/datasources.ts +4 -4
- package/src/sdk/sdk.ts +5 -5
- package/src/sdk/v1.ts +36 -0
- package/funcs/dataSourcesGetByName.d.ts.map +0 -1
- package/funcs/dataSourcesGetByName.js.map +0 -1
- package/models/operations/datasourcesgetbyname.d.ts +0 -29
- package/models/operations/datasourcesgetbyname.d.ts.map +0 -1
- package/models/operations/datasourcesgetbyname.js.map +0 -1
- package/src/models/operations/datasourcesgetbyname.ts +0 -77
|
@@ -30,9 +30,9 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* @remarks
|
|
31
31
|
* Fetch a given data source, including its text.
|
|
32
32
|
*/
|
|
33
|
-
export async function
|
|
33
|
+
export async function dataSourcesGetById(
|
|
34
34
|
client: SyllableSDKCore,
|
|
35
|
-
request: operations.
|
|
35
|
+
request: operations.DataSourcesGetByIdRequest,
|
|
36
36
|
options?: RequestOptions,
|
|
37
37
|
): Promise<
|
|
38
38
|
Result<
|
|
@@ -49,8 +49,7 @@ export async function dataSourcesGetByName(
|
|
|
49
49
|
> {
|
|
50
50
|
const parsed = safeParse(
|
|
51
51
|
request,
|
|
52
|
-
(value) =>
|
|
53
|
-
operations.DataSourcesGetByNameRequest$outboundSchema.parse(value),
|
|
52
|
+
(value) => operations.DataSourcesGetByIdRequest$outboundSchema.parse(value),
|
|
54
53
|
"Input validation failed",
|
|
55
54
|
);
|
|
56
55
|
if (!parsed.ok) {
|
|
@@ -60,16 +59,13 @@ export async function dataSourcesGetByName(
|
|
|
60
59
|
const body = null;
|
|
61
60
|
|
|
62
61
|
const pathParams = {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
),
|
|
62
|
+
data_source_id: encodeSimple("data_source_id", payload.data_source_id, {
|
|
63
|
+
explode: false,
|
|
64
|
+
charEncoding: "percent",
|
|
65
|
+
}),
|
|
68
66
|
};
|
|
69
67
|
|
|
70
|
-
const path = pathToFunc("/api/v1/data_sources/{
|
|
71
|
-
pathParams,
|
|
72
|
-
);
|
|
68
|
+
const path = pathToFunc("/api/v1/data_sources/{data_source_id}")(pathParams);
|
|
73
69
|
|
|
74
70
|
const headers = new Headers(compactMap({
|
|
75
71
|
Accept: "application/json",
|
|
@@ -81,7 +77,7 @@ export async function dataSourcesGetByName(
|
|
|
81
77
|
|
|
82
78
|
const context = {
|
|
83
79
|
baseURL: options?.serverURL ?? "",
|
|
84
|
-
operationID: "
|
|
80
|
+
operationID: "data_sources_get_by_id",
|
|
85
81
|
oAuth2Scopes: [],
|
|
86
82
|
|
|
87
83
|
resolvedSecurity: requestSecurity,
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { SyllableSDKCore } from "../core.js";
|
|
7
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
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 { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { Result } from "../types/fp.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Delete Data Source
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Delete a given data source.
|
|
32
|
+
*/
|
|
33
|
+
export async function v1Delete(
|
|
34
|
+
client: SyllableSDKCore,
|
|
35
|
+
request: operations.DataSourcesDeleteRequest,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): Promise<
|
|
38
|
+
Result<
|
|
39
|
+
any,
|
|
40
|
+
| errors.HTTPValidationError
|
|
41
|
+
| SDKError
|
|
42
|
+
| SDKValidationError
|
|
43
|
+
| UnexpectedClientError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
const parsed = safeParse(
|
|
51
|
+
request,
|
|
52
|
+
(value) => operations.DataSourcesDeleteRequest$outboundSchema.parse(value),
|
|
53
|
+
"Input validation failed",
|
|
54
|
+
);
|
|
55
|
+
if (!parsed.ok) {
|
|
56
|
+
return parsed;
|
|
57
|
+
}
|
|
58
|
+
const payload = parsed.value;
|
|
59
|
+
const body = null;
|
|
60
|
+
|
|
61
|
+
const pathParams = {
|
|
62
|
+
data_source_id: encodeSimple("data_source_id", payload.data_source_id, {
|
|
63
|
+
explode: false,
|
|
64
|
+
charEncoding: "percent",
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const path = pathToFunc("/api/v1/data_sources/{data_source_id}")(pathParams);
|
|
69
|
+
|
|
70
|
+
const query = encodeFormQuery({
|
|
71
|
+
"reason": payload.reason,
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const headers = new Headers(compactMap({
|
|
75
|
+
Accept: "application/json",
|
|
76
|
+
}));
|
|
77
|
+
|
|
78
|
+
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
79
|
+
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
80
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
81
|
+
|
|
82
|
+
const context = {
|
|
83
|
+
baseURL: options?.serverURL ?? "",
|
|
84
|
+
operationID: "data_sources_delete",
|
|
85
|
+
oAuth2Scopes: [],
|
|
86
|
+
|
|
87
|
+
resolvedSecurity: requestSecurity,
|
|
88
|
+
|
|
89
|
+
securitySource: client._options.apiKeyHeader,
|
|
90
|
+
retryConfig: options?.retries
|
|
91
|
+
|| client._options.retryConfig
|
|
92
|
+
|| { strategy: "none" },
|
|
93
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const requestRes = client._createRequest(context, {
|
|
97
|
+
security: requestSecurity,
|
|
98
|
+
method: "DELETE",
|
|
99
|
+
baseURL: options?.serverURL,
|
|
100
|
+
path: path,
|
|
101
|
+
headers: headers,
|
|
102
|
+
query: query,
|
|
103
|
+
body: body,
|
|
104
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
105
|
+
}, options);
|
|
106
|
+
if (!requestRes.ok) {
|
|
107
|
+
return requestRes;
|
|
108
|
+
}
|
|
109
|
+
const req = requestRes.value;
|
|
110
|
+
|
|
111
|
+
const doResult = await client._do(req, {
|
|
112
|
+
context,
|
|
113
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
114
|
+
retryConfig: context.retryConfig,
|
|
115
|
+
retryCodes: context.retryCodes,
|
|
116
|
+
});
|
|
117
|
+
if (!doResult.ok) {
|
|
118
|
+
return doResult;
|
|
119
|
+
}
|
|
120
|
+
const response = doResult.value;
|
|
121
|
+
|
|
122
|
+
const responseFields = {
|
|
123
|
+
HttpMeta: { Response: response, Request: req },
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const [result] = await M.match<
|
|
127
|
+
any,
|
|
128
|
+
| errors.HTTPValidationError
|
|
129
|
+
| SDKError
|
|
130
|
+
| SDKValidationError
|
|
131
|
+
| UnexpectedClientError
|
|
132
|
+
| InvalidRequestError
|
|
133
|
+
| RequestAbortedError
|
|
134
|
+
| RequestTimeoutError
|
|
135
|
+
| ConnectionError
|
|
136
|
+
>(
|
|
137
|
+
M.json(200, z.any()),
|
|
138
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
139
|
+
M.fail("4XX"),
|
|
140
|
+
M.fail("5XX"),
|
|
141
|
+
)(response, { extraFields: responseFields });
|
|
142
|
+
if (!result.ok) {
|
|
143
|
+
return result;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return result;
|
|
147
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SyllableSDKCore } from "../core.js";
|
|
6
|
+
import { 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 * as components from "../models/components/index.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 { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { Result } from "../types/fp.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Get Data Source
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Fetch a given data source, including its text.
|
|
32
|
+
*/
|
|
33
|
+
export async function v1GetById(
|
|
34
|
+
client: SyllableSDKCore,
|
|
35
|
+
request: operations.DataSourcesGetByIdRequest,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): Promise<
|
|
38
|
+
Result<
|
|
39
|
+
components.DataSourceDetailResponse,
|
|
40
|
+
| errors.HTTPValidationError
|
|
41
|
+
| SDKError
|
|
42
|
+
| SDKValidationError
|
|
43
|
+
| UnexpectedClientError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
const parsed = safeParse(
|
|
51
|
+
request,
|
|
52
|
+
(value) => operations.DataSourcesGetByIdRequest$outboundSchema.parse(value),
|
|
53
|
+
"Input validation failed",
|
|
54
|
+
);
|
|
55
|
+
if (!parsed.ok) {
|
|
56
|
+
return parsed;
|
|
57
|
+
}
|
|
58
|
+
const payload = parsed.value;
|
|
59
|
+
const body = null;
|
|
60
|
+
|
|
61
|
+
const pathParams = {
|
|
62
|
+
data_source_id: encodeSimple("data_source_id", payload.data_source_id, {
|
|
63
|
+
explode: false,
|
|
64
|
+
charEncoding: "percent",
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const path = pathToFunc("/api/v1/data_sources/{data_source_id}")(pathParams);
|
|
69
|
+
|
|
70
|
+
const headers = new Headers(compactMap({
|
|
71
|
+
Accept: "application/json",
|
|
72
|
+
}));
|
|
73
|
+
|
|
74
|
+
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
75
|
+
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
76
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
77
|
+
|
|
78
|
+
const context = {
|
|
79
|
+
baseURL: options?.serverURL ?? "",
|
|
80
|
+
operationID: "data_sources_get_by_id",
|
|
81
|
+
oAuth2Scopes: [],
|
|
82
|
+
|
|
83
|
+
resolvedSecurity: requestSecurity,
|
|
84
|
+
|
|
85
|
+
securitySource: client._options.apiKeyHeader,
|
|
86
|
+
retryConfig: options?.retries
|
|
87
|
+
|| client._options.retryConfig
|
|
88
|
+
|| { strategy: "none" },
|
|
89
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const requestRes = client._createRequest(context, {
|
|
93
|
+
security: requestSecurity,
|
|
94
|
+
method: "GET",
|
|
95
|
+
baseURL: options?.serverURL,
|
|
96
|
+
path: path,
|
|
97
|
+
headers: headers,
|
|
98
|
+
body: body,
|
|
99
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
100
|
+
}, options);
|
|
101
|
+
if (!requestRes.ok) {
|
|
102
|
+
return requestRes;
|
|
103
|
+
}
|
|
104
|
+
const req = requestRes.value;
|
|
105
|
+
|
|
106
|
+
const doResult = await client._do(req, {
|
|
107
|
+
context,
|
|
108
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
109
|
+
retryConfig: context.retryConfig,
|
|
110
|
+
retryCodes: context.retryCodes,
|
|
111
|
+
});
|
|
112
|
+
if (!doResult.ok) {
|
|
113
|
+
return doResult;
|
|
114
|
+
}
|
|
115
|
+
const response = doResult.value;
|
|
116
|
+
|
|
117
|
+
const responseFields = {
|
|
118
|
+
HttpMeta: { Response: response, Request: req },
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const [result] = await M.match<
|
|
122
|
+
components.DataSourceDetailResponse,
|
|
123
|
+
| errors.HTTPValidationError
|
|
124
|
+
| SDKError
|
|
125
|
+
| SDKValidationError
|
|
126
|
+
| UnexpectedClientError
|
|
127
|
+
| InvalidRequestError
|
|
128
|
+
| RequestAbortedError
|
|
129
|
+
| RequestTimeoutError
|
|
130
|
+
| ConnectionError
|
|
131
|
+
>(
|
|
132
|
+
M.json(200, components.DataSourceDetailResponse$inboundSchema),
|
|
133
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
134
|
+
M.fail("4XX"),
|
|
135
|
+
M.fail("5XX"),
|
|
136
|
+
)(response, { extraFields: responseFields });
|
|
137
|
+
if (!result.ok) {
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return result;
|
|
142
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
59
|
openapiDocVersion: "0.0.2",
|
|
60
|
-
sdkVersion: "0.1.0-alpha.
|
|
60
|
+
sdkVersion: "0.1.0-alpha.46",
|
|
61
61
|
genVersion: "2.512.4",
|
|
62
62
|
userAgent:
|
|
63
|
-
"speakeasy-sdk/typescript 0.1.0-alpha.
|
|
63
|
+
"speakeasy-sdk/typescript 0.1.0-alpha.46 2.512.4 0.0.2 syllable-sdk",
|
|
64
64
|
} as const;
|
|
@@ -10,7 +10,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
10
10
|
|
|
11
11
|
export type DataSourceCreateRequest = {
|
|
12
12
|
/**
|
|
13
|
-
* The data source name. Must be unique within suborg.
|
|
13
|
+
* The data source name. Must be unique within suborg. Cannot contain whitespace.
|
|
14
14
|
*/
|
|
15
15
|
name: string;
|
|
16
16
|
/**
|
|
@@ -13,7 +13,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export type DataSourceDetailResponse = {
|
|
15
15
|
/**
|
|
16
|
-
* The data source name. Must be unique within suborg.
|
|
16
|
+
* The data source name. Must be unique within suborg. Cannot contain whitespace.
|
|
17
17
|
*/
|
|
18
18
|
name: string;
|
|
19
19
|
/**
|
|
@@ -32,6 +32,10 @@ export type DataSourceDetailResponse = {
|
|
|
32
32
|
* String that should be treated as delimiter between intended chunks if chunk == True. This string will not be included in any chunks. Defaults to a blank line ('\n\n').
|
|
33
33
|
*/
|
|
34
34
|
chunkDelimiter?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The data source ID.
|
|
37
|
+
*/
|
|
38
|
+
id: number;
|
|
35
39
|
/**
|
|
36
40
|
* The comments for the most recent edit to the data source
|
|
37
41
|
*/
|
|
@@ -61,6 +65,7 @@ export const DataSourceDetailResponse$inboundSchema: z.ZodType<
|
|
|
61
65
|
labels: z.array(z.string()).optional(),
|
|
62
66
|
chunk: z.boolean(),
|
|
63
67
|
chunk_delimiter: z.string().default("\n\n"),
|
|
68
|
+
id: z.number().int(),
|
|
64
69
|
edit_comments: z.nullable(z.string()).optional(),
|
|
65
70
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
66
71
|
last_updated_by: z.nullable(z.string()),
|
|
@@ -81,6 +86,7 @@ export type DataSourceDetailResponse$Outbound = {
|
|
|
81
86
|
labels?: Array<string> | undefined;
|
|
82
87
|
chunk: boolean;
|
|
83
88
|
chunk_delimiter: string;
|
|
89
|
+
id: number;
|
|
84
90
|
edit_comments?: string | null | undefined;
|
|
85
91
|
updated_at: string;
|
|
86
92
|
last_updated_by: string | null;
|
|
@@ -98,6 +104,7 @@ export const DataSourceDetailResponse$outboundSchema: z.ZodType<
|
|
|
98
104
|
labels: z.array(z.string()).optional(),
|
|
99
105
|
chunk: z.boolean(),
|
|
100
106
|
chunkDelimiter: z.string().default("\n\n"),
|
|
107
|
+
id: z.number().int(),
|
|
101
108
|
editComments: z.nullable(z.string()).optional(),
|
|
102
109
|
updatedAt: z.date().transform(v => v.toISOString()),
|
|
103
110
|
lastUpdatedBy: z.nullable(z.string()),
|
|
@@ -13,7 +13,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export type DataSourceMetadataResponse = {
|
|
15
15
|
/**
|
|
16
|
-
* The data source name. Must be unique within suborg.
|
|
16
|
+
* The data source name. Must be unique within suborg. Cannot contain whitespace.
|
|
17
17
|
*/
|
|
18
18
|
name: string;
|
|
19
19
|
/**
|
|
@@ -32,6 +32,10 @@ export type DataSourceMetadataResponse = {
|
|
|
32
32
|
* String that should be treated as delimiter between intended chunks if chunk == True. This string will not be included in any chunks. Defaults to a blank line ('\n\n').
|
|
33
33
|
*/
|
|
34
34
|
chunkDelimiter?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The data source ID.
|
|
37
|
+
*/
|
|
38
|
+
id: number;
|
|
35
39
|
/**
|
|
36
40
|
* The comments for the most recent edit to the data source
|
|
37
41
|
*/
|
|
@@ -57,6 +61,7 @@ export const DataSourceMetadataResponse$inboundSchema: z.ZodType<
|
|
|
57
61
|
labels: z.array(z.string()).optional(),
|
|
58
62
|
chunk: z.boolean(),
|
|
59
63
|
chunk_delimiter: z.string().default("\n\n"),
|
|
64
|
+
id: z.number().int(),
|
|
60
65
|
edit_comments: z.nullable(z.string()).optional(),
|
|
61
66
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
62
67
|
last_updated_by: z.nullable(z.string()),
|
|
@@ -76,6 +81,7 @@ export type DataSourceMetadataResponse$Outbound = {
|
|
|
76
81
|
labels?: Array<string> | undefined;
|
|
77
82
|
chunk: boolean;
|
|
78
83
|
chunk_delimiter: string;
|
|
84
|
+
id: number;
|
|
79
85
|
edit_comments?: string | null | undefined;
|
|
80
86
|
updated_at: string;
|
|
81
87
|
last_updated_by: string | null;
|
|
@@ -92,6 +98,7 @@ export const DataSourceMetadataResponse$outboundSchema: z.ZodType<
|
|
|
92
98
|
labels: z.array(z.string()).optional(),
|
|
93
99
|
chunk: z.boolean(),
|
|
94
100
|
chunkDelimiter: z.string().default("\n\n"),
|
|
101
|
+
id: z.number().int(),
|
|
95
102
|
editComments: z.nullable(z.string()).optional(),
|
|
96
103
|
updatedAt: z.date().transform(v => v.toISOString()),
|
|
97
104
|
lastUpdatedBy: z.nullable(z.string()),
|
|
@@ -10,7 +10,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
10
10
|
|
|
11
11
|
export type DataSourceUpdateRequest = {
|
|
12
12
|
/**
|
|
13
|
-
* The data source name. Must be unique within suborg.
|
|
13
|
+
* The data source name. Must be unique within suborg. Cannot contain whitespace.
|
|
14
14
|
*/
|
|
15
15
|
name: string;
|
|
16
16
|
/**
|
|
@@ -29,6 +29,10 @@ export type DataSourceUpdateRequest = {
|
|
|
29
29
|
* String that should be treated as delimiter between intended chunks if chunk == True. This string will not be included in any chunks. Defaults to a blank line ('\n\n').
|
|
30
30
|
*/
|
|
31
31
|
chunkDelimiter?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The data source ID.
|
|
34
|
+
*/
|
|
35
|
+
id: number;
|
|
32
36
|
/**
|
|
33
37
|
* The comments for the most recent edit to the data source
|
|
34
38
|
*/
|
|
@@ -50,6 +54,7 @@ export const DataSourceUpdateRequest$inboundSchema: z.ZodType<
|
|
|
50
54
|
labels: z.array(z.string()).optional(),
|
|
51
55
|
chunk: z.boolean(),
|
|
52
56
|
chunk_delimiter: z.string().default("\n\n"),
|
|
57
|
+
id: z.number().int(),
|
|
53
58
|
edit_comments: z.nullable(z.string()).optional(),
|
|
54
59
|
text: z.string(),
|
|
55
60
|
}).transform((v) => {
|
|
@@ -66,6 +71,7 @@ export type DataSourceUpdateRequest$Outbound = {
|
|
|
66
71
|
labels?: Array<string> | undefined;
|
|
67
72
|
chunk: boolean;
|
|
68
73
|
chunk_delimiter: string;
|
|
74
|
+
id: number;
|
|
69
75
|
edit_comments?: string | null | undefined;
|
|
70
76
|
text: string;
|
|
71
77
|
};
|
|
@@ -81,6 +87,7 @@ export const DataSourceUpdateRequest$outboundSchema: z.ZodType<
|
|
|
81
87
|
labels: z.array(z.string()).optional(),
|
|
82
88
|
chunk: z.boolean(),
|
|
83
89
|
chunkDelimiter: z.string().default("\n\n"),
|
|
90
|
+
id: z.number().int(),
|
|
84
91
|
editComments: z.nullable(z.string()).optional(),
|
|
85
92
|
text: z.string(),
|
|
86
93
|
}).transform((v) => {
|
|
@@ -81,6 +81,7 @@ export * from "./sttprovider.js";
|
|
|
81
81
|
export * from "./targetmodes.js";
|
|
82
82
|
export * from "./testmessage.js";
|
|
83
83
|
export * from "./testmessageresponse.js";
|
|
84
|
+
export * from "./toolagentinfo.js";
|
|
84
85
|
export * from "./toolargumentlocation.js";
|
|
85
86
|
export * from "./toolcreaterequest.js";
|
|
86
87
|
export * from "./tooldefinition.js";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Information about an agent linked to a tool via a prompt.
|
|
12
|
+
*/
|
|
13
|
+
export type ToolAgentInfo = {
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the agent
|
|
16
|
+
*/
|
|
17
|
+
id: number;
|
|
18
|
+
/**
|
|
19
|
+
* The name of the agent
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const ToolAgentInfo$inboundSchema: z.ZodType<
|
|
26
|
+
ToolAgentInfo,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
id: z.number().int(),
|
|
31
|
+
name: z.string(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type ToolAgentInfo$Outbound = {
|
|
36
|
+
id: number;
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ToolAgentInfo$outboundSchema: z.ZodType<
|
|
42
|
+
ToolAgentInfo$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
ToolAgentInfo
|
|
45
|
+
> = z.object({
|
|
46
|
+
id: z.number().int(),
|
|
47
|
+
name: z.string(),
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
53
|
+
*/
|
|
54
|
+
export namespace ToolAgentInfo$ {
|
|
55
|
+
/** @deprecated use `ToolAgentInfo$inboundSchema` instead. */
|
|
56
|
+
export const inboundSchema = ToolAgentInfo$inboundSchema;
|
|
57
|
+
/** @deprecated use `ToolAgentInfo$outboundSchema` instead. */
|
|
58
|
+
export const outboundSchema = ToolAgentInfo$outboundSchema;
|
|
59
|
+
/** @deprecated use `ToolAgentInfo$Outbound` instead. */
|
|
60
|
+
export type Outbound = ToolAgentInfo$Outbound;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function toolAgentInfoToJSON(toolAgentInfo: ToolAgentInfo): string {
|
|
64
|
+
return JSON.stringify(ToolAgentInfo$outboundSchema.parse(toolAgentInfo));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function toolAgentInfoFromJSON(
|
|
68
|
+
jsonString: string,
|
|
69
|
+
): SafeParseResult<ToolAgentInfo, SDKValidationError> {
|
|
70
|
+
return safeParse(
|
|
71
|
+
jsonString,
|
|
72
|
+
(x) => ToolAgentInfo$inboundSchema.parse(JSON.parse(x)),
|
|
73
|
+
`Failed to parse 'ToolAgentInfo' from JSON`,
|
|
74
|
+
);
|
|
75
|
+
}
|
|
@@ -7,6 +7,12 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
ToolAgentInfo,
|
|
12
|
+
ToolAgentInfo$inboundSchema,
|
|
13
|
+
ToolAgentInfo$Outbound,
|
|
14
|
+
ToolAgentInfo$outboundSchema,
|
|
15
|
+
} from "./toolagentinfo.js";
|
|
10
16
|
import {
|
|
11
17
|
ToolDefinition,
|
|
12
18
|
ToolDefinition$inboundSchema,
|
|
@@ -56,6 +62,10 @@ export type ToolDetailResponse = {
|
|
|
56
62
|
* IDs and names of the prompts linked to the tool
|
|
57
63
|
*/
|
|
58
64
|
promptsInfo?: Array<ToolPromptInfo> | null | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* IDs and names of the agents linked to the tool via a prompt
|
|
67
|
+
*/
|
|
68
|
+
agentsInfo?: Array<ToolAgentInfo> | null | undefined;
|
|
59
69
|
/**
|
|
60
70
|
* The timestamp of the most recent update to the service
|
|
61
71
|
*/
|
|
@@ -83,6 +93,7 @@ export const ToolDetailResponse$inboundSchema: z.ZodType<
|
|
|
83
93
|
last_updated_comments: z.nullable(z.string()).optional(),
|
|
84
94
|
service_name: z.nullable(z.string()).optional(),
|
|
85
95
|
prompts_info: z.nullable(z.array(ToolPromptInfo$inboundSchema)).optional(),
|
|
96
|
+
agents_info: z.nullable(z.array(ToolAgentInfo$inboundSchema)).optional(),
|
|
86
97
|
last_updated: z.string().datetime({ offset: true }).transform(v =>
|
|
87
98
|
new Date(v)
|
|
88
99
|
),
|
|
@@ -94,6 +105,7 @@ export const ToolDetailResponse$inboundSchema: z.ZodType<
|
|
|
94
105
|
"last_updated_comments": "lastUpdatedComments",
|
|
95
106
|
"service_name": "serviceName",
|
|
96
107
|
"prompts_info": "promptsInfo",
|
|
108
|
+
"agents_info": "agentsInfo",
|
|
97
109
|
"last_updated": "lastUpdated",
|
|
98
110
|
"last_updated_by": "lastUpdatedBy",
|
|
99
111
|
});
|
|
@@ -108,6 +120,7 @@ export type ToolDetailResponse$Outbound = {
|
|
|
108
120
|
last_updated_comments?: string | null | undefined;
|
|
109
121
|
service_name?: string | null | undefined;
|
|
110
122
|
prompts_info?: Array<ToolPromptInfo$Outbound> | null | undefined;
|
|
123
|
+
agents_info?: Array<ToolAgentInfo$Outbound> | null | undefined;
|
|
111
124
|
last_updated: string;
|
|
112
125
|
last_updated_by: string;
|
|
113
126
|
fields: Array<string>;
|
|
@@ -126,6 +139,7 @@ export const ToolDetailResponse$outboundSchema: z.ZodType<
|
|
|
126
139
|
lastUpdatedComments: z.nullable(z.string()).optional(),
|
|
127
140
|
serviceName: z.nullable(z.string()).optional(),
|
|
128
141
|
promptsInfo: z.nullable(z.array(ToolPromptInfo$outboundSchema)).optional(),
|
|
142
|
+
agentsInfo: z.nullable(z.array(ToolAgentInfo$outboundSchema)).optional(),
|
|
129
143
|
lastUpdated: z.date().transform(v => v.toISOString()),
|
|
130
144
|
lastUpdatedBy: z.string(),
|
|
131
145
|
fields: z.array(z.string()),
|
|
@@ -135,6 +149,7 @@ export const ToolDetailResponse$outboundSchema: z.ZodType<
|
|
|
135
149
|
lastUpdatedComments: "last_updated_comments",
|
|
136
150
|
serviceName: "service_name",
|
|
137
151
|
promptsInfo: "prompts_info",
|
|
152
|
+
agentsInfo: "agents_info",
|
|
138
153
|
lastUpdated: "last_updated",
|
|
139
154
|
lastUpdatedBy: "last_updated_by",
|
|
140
155
|
});
|