syllable-sdk 0.1.0-alpha.4 → 0.1.0-alpha.6
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 -7
- package/docs/sdks/prompts/README.md +78 -0
- package/docs/sdks/services/README.md +245 -0
- package/docs/sdks/sessions/README.md +1 -1
- package/docs/sdks/syllablesdk/README.md +3 -2
- package/docs/sdks/tools/README.md +163 -1
- package/docs/sdks/transcript/README.md +2 -0
- package/funcs/promptsPromptsHistory.d.ts +17 -0
- package/funcs/promptsPromptsHistory.d.ts.map +1 -0
- package/funcs/promptsPromptsHistory.js +106 -0
- package/funcs/promptsPromptsHistory.js.map +1 -0
- package/funcs/servicesCreate.d.ts +13 -0
- package/funcs/servicesCreate.d.ts.map +1 -0
- package/funcs/servicesCreate.js +96 -0
- package/funcs/servicesCreate.js.map +1 -0
- package/funcs/servicesList.d.ts +17 -0
- package/funcs/servicesList.d.ts.map +1 -0
- package/funcs/servicesList.js +111 -0
- package/funcs/servicesList.js.map +1 -0
- package/funcs/servicesUpdate.d.ts +13 -0
- package/funcs/servicesUpdate.d.ts.map +1 -0
- package/funcs/servicesUpdate.js +96 -0
- package/funcs/servicesUpdate.js.map +1 -0
- package/funcs/sessionsSessionRecordingStream.d.ts +1 -1
- package/funcs/sessionsSessionRecordingStream.d.ts.map +1 -1
- package/funcs/sessionsSessionRecordingStream.js +2 -2
- package/funcs/sessionsSessionRecordingStream.js.map +1 -1
- package/funcs/toolsCreate.d.ts +16 -0
- package/funcs/toolsCreate.d.ts.map +1 -0
- package/funcs/toolsCreate.js +99 -0
- package/funcs/toolsCreate.js.map +1 -0
- package/funcs/toolsList.d.ts +1 -1
- package/funcs/toolsList.js +1 -1
- package/funcs/toolsUpdate.d.ts +16 -0
- package/funcs/toolsUpdate.d.ts.map +1 -0
- package/funcs/toolsUpdate.js +99 -0
- package/funcs/toolsUpdate.js.map +1 -0
- package/lib/config.d.ts +4 -4
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +4 -4
- package/lib/config.js.map +1 -1
- package/models/components/index.d.ts +8 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -0
- package/models/components/index.js.map +1 -1
- package/models/components/listresponseservice.d.ts +38 -0
- package/models/components/listresponseservice.d.ts.map +1 -0
- package/models/components/listresponseservice.js +81 -0
- package/models/components/listresponseservice.js.map +1 -0
- package/models/components/prompt.d.ts +10 -0
- package/models/components/prompt.d.ts.map +1 -1
- package/models/components/prompt.js +8 -0
- package/models/components/prompt.js.map +1 -1
- package/models/components/prompthistory.d.ts +41 -0
- package/models/components/prompthistory.d.ts.map +1 -0
- package/models/components/prompthistory.js +88 -0
- package/models/components/prompthistory.js.map +1 -0
- package/models/components/promptproperties.d.ts +3 -0
- package/models/components/promptproperties.d.ts.map +1 -1
- package/models/components/promptproperties.js +1 -0
- package/models/components/promptproperties.js.map +1 -1
- package/models/components/service.d.ts +47 -0
- package/models/components/service.d.ts.map +1 -0
- package/models/components/service.js +65 -0
- package/models/components/service.js.map +1 -0
- package/models/components/servicecreate.d.ts +37 -0
- package/models/components/servicecreate.d.ts.map +1 -0
- package/models/components/servicecreate.js +61 -0
- package/models/components/servicecreate.js.map +1 -0
- package/models/components/serviceproperties.d.ts +28 -0
- package/models/components/serviceproperties.d.ts.map +1 -0
- package/models/components/serviceproperties.js +50 -0
- package/models/components/serviceproperties.js.map +1 -0
- package/models/components/serviceupdate.d.ts +42 -0
- package/models/components/serviceupdate.d.ts.map +1 -0
- package/models/components/serviceupdate.js +63 -0
- package/models/components/serviceupdate.js.map +1 -0
- package/models/components/sessionproperties.d.ts +3 -0
- package/models/components/sessionproperties.d.ts.map +1 -1
- package/models/components/sessionproperties.js +1 -0
- package/models/components/sessionproperties.js.map +1 -1
- package/models/components/toolcreate.d.ts +66 -0
- package/models/components/toolcreate.d.ts.map +1 -0
- package/models/components/toolcreate.js +95 -0
- package/models/components/toolcreate.js.map +1 -0
- package/models/components/toolupdate.d.ts +71 -0
- package/models/components/toolupdate.d.ts.map +1 -0
- package/models/components/toolupdate.js +97 -0
- package/models/components/toolupdate.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/promptshistory.d.ts +29 -0
- package/models/operations/promptshistory.d.ts.map +1 -0
- package/models/operations/promptshistory.js +68 -0
- package/models/operations/promptshistory.js.map +1 -0
- package/models/operations/promptslist.d.ts +3 -0
- package/models/operations/promptslist.d.ts.map +1 -1
- package/models/operations/promptslist.js +1 -0
- package/models/operations/promptslist.js.map +1 -1
- package/models/operations/servicelist.d.ts +97 -0
- package/models/operations/servicelist.d.ts.map +1 -0
- package/models/operations/servicelist.js +137 -0
- package/models/operations/servicelist.js.map +1 -0
- package/models/operations/sessionslist.d.ts +3 -0
- package/models/operations/sessionslist.d.ts.map +1 -1
- package/models/operations/sessionslist.js +1 -0
- package/models/operations/sessionslist.js.map +1 -1
- package/package.json +1 -1
- package/sdk/prompts.d.ts +7 -0
- package/sdk/prompts.d.ts.map +1 -1
- package/sdk/prompts.js +10 -0
- package/sdk/prompts.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +5 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/services.d.ts +21 -0
- package/sdk/services.d.ts.map +1 -0
- package/sdk/services.js +36 -0
- package/sdk/services.js.map +1 -0
- package/sdk/sessions.d.ts +1 -1
- package/sdk/sessions.d.ts.map +1 -1
- package/sdk/tools.d.ts +15 -1
- package/sdk/tools.d.ts.map +1 -1
- package/sdk/tools.js +21 -1
- package/sdk/tools.js.map +1 -1
- package/src/funcs/promptsPromptsHistory.ts +139 -0
- package/src/funcs/servicesCreate.ts +128 -0
- package/src/funcs/servicesList.ts +144 -0
- package/src/funcs/servicesUpdate.ts +128 -0
- package/src/funcs/sessionsSessionRecordingStream.ts +4 -4
- package/src/funcs/toolsCreate.ts +131 -0
- package/src/funcs/toolsList.ts +1 -1
- package/src/funcs/toolsUpdate.ts +131 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/index.ts +8 -0
- package/src/models/components/listresponseservice.ts +101 -0
- package/src/models/components/prompt.ts +18 -0
- package/src/models/components/prompthistory.ts +103 -0
- package/src/models/components/promptproperties.ts +1 -0
- package/src/models/components/service.ts +83 -0
- package/src/models/components/servicecreate.ts +72 -0
- package/src/models/components/serviceproperties.ts +33 -0
- package/src/models/components/serviceupdate.ts +79 -0
- package/src/models/components/sessionproperties.ts +1 -0
- package/src/models/components/toolcreate.ts +141 -0
- package/src/models/components/toolupdate.ts +148 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/promptshistory.ts +75 -0
- package/src/models/operations/promptslist.ts +1 -0
- package/src/models/operations/servicelist.ts +184 -0
- package/src/models/operations/sessionslist.ts +1 -0
- package/src/sdk/prompts.ts +18 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/services.ts +58 -0
- package/src/sdk/sessions.ts +1 -1
- package/src/sdk/tools.ts +37 -1
package/src/funcs/toolsList.ts
CHANGED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SyllableSDKCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as components from "../models/components/index.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { Result } from "../types/fp.js";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Update Tool
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Update an existing tool
|
|
30
|
+
*/
|
|
31
|
+
export async function toolsUpdate(
|
|
32
|
+
client: SyllableSDKCore,
|
|
33
|
+
request: components.ToolUpdate,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): Promise<
|
|
36
|
+
Result<
|
|
37
|
+
components.Tool,
|
|
38
|
+
| errors.HTTPValidationError
|
|
39
|
+
| SDKError
|
|
40
|
+
| SDKValidationError
|
|
41
|
+
| UnexpectedClientError
|
|
42
|
+
| InvalidRequestError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
>
|
|
47
|
+
> {
|
|
48
|
+
const parsed = safeParse(
|
|
49
|
+
request,
|
|
50
|
+
(value) => components.ToolUpdate$outboundSchema.parse(value),
|
|
51
|
+
"Input validation failed",
|
|
52
|
+
);
|
|
53
|
+
if (!parsed.ok) {
|
|
54
|
+
return parsed;
|
|
55
|
+
}
|
|
56
|
+
const payload = parsed.value;
|
|
57
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
58
|
+
|
|
59
|
+
const path = pathToFunc("/api/v1/tools/")();
|
|
60
|
+
|
|
61
|
+
const headers = new Headers({
|
|
62
|
+
"Content-Type": "application/json",
|
|
63
|
+
Accept: "application/json",
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
67
|
+
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
68
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
69
|
+
|
|
70
|
+
const context = {
|
|
71
|
+
operationID: "tool_update",
|
|
72
|
+
oAuth2Scopes: [],
|
|
73
|
+
|
|
74
|
+
resolvedSecurity: requestSecurity,
|
|
75
|
+
|
|
76
|
+
securitySource: client._options.apiKeyHeader,
|
|
77
|
+
retryConfig: options?.retries
|
|
78
|
+
|| client._options.retryConfig
|
|
79
|
+
|| { strategy: "none" },
|
|
80
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const requestRes = client._createRequest(context, {
|
|
84
|
+
security: requestSecurity,
|
|
85
|
+
method: "PUT",
|
|
86
|
+
path: path,
|
|
87
|
+
headers: headers,
|
|
88
|
+
body: body,
|
|
89
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
90
|
+
}, options);
|
|
91
|
+
if (!requestRes.ok) {
|
|
92
|
+
return requestRes;
|
|
93
|
+
}
|
|
94
|
+
const req = requestRes.value;
|
|
95
|
+
|
|
96
|
+
const doResult = await client._do(req, {
|
|
97
|
+
context,
|
|
98
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
99
|
+
retryConfig: context.retryConfig,
|
|
100
|
+
retryCodes: context.retryCodes,
|
|
101
|
+
});
|
|
102
|
+
if (!doResult.ok) {
|
|
103
|
+
return doResult;
|
|
104
|
+
}
|
|
105
|
+
const response = doResult.value;
|
|
106
|
+
|
|
107
|
+
const responseFields = {
|
|
108
|
+
HttpMeta: { Response: response, Request: req },
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const [result] = await M.match<
|
|
112
|
+
components.Tool,
|
|
113
|
+
| errors.HTTPValidationError
|
|
114
|
+
| SDKError
|
|
115
|
+
| SDKValidationError
|
|
116
|
+
| UnexpectedClientError
|
|
117
|
+
| InvalidRequestError
|
|
118
|
+
| RequestAbortedError
|
|
119
|
+
| RequestTimeoutError
|
|
120
|
+
| ConnectionError
|
|
121
|
+
>(
|
|
122
|
+
M.json(200, components.Tool$inboundSchema),
|
|
123
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
124
|
+
M.fail(["4XX", "5XX"]),
|
|
125
|
+
)(response, { extraFields: responseFields });
|
|
126
|
+
if (!result.ok) {
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return result;
|
|
131
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -14,7 +14,7 @@ export const ServerList = [
|
|
|
14
14
|
/**
|
|
15
15
|
* staging server
|
|
16
16
|
*/
|
|
17
|
-
"
|
|
17
|
+
"http://localhost:8001",
|
|
18
18
|
/**
|
|
19
19
|
* staging / port-forwarding server
|
|
20
20
|
*/
|
|
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.2",
|
|
64
|
-
sdkVersion: "0.1.0-alpha.
|
|
65
|
-
genVersion: "2.
|
|
64
|
+
sdkVersion: "0.1.0-alpha.6",
|
|
65
|
+
genVersion: "2.461.2",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 0.1.0-alpha.
|
|
67
|
+
"speakeasy-sdk/typescript 0.1.0-alpha.6 2.461.2 0.0.2 syllable-sdk",
|
|
68
68
|
} as const;
|
|
@@ -30,14 +30,20 @@ export * from "./listresponseconversation.js";
|
|
|
30
30
|
export * from "./listresponsecustommessage.js";
|
|
31
31
|
export * from "./listresponseevent.js";
|
|
32
32
|
export * from "./listresponseprompt.js";
|
|
33
|
+
export * from "./listresponseservice.js";
|
|
33
34
|
export * from "./listresponsesession.js";
|
|
34
35
|
export * from "./listresponsesessionlabel.js";
|
|
35
36
|
export * from "./listresponsetool.js";
|
|
36
37
|
export * from "./llmconfig.js";
|
|
37
38
|
export * from "./prompt.js";
|
|
38
39
|
export * from "./promptcreate.js";
|
|
40
|
+
export * from "./prompthistory.js";
|
|
39
41
|
export * from "./promptproperties.js";
|
|
40
42
|
export * from "./security.js";
|
|
43
|
+
export * from "./service.js";
|
|
44
|
+
export * from "./servicecreate.js";
|
|
45
|
+
export * from "./serviceproperties.js";
|
|
46
|
+
export * from "./serviceupdate.js";
|
|
41
47
|
export * from "./session.js";
|
|
42
48
|
export * from "./sessionaction.js";
|
|
43
49
|
export * from "./sessionlabel.js";
|
|
@@ -50,6 +56,8 @@ export * from "./sessiontranscriptionresponse.js";
|
|
|
50
56
|
export * from "./testmessage.js";
|
|
51
57
|
export * from "./testmessageresponse.js";
|
|
52
58
|
export * from "./tool.js";
|
|
59
|
+
export * from "./toolcreate.js";
|
|
53
60
|
export * from "./tooldetailresponse.js";
|
|
54
61
|
export * from "./toolproperties.js";
|
|
62
|
+
export * from "./toolupdate.js";
|
|
55
63
|
export * from "./validationerror.js";
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
Service,
|
|
12
|
+
Service$inboundSchema,
|
|
13
|
+
Service$Outbound,
|
|
14
|
+
Service$outboundSchema,
|
|
15
|
+
} from "./service.js";
|
|
16
|
+
|
|
17
|
+
export type ListResponseService = {
|
|
18
|
+
items: Array<Service>;
|
|
19
|
+
page: number;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
totalPages?: number | null | undefined;
|
|
22
|
+
totalCount?: number | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ListResponseService$inboundSchema: z.ZodType<
|
|
27
|
+
ListResponseService,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
items: z.array(Service$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 ListResponseService$Outbound = {
|
|
46
|
+
items: Array<Service$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 ListResponseService$outboundSchema: z.ZodType<
|
|
55
|
+
ListResponseService$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
ListResponseService
|
|
58
|
+
> = z.object({
|
|
59
|
+
items: z.array(Service$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 ListResponseService$ {
|
|
77
|
+
/** @deprecated use `ListResponseService$inboundSchema` instead. */
|
|
78
|
+
export const inboundSchema = ListResponseService$inboundSchema;
|
|
79
|
+
/** @deprecated use `ListResponseService$outboundSchema` instead. */
|
|
80
|
+
export const outboundSchema = ListResponseService$outboundSchema;
|
|
81
|
+
/** @deprecated use `ListResponseService$Outbound` instead. */
|
|
82
|
+
export type Outbound = ListResponseService$Outbound;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function listResponseServiceToJSON(
|
|
86
|
+
listResponseService: ListResponseService,
|
|
87
|
+
): string {
|
|
88
|
+
return JSON.stringify(
|
|
89
|
+
ListResponseService$outboundSchema.parse(listResponseService),
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function listResponseServiceFromJSON(
|
|
94
|
+
jsonString: string,
|
|
95
|
+
): SafeParseResult<ListResponseService, SDKValidationError> {
|
|
96
|
+
return safeParse(
|
|
97
|
+
jsonString,
|
|
98
|
+
(x) => ListResponseService$inboundSchema.parse(JSON.parse(x)),
|
|
99
|
+
`Failed to parse 'ListResponseService' from JSON`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -43,6 +43,14 @@ export type Prompt = {
|
|
|
43
43
|
* The last updated date of the prompt
|
|
44
44
|
*/
|
|
45
45
|
lastUpdated: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* The last updated user who last updated of the prompt
|
|
48
|
+
*/
|
|
49
|
+
lastUpdatedBy?: string | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* The comments for the last edit
|
|
52
|
+
*/
|
|
53
|
+
editComments?: string | null | undefined;
|
|
46
54
|
};
|
|
47
55
|
|
|
48
56
|
/** @internal */
|
|
@@ -55,10 +63,14 @@ export const Prompt$inboundSchema: z.ZodType<Prompt, z.ZodTypeDef, unknown> = z
|
|
|
55
63
|
llm_config: LlmConfig$inboundSchema,
|
|
56
64
|
id: z.number().int(),
|
|
57
65
|
last_updated: z.nullable(z.string()),
|
|
66
|
+
last_updated_by: z.nullable(z.string()).optional(),
|
|
67
|
+
edit_comments: z.nullable(z.string()).optional(),
|
|
58
68
|
}).transform((v) => {
|
|
59
69
|
return remap$(v, {
|
|
60
70
|
"llm_config": "llmConfig",
|
|
61
71
|
"last_updated": "lastUpdated",
|
|
72
|
+
"last_updated_by": "lastUpdatedBy",
|
|
73
|
+
"edit_comments": "editComments",
|
|
62
74
|
});
|
|
63
75
|
});
|
|
64
76
|
|
|
@@ -71,6 +83,8 @@ export type Prompt$Outbound = {
|
|
|
71
83
|
llm_config: LlmConfig$Outbound;
|
|
72
84
|
id: number;
|
|
73
85
|
last_updated: string | null;
|
|
86
|
+
last_updated_by?: string | null | undefined;
|
|
87
|
+
edit_comments?: string | null | undefined;
|
|
74
88
|
};
|
|
75
89
|
|
|
76
90
|
/** @internal */
|
|
@@ -86,10 +100,14 @@ export const Prompt$outboundSchema: z.ZodType<
|
|
|
86
100
|
llmConfig: LlmConfig$outboundSchema,
|
|
87
101
|
id: z.number().int(),
|
|
88
102
|
lastUpdated: z.nullable(z.string()),
|
|
103
|
+
lastUpdatedBy: z.nullable(z.string()).optional(),
|
|
104
|
+
editComments: z.nullable(z.string()).optional(),
|
|
89
105
|
}).transform((v) => {
|
|
90
106
|
return remap$(v, {
|
|
91
107
|
llmConfig: "llm_config",
|
|
92
108
|
lastUpdated: "last_updated",
|
|
109
|
+
lastUpdatedBy: "last_updated_by",
|
|
110
|
+
editComments: "edit_comments",
|
|
93
111
|
});
|
|
94
112
|
});
|
|
95
113
|
|
|
@@ -0,0 +1,103 @@
|
|
|
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 PromptHistory = {
|
|
12
|
+
timestamp: Date;
|
|
13
|
+
promptId?: string | null | undefined;
|
|
14
|
+
promptText?: string | null | undefined;
|
|
15
|
+
promptName?: string | null | undefined;
|
|
16
|
+
llmConfig?: string | null | undefined;
|
|
17
|
+
comments?: string | null | undefined;
|
|
18
|
+
userEmail?: string | null | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const PromptHistory$inboundSchema: z.ZodType<
|
|
23
|
+
PromptHistory,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
timestamp: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
28
|
+
prompt_id: z.nullable(z.string()).optional(),
|
|
29
|
+
prompt_text: z.nullable(z.string()).optional(),
|
|
30
|
+
prompt_name: z.nullable(z.string()).optional(),
|
|
31
|
+
llm_config: z.nullable(z.string()).optional(),
|
|
32
|
+
comments: z.nullable(z.string()).optional(),
|
|
33
|
+
user_email: z.nullable(z.string()).optional(),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"prompt_id": "promptId",
|
|
37
|
+
"prompt_text": "promptText",
|
|
38
|
+
"prompt_name": "promptName",
|
|
39
|
+
"llm_config": "llmConfig",
|
|
40
|
+
"user_email": "userEmail",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type PromptHistory$Outbound = {
|
|
46
|
+
timestamp: string;
|
|
47
|
+
prompt_id?: string | null | undefined;
|
|
48
|
+
prompt_text?: string | null | undefined;
|
|
49
|
+
prompt_name?: string | null | undefined;
|
|
50
|
+
llm_config?: string | null | undefined;
|
|
51
|
+
comments?: string | null | undefined;
|
|
52
|
+
user_email?: string | null | undefined;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const PromptHistory$outboundSchema: z.ZodType<
|
|
57
|
+
PromptHistory$Outbound,
|
|
58
|
+
z.ZodTypeDef,
|
|
59
|
+
PromptHistory
|
|
60
|
+
> = z.object({
|
|
61
|
+
timestamp: z.date().transform(v => v.toISOString()),
|
|
62
|
+
promptId: z.nullable(z.string()).optional(),
|
|
63
|
+
promptText: z.nullable(z.string()).optional(),
|
|
64
|
+
promptName: z.nullable(z.string()).optional(),
|
|
65
|
+
llmConfig: z.nullable(z.string()).optional(),
|
|
66
|
+
comments: z.nullable(z.string()).optional(),
|
|
67
|
+
userEmail: z.nullable(z.string()).optional(),
|
|
68
|
+
}).transform((v) => {
|
|
69
|
+
return remap$(v, {
|
|
70
|
+
promptId: "prompt_id",
|
|
71
|
+
promptText: "prompt_text",
|
|
72
|
+
promptName: "prompt_name",
|
|
73
|
+
llmConfig: "llm_config",
|
|
74
|
+
userEmail: "user_email",
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
81
|
+
*/
|
|
82
|
+
export namespace PromptHistory$ {
|
|
83
|
+
/** @deprecated use `PromptHistory$inboundSchema` instead. */
|
|
84
|
+
export const inboundSchema = PromptHistory$inboundSchema;
|
|
85
|
+
/** @deprecated use `PromptHistory$outboundSchema` instead. */
|
|
86
|
+
export const outboundSchema = PromptHistory$outboundSchema;
|
|
87
|
+
/** @deprecated use `PromptHistory$Outbound` instead. */
|
|
88
|
+
export type Outbound = PromptHistory$Outbound;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function promptHistoryToJSON(promptHistory: PromptHistory): string {
|
|
92
|
+
return JSON.stringify(PromptHistory$outboundSchema.parse(promptHistory));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function promptHistoryFromJSON(
|
|
96
|
+
jsonString: string,
|
|
97
|
+
): SafeParseResult<PromptHistory, SDKValidationError> {
|
|
98
|
+
return safeParse(
|
|
99
|
+
jsonString,
|
|
100
|
+
(x) => PromptHistory$inboundSchema.parse(JSON.parse(x)),
|
|
101
|
+
`Failed to parse 'PromptHistory' from JSON`,
|
|
102
|
+
);
|
|
103
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
export type Service = {
|
|
11
|
+
/**
|
|
12
|
+
* The name of the service
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* The description of the service
|
|
17
|
+
*/
|
|
18
|
+
description: string;
|
|
19
|
+
/**
|
|
20
|
+
* The ID of the service
|
|
21
|
+
*/
|
|
22
|
+
id: number;
|
|
23
|
+
/**
|
|
24
|
+
* The tools of the service
|
|
25
|
+
*/
|
|
26
|
+
tools: Array<string>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const Service$inboundSchema: z.ZodType<Service, z.ZodTypeDef, unknown> =
|
|
31
|
+
z.object({
|
|
32
|
+
name: z.string(),
|
|
33
|
+
description: z.string(),
|
|
34
|
+
id: z.number().int(),
|
|
35
|
+
tools: z.array(z.string()),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type Service$Outbound = {
|
|
40
|
+
name: string;
|
|
41
|
+
description: string;
|
|
42
|
+
id: number;
|
|
43
|
+
tools: Array<string>;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const Service$outboundSchema: z.ZodType<
|
|
48
|
+
Service$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
Service
|
|
51
|
+
> = z.object({
|
|
52
|
+
name: z.string(),
|
|
53
|
+
description: z.string(),
|
|
54
|
+
id: z.number().int(),
|
|
55
|
+
tools: z.array(z.string()),
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
61
|
+
*/
|
|
62
|
+
export namespace Service$ {
|
|
63
|
+
/** @deprecated use `Service$inboundSchema` instead. */
|
|
64
|
+
export const inboundSchema = Service$inboundSchema;
|
|
65
|
+
/** @deprecated use `Service$outboundSchema` instead. */
|
|
66
|
+
export const outboundSchema = Service$outboundSchema;
|
|
67
|
+
/** @deprecated use `Service$Outbound` instead. */
|
|
68
|
+
export type Outbound = Service$Outbound;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function serviceToJSON(service: Service): string {
|
|
72
|
+
return JSON.stringify(Service$outboundSchema.parse(service));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function serviceFromJSON(
|
|
76
|
+
jsonString: string,
|
|
77
|
+
): SafeParseResult<Service, SDKValidationError> {
|
|
78
|
+
return safeParse(
|
|
79
|
+
jsonString,
|
|
80
|
+
(x) => Service$inboundSchema.parse(JSON.parse(x)),
|
|
81
|
+
`Failed to parse 'Service' from JSON`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
export type ServiceCreate = {
|
|
11
|
+
/**
|
|
12
|
+
* The name of the service
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* The description of the service
|
|
17
|
+
*/
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const ServiceCreate$inboundSchema: z.ZodType<
|
|
23
|
+
ServiceCreate,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
name: z.string(),
|
|
28
|
+
description: z.string(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type ServiceCreate$Outbound = {
|
|
33
|
+
name: string;
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ServiceCreate$outboundSchema: z.ZodType<
|
|
39
|
+
ServiceCreate$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
ServiceCreate
|
|
42
|
+
> = z.object({
|
|
43
|
+
name: z.string(),
|
|
44
|
+
description: z.string(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
+
*/
|
|
51
|
+
export namespace ServiceCreate$ {
|
|
52
|
+
/** @deprecated use `ServiceCreate$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = ServiceCreate$inboundSchema;
|
|
54
|
+
/** @deprecated use `ServiceCreate$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = ServiceCreate$outboundSchema;
|
|
56
|
+
/** @deprecated use `ServiceCreate$Outbound` instead. */
|
|
57
|
+
export type Outbound = ServiceCreate$Outbound;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function serviceCreateToJSON(serviceCreate: ServiceCreate): string {
|
|
61
|
+
return JSON.stringify(ServiceCreate$outboundSchema.parse(serviceCreate));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function serviceCreateFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<ServiceCreate, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => ServiceCreate$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'ServiceCreate' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 ServiceProperties = {
|
|
9
|
+
Id: "id",
|
|
10
|
+
Name: "name",
|
|
11
|
+
} as const;
|
|
12
|
+
export type ServiceProperties = ClosedEnum<typeof ServiceProperties>;
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const ServiceProperties$inboundSchema: z.ZodNativeEnum<
|
|
16
|
+
typeof ServiceProperties
|
|
17
|
+
> = z.nativeEnum(ServiceProperties);
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const ServiceProperties$outboundSchema: z.ZodNativeEnum<
|
|
21
|
+
typeof ServiceProperties
|
|
22
|
+
> = ServiceProperties$inboundSchema;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
27
|
+
*/
|
|
28
|
+
export namespace ServiceProperties$ {
|
|
29
|
+
/** @deprecated use `ServiceProperties$inboundSchema` instead. */
|
|
30
|
+
export const inboundSchema = ServiceProperties$inboundSchema;
|
|
31
|
+
/** @deprecated use `ServiceProperties$outboundSchema` instead. */
|
|
32
|
+
export const outboundSchema = ServiceProperties$outboundSchema;
|
|
33
|
+
}
|