syllable-sdk 0.1.0-alpha.34 → 0.1.0-alpha.36
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 +23 -0
- package/docs/sdks/agents/README.md +18 -6
- package/docs/sdks/custommessages/README.md +160 -2
- package/docs/sdks/datasources/README.md +417 -0
- package/docs/sdks/prompts/README.md +0 -8
- package/docs/sdks/sessionlabels/README.md +6 -0
- package/docs/sdks/targets/README.md +10 -18
- package/docs/sdks/tools/README.md +6 -6
- package/docs/sdks/v1/README.md +408 -0
- package/funcs/agentsCreate.js +1 -1
- package/funcs/agentsCreate.js.map +1 -1
- package/funcs/agentsDelete.js +1 -1
- package/funcs/agentsDelete.js.map +1 -1
- package/funcs/agentsUpdate.js +1 -1
- package/funcs/agentsUpdate.js.map +1 -1
- package/funcs/dataSourcesCreate.d.ts +16 -0
- package/funcs/dataSourcesCreate.d.ts.map +1 -0
- package/funcs/dataSourcesCreate.js +101 -0
- package/funcs/dataSourcesCreate.js.map +1 -0
- package/funcs/dataSourcesDataSourcesDeleteByName.d.ts +16 -0
- package/funcs/dataSourcesDataSourcesDeleteByName.d.ts.map +1 -0
- package/funcs/dataSourcesDataSourcesDeleteByName.js +111 -0
- package/funcs/dataSourcesDataSourcesDeleteByName.js.map +1 -0
- package/funcs/dataSourcesGetByName.d.ts +17 -0
- package/funcs/dataSourcesGetByName.d.ts.map +1 -0
- package/funcs/dataSourcesGetByName.js +107 -0
- package/funcs/dataSourcesGetByName.js.map +1 -0
- package/funcs/dataSourcesList.d.ts +17 -0
- package/funcs/dataSourcesList.d.ts.map +1 -0
- package/funcs/dataSourcesList.js +113 -0
- package/funcs/dataSourcesList.js.map +1 -0
- package/funcs/dataSourcesUpdate.d.ts +16 -0
- package/funcs/dataSourcesUpdate.d.ts.map +1 -0
- package/funcs/dataSourcesUpdate.js +101 -0
- package/funcs/dataSourcesUpdate.js.map +1 -0
- package/funcs/v1Create.d.ts +16 -0
- package/funcs/v1Create.d.ts.map +1 -0
- package/funcs/v1Create.js +101 -0
- package/funcs/v1Create.js.map +1 -0
- package/funcs/v1DataSourcesDeleteByName.d.ts +16 -0
- package/funcs/v1DataSourcesDeleteByName.d.ts.map +1 -0
- package/funcs/v1DataSourcesDeleteByName.js +111 -0
- package/funcs/v1DataSourcesDeleteByName.js.map +1 -0
- package/funcs/v1GetByName.d.ts +17 -0
- package/funcs/v1GetByName.d.ts.map +1 -0
- package/funcs/v1GetByName.js +107 -0
- package/funcs/v1GetByName.js.map +1 -0
- package/funcs/v1List.d.ts +17 -0
- package/funcs/v1List.d.ts.map +1 -0
- package/funcs/v1List.js +113 -0
- package/funcs/v1List.js.map +1 -0
- package/funcs/v1Update.d.ts +16 -0
- package/funcs/v1Update.d.ts.map +1 -0
- package/funcs/v1Update.js +101 -0
- package/funcs/v1Update.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/retries.js +0 -1
- package/lib/retries.js.map +1 -1
- package/lib/schemas.d.ts +1 -1
- package/lib/schemas.d.ts.map +1 -1
- package/lib/schemas.js +4 -1
- package/lib/schemas.js.map +1 -1
- package/mintlify/mint.json +1 -1
- package/models/components/agentcreate.d.ts +6 -23
- package/models/components/agentcreate.d.ts.map +1 -1
- package/models/components/agentcreate.js +3 -26
- package/models/components/agentcreate.js.map +1 -1
- package/models/components/agentupdate.d.ts +6 -23
- package/models/components/agentupdate.d.ts.map +1 -1
- package/models/components/agentupdate.js +3 -26
- package/models/components/agentupdate.js.map +1 -1
- package/models/components/datasourcecreaterequest.d.ts +57 -0
- package/models/components/datasourcecreaterequest.d.ts.map +1 -0
- package/models/components/datasourcecreaterequest.js +78 -0
- package/models/components/datasourcecreaterequest.js.map +1 -0
- package/models/components/datasourcedetailresponse.d.ts +75 -0
- package/models/components/datasourcedetailresponse.d.ts.map +1 -0
- package/models/components/datasourcedetailresponse.js +90 -0
- package/models/components/datasourcedetailresponse.js.map +1 -0
- package/models/components/datasourcemetadataresponse.d.ts +70 -0
- package/models/components/datasourcemetadataresponse.d.ts.map +1 -0
- package/models/components/datasourcemetadataresponse.js +88 -0
- package/models/components/datasourcemetadataresponse.js.map +1 -0
- package/models/components/datasourceproperties.d.ts +43 -0
- package/models/components/datasourceproperties.d.ts.map +1 -0
- package/models/components/datasourceproperties.js +55 -0
- package/models/components/datasourceproperties.js.map +1 -0
- package/models/components/datasourceupdaterequest.d.ts +62 -0
- package/models/components/datasourceupdaterequest.d.ts.map +1 -0
- package/models/components/datasourceupdaterequest.js +82 -0
- package/models/components/datasourceupdaterequest.js.map +1 -0
- package/models/components/index.d.ts +6 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +6 -0
- package/models/components/index.js.map +1 -1
- package/models/components/listresponsedatasourcemetadataresponse.d.ts +38 -0
- package/models/components/listresponsedatasourcemetadataresponse.d.ts.map +1 -0
- package/models/components/listresponsedatasourcemetadataresponse.js +81 -0
- package/models/components/listresponsedatasourcemetadataresponse.js.map +1 -0
- package/models/operations/datasourcesdeletebyname.d.ts +31 -0
- package/models/operations/datasourcesdeletebyname.d.ts.map +1 -0
- package/models/operations/datasourcesdeletebyname.js +61 -0
- package/models/operations/datasourcesdeletebyname.js.map +1 -0
- package/models/operations/datasourcesgetbyname.d.ts +29 -0
- package/models/operations/datasourcesgetbyname.d.ts.map +1 -0
- package/models/operations/datasourcesgetbyname.js +59 -0
- package/models/operations/datasourcesgetbyname.js.map +1 -0
- package/models/operations/datasourceslist.d.ts +46 -0
- package/models/operations/datasourceslist.d.ts.map +1 -0
- package/models/operations/datasourceslist.js +103 -0
- package/models/operations/datasourceslist.js.map +1 -0
- package/models/operations/index.d.ts +3 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +3 -0
- package/models/operations/index.js.map +1 -1
- package/openapi.json +3080 -1612
- package/package.json +6 -7
- package/sdk/datasources.d.ts +41 -0
- package/sdk/datasources.d.ts.map +1 -0
- package/sdk/datasources.js +62 -0
- package/sdk/datasources.js.map +1 -0
- package/sdk/sdk.d.ts +5 -2
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +7 -3
- package/sdk/sdk.js.map +1 -1
- package/sdk/v1.d.ts +36 -0
- package/sdk/v1.d.ts.map +1 -1
- package/sdk/v1.js +50 -0
- package/sdk/v1.js.map +1 -1
- package/src/funcs/agentsCreate.ts +1 -1
- package/src/funcs/agentsDelete.ts +1 -1
- package/src/funcs/agentsUpdate.ts +1 -1
- package/src/funcs/dataSourcesCreate.ts +134 -0
- package/src/funcs/dataSourcesDataSourcesDeleteByName.ts +147 -0
- package/src/funcs/dataSourcesGetByName.ts +142 -0
- package/src/funcs/dataSourcesList.ts +150 -0
- package/src/funcs/dataSourcesUpdate.ts +134 -0
- package/src/funcs/v1Create.ts +134 -0
- package/src/funcs/v1DataSourcesDeleteByName.ts +147 -0
- package/src/funcs/v1GetByName.ts +142 -0
- package/src/funcs/v1List.ts +150 -0
- package/src/funcs/v1Update.ts +134 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/retries.ts +0 -1
- package/src/lib/schemas.ts +5 -0
- package/src/models/components/agentcreate.ts +4 -50
- package/src/models/components/agentupdate.ts +4 -54
- package/src/models/components/datasourcecreaterequest.ts +113 -0
- package/src/models/components/datasourcedetailresponse.ts +143 -0
- package/src/models/components/datasourcemetadataresponse.ts +136 -0
- package/src/models/components/datasourceproperties.ts +38 -0
- package/src/models/components/datasourceupdaterequest.ts +122 -0
- package/src/models/components/index.ts +6 -0
- package/src/models/components/listresponsedatasourcemetadataresponse.ts +107 -0
- package/src/models/operations/datasourcesdeletebyname.ts +72 -0
- package/src/models/operations/datasourcesgetbyname.ts +68 -0
- package/src/models/operations/datasourceslist.ts +126 -0
- package/src/models/operations/index.ts +3 -0
- package/src/sdk/datasources.ts +100 -0
- package/src/sdk/sdk.ts +11 -5
- package/src/sdk/v1.ts +91 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
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
|
+
export type DataSourceCreateRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* The data source name. Must be unique within suborg.
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* The description of the data source.
|
|
18
|
+
*/
|
|
19
|
+
description?: string | null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Searchable labels for the data source. Can be included in agent.prompt_tool_defaults for a given tool to give the agent access to data sources with those labels when calling that tool.
|
|
22
|
+
*/
|
|
23
|
+
labels?: Array<string> | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the content should be split into smaller chunks. This can improve agent performance when searching a large data source but risks some relevant information being left off search results if chunk_delimiter is not set up properly.
|
|
26
|
+
*/
|
|
27
|
+
chunk: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* String that should be treated as delimiter between intended chunks if chunk == True. This string will not be included in any chunks. If chunk == True and chunk_delimiter is None, the default chunking algorithm will be used. It is recommended that a delimiter be specified if chunking is enabled.
|
|
30
|
+
*/
|
|
31
|
+
chunkDelimiter?: string | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Information that the data source will provide to the agent accessing it.
|
|
34
|
+
*/
|
|
35
|
+
text: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const DataSourceCreateRequest$inboundSchema: z.ZodType<
|
|
40
|
+
DataSourceCreateRequest,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
unknown
|
|
43
|
+
> = z.object({
|
|
44
|
+
name: z.string(),
|
|
45
|
+
description: z.nullable(z.string()).optional(),
|
|
46
|
+
labels: z.array(z.string()).optional(),
|
|
47
|
+
chunk: z.boolean(),
|
|
48
|
+
chunk_delimiter: z.nullable(z.string()).optional(),
|
|
49
|
+
text: z.string(),
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
"chunk_delimiter": "chunkDelimiter",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export type DataSourceCreateRequest$Outbound = {
|
|
58
|
+
name: string;
|
|
59
|
+
description?: string | null | undefined;
|
|
60
|
+
labels?: Array<string> | undefined;
|
|
61
|
+
chunk: boolean;
|
|
62
|
+
chunk_delimiter?: string | null | undefined;
|
|
63
|
+
text: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const DataSourceCreateRequest$outboundSchema: z.ZodType<
|
|
68
|
+
DataSourceCreateRequest$Outbound,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
DataSourceCreateRequest
|
|
71
|
+
> = z.object({
|
|
72
|
+
name: z.string(),
|
|
73
|
+
description: z.nullable(z.string()).optional(),
|
|
74
|
+
labels: z.array(z.string()).optional(),
|
|
75
|
+
chunk: z.boolean(),
|
|
76
|
+
chunkDelimiter: z.nullable(z.string()).optional(),
|
|
77
|
+
text: z.string(),
|
|
78
|
+
}).transform((v) => {
|
|
79
|
+
return remap$(v, {
|
|
80
|
+
chunkDelimiter: "chunk_delimiter",
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
87
|
+
*/
|
|
88
|
+
export namespace DataSourceCreateRequest$ {
|
|
89
|
+
/** @deprecated use `DataSourceCreateRequest$inboundSchema` instead. */
|
|
90
|
+
export const inboundSchema = DataSourceCreateRequest$inboundSchema;
|
|
91
|
+
/** @deprecated use `DataSourceCreateRequest$outboundSchema` instead. */
|
|
92
|
+
export const outboundSchema = DataSourceCreateRequest$outboundSchema;
|
|
93
|
+
/** @deprecated use `DataSourceCreateRequest$Outbound` instead. */
|
|
94
|
+
export type Outbound = DataSourceCreateRequest$Outbound;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function dataSourceCreateRequestToJSON(
|
|
98
|
+
dataSourceCreateRequest: DataSourceCreateRequest,
|
|
99
|
+
): string {
|
|
100
|
+
return JSON.stringify(
|
|
101
|
+
DataSourceCreateRequest$outboundSchema.parse(dataSourceCreateRequest),
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function dataSourceCreateRequestFromJSON(
|
|
106
|
+
jsonString: string,
|
|
107
|
+
): SafeParseResult<DataSourceCreateRequest, SDKValidationError> {
|
|
108
|
+
return safeParse(
|
|
109
|
+
jsonString,
|
|
110
|
+
(x) => DataSourceCreateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
111
|
+
`Failed to parse 'DataSourceCreateRequest' from JSON`,
|
|
112
|
+
);
|
|
113
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
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
|
+
* Metadata about a data source, along with the text.
|
|
13
|
+
*/
|
|
14
|
+
export type DataSourceDetailResponse = {
|
|
15
|
+
/**
|
|
16
|
+
* The data source name. Must be unique within suborg.
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* The description of the data source.
|
|
21
|
+
*/
|
|
22
|
+
description?: string | null | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Searchable labels for the data source. Can be included in agent.prompt_tool_defaults for a given tool to give the agent access to data sources with those labels when calling that tool.
|
|
25
|
+
*/
|
|
26
|
+
labels?: Array<string> | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the content should be split into smaller chunks. This can improve agent performance when searching a large data source but risks some relevant information being left off search results if chunk_delimiter is not set up properly.
|
|
29
|
+
*/
|
|
30
|
+
chunk: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* String that should be treated as delimiter between intended chunks if chunk == True. This string will not be included in any chunks. If chunk == True and chunk_delimiter is None, the default chunking algorithm will be used. It is recommended that a delimiter be specified if chunking is enabled.
|
|
33
|
+
*/
|
|
34
|
+
chunkDelimiter?: string | null | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The comments for the most recent edit to the data source
|
|
37
|
+
*/
|
|
38
|
+
editComments?: string | null | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Timestamp of most recent update
|
|
41
|
+
*/
|
|
42
|
+
updatedAt: Date;
|
|
43
|
+
/**
|
|
44
|
+
* Email of the user who last updated the data source
|
|
45
|
+
*/
|
|
46
|
+
lastUpdatedBy: string | null;
|
|
47
|
+
/**
|
|
48
|
+
* Information that the data source will provide to the agent accessing it.
|
|
49
|
+
*/
|
|
50
|
+
text: string;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const DataSourceDetailResponse$inboundSchema: z.ZodType<
|
|
55
|
+
DataSourceDetailResponse,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
unknown
|
|
58
|
+
> = z.object({
|
|
59
|
+
name: z.string(),
|
|
60
|
+
description: z.nullable(z.string()).optional(),
|
|
61
|
+
labels: z.array(z.string()).optional(),
|
|
62
|
+
chunk: z.boolean(),
|
|
63
|
+
chunk_delimiter: z.nullable(z.string()).optional(),
|
|
64
|
+
edit_comments: z.nullable(z.string()).optional(),
|
|
65
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
66
|
+
last_updated_by: z.nullable(z.string()),
|
|
67
|
+
text: z.string(),
|
|
68
|
+
}).transform((v) => {
|
|
69
|
+
return remap$(v, {
|
|
70
|
+
"chunk_delimiter": "chunkDelimiter",
|
|
71
|
+
"edit_comments": "editComments",
|
|
72
|
+
"updated_at": "updatedAt",
|
|
73
|
+
"last_updated_by": "lastUpdatedBy",
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
/** @internal */
|
|
78
|
+
export type DataSourceDetailResponse$Outbound = {
|
|
79
|
+
name: string;
|
|
80
|
+
description?: string | null | undefined;
|
|
81
|
+
labels?: Array<string> | undefined;
|
|
82
|
+
chunk: boolean;
|
|
83
|
+
chunk_delimiter?: string | null | undefined;
|
|
84
|
+
edit_comments?: string | null | undefined;
|
|
85
|
+
updated_at: string;
|
|
86
|
+
last_updated_by: string | null;
|
|
87
|
+
text: string;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const DataSourceDetailResponse$outboundSchema: z.ZodType<
|
|
92
|
+
DataSourceDetailResponse$Outbound,
|
|
93
|
+
z.ZodTypeDef,
|
|
94
|
+
DataSourceDetailResponse
|
|
95
|
+
> = z.object({
|
|
96
|
+
name: z.string(),
|
|
97
|
+
description: z.nullable(z.string()).optional(),
|
|
98
|
+
labels: z.array(z.string()).optional(),
|
|
99
|
+
chunk: z.boolean(),
|
|
100
|
+
chunkDelimiter: z.nullable(z.string()).optional(),
|
|
101
|
+
editComments: z.nullable(z.string()).optional(),
|
|
102
|
+
updatedAt: z.date().transform(v => v.toISOString()),
|
|
103
|
+
lastUpdatedBy: z.nullable(z.string()),
|
|
104
|
+
text: z.string(),
|
|
105
|
+
}).transform((v) => {
|
|
106
|
+
return remap$(v, {
|
|
107
|
+
chunkDelimiter: "chunk_delimiter",
|
|
108
|
+
editComments: "edit_comments",
|
|
109
|
+
updatedAt: "updated_at",
|
|
110
|
+
lastUpdatedBy: "last_updated_by",
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @internal
|
|
116
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
117
|
+
*/
|
|
118
|
+
export namespace DataSourceDetailResponse$ {
|
|
119
|
+
/** @deprecated use `DataSourceDetailResponse$inboundSchema` instead. */
|
|
120
|
+
export const inboundSchema = DataSourceDetailResponse$inboundSchema;
|
|
121
|
+
/** @deprecated use `DataSourceDetailResponse$outboundSchema` instead. */
|
|
122
|
+
export const outboundSchema = DataSourceDetailResponse$outboundSchema;
|
|
123
|
+
/** @deprecated use `DataSourceDetailResponse$Outbound` instead. */
|
|
124
|
+
export type Outbound = DataSourceDetailResponse$Outbound;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function dataSourceDetailResponseToJSON(
|
|
128
|
+
dataSourceDetailResponse: DataSourceDetailResponse,
|
|
129
|
+
): string {
|
|
130
|
+
return JSON.stringify(
|
|
131
|
+
DataSourceDetailResponse$outboundSchema.parse(dataSourceDetailResponse),
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function dataSourceDetailResponseFromJSON(
|
|
136
|
+
jsonString: string,
|
|
137
|
+
): SafeParseResult<DataSourceDetailResponse, SDKValidationError> {
|
|
138
|
+
return safeParse(
|
|
139
|
+
jsonString,
|
|
140
|
+
(x) => DataSourceDetailResponse$inboundSchema.parse(JSON.parse(x)),
|
|
141
|
+
`Failed to parse 'DataSourceDetailResponse' from JSON`,
|
|
142
|
+
);
|
|
143
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
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
|
+
* Metadata about a data source, not including the text.
|
|
13
|
+
*/
|
|
14
|
+
export type DataSourceMetadataResponse = {
|
|
15
|
+
/**
|
|
16
|
+
* The data source name. Must be unique within suborg.
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* The description of the data source.
|
|
21
|
+
*/
|
|
22
|
+
description?: string | null | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Searchable labels for the data source. Can be included in agent.prompt_tool_defaults for a given tool to give the agent access to data sources with those labels when calling that tool.
|
|
25
|
+
*/
|
|
26
|
+
labels?: Array<string> | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the content should be split into smaller chunks. This can improve agent performance when searching a large data source but risks some relevant information being left off search results if chunk_delimiter is not set up properly.
|
|
29
|
+
*/
|
|
30
|
+
chunk: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* String that should be treated as delimiter between intended chunks if chunk == True. This string will not be included in any chunks. If chunk == True and chunk_delimiter is None, the default chunking algorithm will be used. It is recommended that a delimiter be specified if chunking is enabled.
|
|
33
|
+
*/
|
|
34
|
+
chunkDelimiter?: string | null | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The comments for the most recent edit to the data source
|
|
37
|
+
*/
|
|
38
|
+
editComments?: string | null | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Timestamp of most recent update
|
|
41
|
+
*/
|
|
42
|
+
updatedAt: Date;
|
|
43
|
+
/**
|
|
44
|
+
* Email of the user who last updated the data source
|
|
45
|
+
*/
|
|
46
|
+
lastUpdatedBy: string | null;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const DataSourceMetadataResponse$inboundSchema: z.ZodType<
|
|
51
|
+
DataSourceMetadataResponse,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
name: z.string(),
|
|
56
|
+
description: z.nullable(z.string()).optional(),
|
|
57
|
+
labels: z.array(z.string()).optional(),
|
|
58
|
+
chunk: z.boolean(),
|
|
59
|
+
chunk_delimiter: z.nullable(z.string()).optional(),
|
|
60
|
+
edit_comments: z.nullable(z.string()).optional(),
|
|
61
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
62
|
+
last_updated_by: z.nullable(z.string()),
|
|
63
|
+
}).transform((v) => {
|
|
64
|
+
return remap$(v, {
|
|
65
|
+
"chunk_delimiter": "chunkDelimiter",
|
|
66
|
+
"edit_comments": "editComments",
|
|
67
|
+
"updated_at": "updatedAt",
|
|
68
|
+
"last_updated_by": "lastUpdatedBy",
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export type DataSourceMetadataResponse$Outbound = {
|
|
74
|
+
name: string;
|
|
75
|
+
description?: string | null | undefined;
|
|
76
|
+
labels?: Array<string> | undefined;
|
|
77
|
+
chunk: boolean;
|
|
78
|
+
chunk_delimiter?: string | null | undefined;
|
|
79
|
+
edit_comments?: string | null | undefined;
|
|
80
|
+
updated_at: string;
|
|
81
|
+
last_updated_by: string | null;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const DataSourceMetadataResponse$outboundSchema: z.ZodType<
|
|
86
|
+
DataSourceMetadataResponse$Outbound,
|
|
87
|
+
z.ZodTypeDef,
|
|
88
|
+
DataSourceMetadataResponse
|
|
89
|
+
> = z.object({
|
|
90
|
+
name: z.string(),
|
|
91
|
+
description: z.nullable(z.string()).optional(),
|
|
92
|
+
labels: z.array(z.string()).optional(),
|
|
93
|
+
chunk: z.boolean(),
|
|
94
|
+
chunkDelimiter: z.nullable(z.string()).optional(),
|
|
95
|
+
editComments: z.nullable(z.string()).optional(),
|
|
96
|
+
updatedAt: z.date().transform(v => v.toISOString()),
|
|
97
|
+
lastUpdatedBy: z.nullable(z.string()),
|
|
98
|
+
}).transform((v) => {
|
|
99
|
+
return remap$(v, {
|
|
100
|
+
chunkDelimiter: "chunk_delimiter",
|
|
101
|
+
editComments: "edit_comments",
|
|
102
|
+
updatedAt: "updated_at",
|
|
103
|
+
lastUpdatedBy: "last_updated_by",
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @internal
|
|
109
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
110
|
+
*/
|
|
111
|
+
export namespace DataSourceMetadataResponse$ {
|
|
112
|
+
/** @deprecated use `DataSourceMetadataResponse$inboundSchema` instead. */
|
|
113
|
+
export const inboundSchema = DataSourceMetadataResponse$inboundSchema;
|
|
114
|
+
/** @deprecated use `DataSourceMetadataResponse$outboundSchema` instead. */
|
|
115
|
+
export const outboundSchema = DataSourceMetadataResponse$outboundSchema;
|
|
116
|
+
/** @deprecated use `DataSourceMetadataResponse$Outbound` instead. */
|
|
117
|
+
export type Outbound = DataSourceMetadataResponse$Outbound;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function dataSourceMetadataResponseToJSON(
|
|
121
|
+
dataSourceMetadataResponse: DataSourceMetadataResponse,
|
|
122
|
+
): string {
|
|
123
|
+
return JSON.stringify(
|
|
124
|
+
DataSourceMetadataResponse$outboundSchema.parse(dataSourceMetadataResponse),
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function dataSourceMetadataResponseFromJSON(
|
|
129
|
+
jsonString: string,
|
|
130
|
+
): SafeParseResult<DataSourceMetadataResponse, SDKValidationError> {
|
|
131
|
+
return safeParse(
|
|
132
|
+
jsonString,
|
|
133
|
+
(x) => DataSourceMetadataResponse$inboundSchema.parse(JSON.parse(x)),
|
|
134
|
+
`Failed to parse 'DataSourceMetadataResponse' from JSON`,
|
|
135
|
+
);
|
|
136
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const DataSourceProperties = {
|
|
9
|
+
Name: "name",
|
|
10
|
+
Description: "description",
|
|
11
|
+
Labels: "labels",
|
|
12
|
+
Chunk: "chunk",
|
|
13
|
+
ChunkDelimiter: "chunk_delimiter",
|
|
14
|
+
UpdatedAt: "updated_at",
|
|
15
|
+
LastUpdatedBy: "last_updated_by",
|
|
16
|
+
} as const;
|
|
17
|
+
export type DataSourceProperties = ClosedEnum<typeof DataSourceProperties>;
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const DataSourceProperties$inboundSchema: z.ZodNativeEnum<
|
|
21
|
+
typeof DataSourceProperties
|
|
22
|
+
> = z.nativeEnum(DataSourceProperties);
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const DataSourceProperties$outboundSchema: z.ZodNativeEnum<
|
|
26
|
+
typeof DataSourceProperties
|
|
27
|
+
> = DataSourceProperties$inboundSchema;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
32
|
+
*/
|
|
33
|
+
export namespace DataSourceProperties$ {
|
|
34
|
+
/** @deprecated use `DataSourceProperties$inboundSchema` instead. */
|
|
35
|
+
export const inboundSchema = DataSourceProperties$inboundSchema;
|
|
36
|
+
/** @deprecated use `DataSourceProperties$outboundSchema` instead. */
|
|
37
|
+
export const outboundSchema = DataSourceProperties$outboundSchema;
|
|
38
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
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
|
+
export type DataSourceUpdateRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* The data source name. Must be unique within suborg.
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* The description of the data source.
|
|
18
|
+
*/
|
|
19
|
+
description?: string | null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Searchable labels for the data source. Can be included in agent.prompt_tool_defaults for a given tool to give the agent access to data sources with those labels when calling that tool.
|
|
22
|
+
*/
|
|
23
|
+
labels?: Array<string> | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the content should be split into smaller chunks. This can improve agent performance when searching a large data source but risks some relevant information being left off search results if chunk_delimiter is not set up properly.
|
|
26
|
+
*/
|
|
27
|
+
chunk: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* String that should be treated as delimiter between intended chunks if chunk == True. This string will not be included in any chunks. If chunk == True and chunk_delimiter is None, the default chunking algorithm will be used. It is recommended that a delimiter be specified if chunking is enabled.
|
|
30
|
+
*/
|
|
31
|
+
chunkDelimiter?: string | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The comments for the most recent edit to the data source
|
|
34
|
+
*/
|
|
35
|
+
editComments?: string | null | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Information that the data source will provide to the agent accessing it.
|
|
38
|
+
*/
|
|
39
|
+
text: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const DataSourceUpdateRequest$inboundSchema: z.ZodType<
|
|
44
|
+
DataSourceUpdateRequest,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
unknown
|
|
47
|
+
> = z.object({
|
|
48
|
+
name: z.string(),
|
|
49
|
+
description: z.nullable(z.string()).optional(),
|
|
50
|
+
labels: z.array(z.string()).optional(),
|
|
51
|
+
chunk: z.boolean(),
|
|
52
|
+
chunk_delimiter: z.nullable(z.string()).optional(),
|
|
53
|
+
edit_comments: z.nullable(z.string()).optional(),
|
|
54
|
+
text: z.string(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
"chunk_delimiter": "chunkDelimiter",
|
|
58
|
+
"edit_comments": "editComments",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export type DataSourceUpdateRequest$Outbound = {
|
|
64
|
+
name: string;
|
|
65
|
+
description?: string | null | undefined;
|
|
66
|
+
labels?: Array<string> | undefined;
|
|
67
|
+
chunk: boolean;
|
|
68
|
+
chunk_delimiter?: string | null | undefined;
|
|
69
|
+
edit_comments?: string | null | undefined;
|
|
70
|
+
text: string;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const DataSourceUpdateRequest$outboundSchema: z.ZodType<
|
|
75
|
+
DataSourceUpdateRequest$Outbound,
|
|
76
|
+
z.ZodTypeDef,
|
|
77
|
+
DataSourceUpdateRequest
|
|
78
|
+
> = z.object({
|
|
79
|
+
name: z.string(),
|
|
80
|
+
description: z.nullable(z.string()).optional(),
|
|
81
|
+
labels: z.array(z.string()).optional(),
|
|
82
|
+
chunk: z.boolean(),
|
|
83
|
+
chunkDelimiter: z.nullable(z.string()).optional(),
|
|
84
|
+
editComments: z.nullable(z.string()).optional(),
|
|
85
|
+
text: z.string(),
|
|
86
|
+
}).transform((v) => {
|
|
87
|
+
return remap$(v, {
|
|
88
|
+
chunkDelimiter: "chunk_delimiter",
|
|
89
|
+
editComments: "edit_comments",
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
96
|
+
*/
|
|
97
|
+
export namespace DataSourceUpdateRequest$ {
|
|
98
|
+
/** @deprecated use `DataSourceUpdateRequest$inboundSchema` instead. */
|
|
99
|
+
export const inboundSchema = DataSourceUpdateRequest$inboundSchema;
|
|
100
|
+
/** @deprecated use `DataSourceUpdateRequest$outboundSchema` instead. */
|
|
101
|
+
export const outboundSchema = DataSourceUpdateRequest$outboundSchema;
|
|
102
|
+
/** @deprecated use `DataSourceUpdateRequest$Outbound` instead. */
|
|
103
|
+
export type Outbound = DataSourceUpdateRequest$Outbound;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function dataSourceUpdateRequestToJSON(
|
|
107
|
+
dataSourceUpdateRequest: DataSourceUpdateRequest,
|
|
108
|
+
): string {
|
|
109
|
+
return JSON.stringify(
|
|
110
|
+
DataSourceUpdateRequest$outboundSchema.parse(dataSourceUpdateRequest),
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function dataSourceUpdateRequestFromJSON(
|
|
115
|
+
jsonString: string,
|
|
116
|
+
): SafeParseResult<DataSourceUpdateRequest, SDKValidationError> {
|
|
117
|
+
return safeParse(
|
|
118
|
+
jsonString,
|
|
119
|
+
(x) => DataSourceUpdateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
120
|
+
`Failed to parse 'DataSourceUpdateRequest' from JSON`,
|
|
121
|
+
);
|
|
122
|
+
}
|
|
@@ -27,6 +27,11 @@ export * from "./custommessageresponse.js";
|
|
|
27
27
|
export * from "./custommessagerule.js";
|
|
28
28
|
export * from "./custommessageupdaterequest.js";
|
|
29
29
|
export * from "./dashboard.js";
|
|
30
|
+
export * from "./datasourcecreaterequest.js";
|
|
31
|
+
export * from "./datasourcedetailresponse.js";
|
|
32
|
+
export * from "./datasourcemetadataresponse.js";
|
|
33
|
+
export * from "./datasourceproperties.js";
|
|
34
|
+
export * from "./datasourceupdaterequest.js";
|
|
30
35
|
export * from "./dayofweek.js";
|
|
31
36
|
export * from "./event.js";
|
|
32
37
|
export * from "./eventproperties.js";
|
|
@@ -37,6 +42,7 @@ export * from "./listresponsechannel.js";
|
|
|
37
42
|
export * from "./listresponsechanneltargetresponse.js";
|
|
38
43
|
export * from "./listresponseconversation.js";
|
|
39
44
|
export * from "./listresponsecustommessageresponse.js";
|
|
45
|
+
export * from "./listresponsedatasourcemetadataresponse.js";
|
|
40
46
|
export * from "./listresponseevent.js";
|
|
41
47
|
export * from "./listresponsepromptresponse.js";
|
|
42
48
|
export * from "./listresponseservice.js";
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
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
|
+
DataSourceMetadataResponse,
|
|
12
|
+
DataSourceMetadataResponse$inboundSchema,
|
|
13
|
+
DataSourceMetadataResponse$Outbound,
|
|
14
|
+
DataSourceMetadataResponse$outboundSchema,
|
|
15
|
+
} from "./datasourcemetadataresponse.js";
|
|
16
|
+
|
|
17
|
+
export type ListResponseDataSourceMetadataResponse = {
|
|
18
|
+
items: Array<DataSourceMetadataResponse>;
|
|
19
|
+
page: number;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
totalPages?: number | null | undefined;
|
|
22
|
+
totalCount?: number | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ListResponseDataSourceMetadataResponse$inboundSchema: z.ZodType<
|
|
27
|
+
ListResponseDataSourceMetadataResponse,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
items: z.array(DataSourceMetadataResponse$inboundSchema),
|
|
32
|
+
page: z.number().int(),
|
|
33
|
+
page_size: z.number().int(),
|
|
34
|
+
total_pages: z.nullable(z.number().int()).optional(),
|
|
35
|
+
total_count: z.nullable(z.number().int()).optional(),
|
|
36
|
+
}).transform((v) => {
|
|
37
|
+
return remap$(v, {
|
|
38
|
+
"page_size": "pageSize",
|
|
39
|
+
"total_pages": "totalPages",
|
|
40
|
+
"total_count": "totalCount",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type ListResponseDataSourceMetadataResponse$Outbound = {
|
|
46
|
+
items: Array<DataSourceMetadataResponse$Outbound>;
|
|
47
|
+
page: number;
|
|
48
|
+
page_size: number;
|
|
49
|
+
total_pages?: number | null | undefined;
|
|
50
|
+
total_count?: number | null | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const ListResponseDataSourceMetadataResponse$outboundSchema: z.ZodType<
|
|
55
|
+
ListResponseDataSourceMetadataResponse$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
ListResponseDataSourceMetadataResponse
|
|
58
|
+
> = z.object({
|
|
59
|
+
items: z.array(DataSourceMetadataResponse$outboundSchema),
|
|
60
|
+
page: z.number().int(),
|
|
61
|
+
pageSize: z.number().int(),
|
|
62
|
+
totalPages: z.nullable(z.number().int()).optional(),
|
|
63
|
+
totalCount: z.nullable(z.number().int()).optional(),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
pageSize: "page_size",
|
|
67
|
+
totalPages: "total_pages",
|
|
68
|
+
totalCount: "total_count",
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
|
+
*/
|
|
76
|
+
export namespace ListResponseDataSourceMetadataResponse$ {
|
|
77
|
+
/** @deprecated use `ListResponseDataSourceMetadataResponse$inboundSchema` instead. */
|
|
78
|
+
export const inboundSchema =
|
|
79
|
+
ListResponseDataSourceMetadataResponse$inboundSchema;
|
|
80
|
+
/** @deprecated use `ListResponseDataSourceMetadataResponse$outboundSchema` instead. */
|
|
81
|
+
export const outboundSchema =
|
|
82
|
+
ListResponseDataSourceMetadataResponse$outboundSchema;
|
|
83
|
+
/** @deprecated use `ListResponseDataSourceMetadataResponse$Outbound` instead. */
|
|
84
|
+
export type Outbound = ListResponseDataSourceMetadataResponse$Outbound;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function listResponseDataSourceMetadataResponseToJSON(
|
|
88
|
+
listResponseDataSourceMetadataResponse:
|
|
89
|
+
ListResponseDataSourceMetadataResponse,
|
|
90
|
+
): string {
|
|
91
|
+
return JSON.stringify(
|
|
92
|
+
ListResponseDataSourceMetadataResponse$outboundSchema.parse(
|
|
93
|
+
listResponseDataSourceMetadataResponse,
|
|
94
|
+
),
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function listResponseDataSourceMetadataResponseFromJSON(
|
|
99
|
+
jsonString: string,
|
|
100
|
+
): SafeParseResult<ListResponseDataSourceMetadataResponse, SDKValidationError> {
|
|
101
|
+
return safeParse(
|
|
102
|
+
jsonString,
|
|
103
|
+
(x) =>
|
|
104
|
+
ListResponseDataSourceMetadataResponse$inboundSchema.parse(JSON.parse(x)),
|
|
105
|
+
`Failed to parse 'ListResponseDataSourceMetadataResponse' from JSON`,
|
|
106
|
+
);
|
|
107
|
+
}
|