syllable-sdk 1.0.70 → 1.0.71-rc.2
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 -4
- package/bin/mcp-server.js +205 -109
- package/bin/mcp-server.js.map +13 -11
- package/funcs/promptsPromptsListActiveLabels.d.ts +16 -0
- package/funcs/promptsPromptsListActiveLabels.d.ts.map +1 -0
- package/funcs/promptsPromptsListActiveLabels.js +105 -0
- package/funcs/promptsPromptsListActiveLabels.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/promptsPromptsListActiveLabels.d.ts +3 -0
- package/mcp-server/tools/promptsPromptsListActiveLabels.d.ts.map +1 -0
- package/mcp-server/tools/promptsPromptsListActiveLabels.js +26 -0
- package/mcp-server/tools/promptsPromptsListActiveLabels.js.map +1 -0
- package/models/components/promptcreaterequest.d.ts +5 -0
- package/models/components/promptcreaterequest.d.ts.map +1 -1
- package/models/components/promptcreaterequest.js +2 -0
- package/models/components/promptcreaterequest.js.map +1 -1
- package/models/components/prompthistoryresponse.d.ts +5 -0
- package/models/components/prompthistoryresponse.d.ts.map +1 -1
- package/models/components/prompthistoryresponse.js +2 -0
- package/models/components/prompthistoryresponse.js.map +1 -1
- package/models/components/promptproperties.d.ts +1 -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/promptresponse.d.ts +5 -0
- package/models/components/promptresponse.d.ts.map +1 -1
- package/models/components/promptresponse.js +2 -0
- package/models/components/promptresponse.js.map +1 -1
- package/models/components/promptupdaterequest.d.ts +5 -0
- package/models/components/promptupdaterequest.d.ts.map +1 -1
- package/models/components/promptupdaterequest.js +2 -0
- package/models/components/promptupdaterequest.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/src/funcs/promptsPromptsListActiveLabels.ts +144 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/promptsPromptsListActiveLabels.ts +30 -0
- package/src/models/components/promptcreaterequest.ts +7 -0
- package/src/models/components/prompthistoryresponse.ts +7 -0
- package/src/models/components/promptproperties.ts +1 -0
- package/src/models/components/promptresponse.ts +7 -0
- package/src/models/components/promptupdaterequest.ts +7 -0
- package/src/sdk/prompts.ts +16 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promptupdaterequest.js","sourceRoot":"","sources":["../../src/models/components/promptupdaterequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"promptupdaterequest.js","sourceRoot":"","sources":["../../src/models/components/promptupdaterequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2IH,8DAMC;AACD,kEAQC;AAxJD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAGjD,6DAK8B;AAwD9B,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC9C,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,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AE,CAAC,yCAAiC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7D,iDAAiD,CAClD,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
package/sdk/prompts.d.ts
CHANGED
|
@@ -23,6 +23,13 @@ export declare class Prompts extends ClientSDK {
|
|
|
23
23
|
* Update an existing prompt
|
|
24
24
|
*/
|
|
25
25
|
update(request: components.PromptUpdateRequest, options?: RequestOptions): Promise<components.PromptResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* List Active Prompt Labels
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* List all distinct labels in use across active prompts.
|
|
31
|
+
*/
|
|
32
|
+
promptsListActiveLabels(options?: RequestOptions): Promise<Array<string>>;
|
|
26
33
|
/**
|
|
27
34
|
* Get Prompt By Id
|
|
28
35
|
*
|
package/sdk/prompts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/sdk/prompts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/sdk/prompts.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,OAAQ,SAAQ,SAAS;IACpC;;;;;OAKG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,0BAA0B,CAAC;IAQjD;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;IAQrC;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;IAQrC;;;;;OAKG;IACG,uBAAuB,CAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAOzB;;;;;OAKG;IACG,OAAO,CACX,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;IAQrC;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,GAAG,CAAC;IAQf;;;;;OAKG;IACG,cAAc,CAClB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAQnD;;;;;;;;;OASG;IACG,sBAAsB,CAC1B,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;CAO3C"}
|
package/sdk/prompts.js
CHANGED
|
@@ -10,6 +10,7 @@ const promptsGetById_js_1 = require("../funcs/promptsGetById.js");
|
|
|
10
10
|
const promptsList_js_1 = require("../funcs/promptsList.js");
|
|
11
11
|
const promptsPromptGetSupportedLlms_js_1 = require("../funcs/promptsPromptGetSupportedLlms.js");
|
|
12
12
|
const promptsPromptsHistory_js_1 = require("../funcs/promptsPromptsHistory.js");
|
|
13
|
+
const promptsPromptsListActiveLabels_js_1 = require("../funcs/promptsPromptsListActiveLabels.js");
|
|
13
14
|
const promptsUpdate_js_1 = require("../funcs/promptsUpdate.js");
|
|
14
15
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
15
16
|
const fp_js_1 = require("../types/fp.js");
|
|
@@ -41,6 +42,15 @@ class Prompts extends sdks_js_1.ClientSDK {
|
|
|
41
42
|
async update(request, options) {
|
|
42
43
|
return (0, fp_js_1.unwrapAsync)((0, promptsUpdate_js_1.promptsUpdate)(this, request, options));
|
|
43
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* List Active Prompt Labels
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* List all distinct labels in use across active prompts.
|
|
50
|
+
*/
|
|
51
|
+
async promptsListActiveLabels(options) {
|
|
52
|
+
return (0, fp_js_1.unwrapAsync)((0, promptsPromptsListActiveLabels_js_1.promptsPromptsListActiveLabels)(this, options));
|
|
53
|
+
}
|
|
44
54
|
/**
|
|
45
55
|
* Get Prompt By Id
|
|
46
56
|
*
|
package/sdk/prompts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/sdk/prompts.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gEAA0D;AAC1D,gEAA0D;AAC1D,kEAA4D;AAC5D,4DAAsD;AACtD,gGAA0F;AAC1F,gFAA0E;AAC1E,gEAA0D;AAC1D,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,OAAQ,SAAQ,mBAAS;IACpC;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4BAAW,EAC5B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gCAAa,EAC9B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,O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AAC,CAAC;IACL,CAAC;CACF;AA1ID,0BA0IC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { SyllableSDKCore } from "../core.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
21
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
|
+
import { SyllableSDKError } from "../models/errors/syllablesdkerror.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* List Active Prompt Labels
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* List all distinct labels in use across active prompts.
|
|
31
|
+
*/
|
|
32
|
+
export function promptsPromptsListActiveLabels(
|
|
33
|
+
client: SyllableSDKCore,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): APIPromise<
|
|
36
|
+
Result<
|
|
37
|
+
Array<string>,
|
|
38
|
+
| SyllableSDKError
|
|
39
|
+
| ResponseValidationError
|
|
40
|
+
| ConnectionError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| InvalidRequestError
|
|
44
|
+
| UnexpectedClientError
|
|
45
|
+
| SDKValidationError
|
|
46
|
+
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
options,
|
|
51
|
+
));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async function $do(
|
|
55
|
+
client: SyllableSDKCore,
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): Promise<
|
|
58
|
+
[
|
|
59
|
+
Result<
|
|
60
|
+
Array<string>,
|
|
61
|
+
| SyllableSDKError
|
|
62
|
+
| ResponseValidationError
|
|
63
|
+
| ConnectionError
|
|
64
|
+
| RequestAbortedError
|
|
65
|
+
| RequestTimeoutError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| UnexpectedClientError
|
|
68
|
+
| SDKValidationError
|
|
69
|
+
>,
|
|
70
|
+
APICall,
|
|
71
|
+
]
|
|
72
|
+
> {
|
|
73
|
+
const path = pathToFunc("/api/v1/prompts/labels")();
|
|
74
|
+
|
|
75
|
+
const headers = new Headers(compactMap({
|
|
76
|
+
Accept: "application/json",
|
|
77
|
+
}));
|
|
78
|
+
|
|
79
|
+
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
80
|
+
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
81
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
82
|
+
|
|
83
|
+
const context = {
|
|
84
|
+
options: client._options,
|
|
85
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
86
|
+
operationID: "prompts_list_active_labels",
|
|
87
|
+
oAuth2Scopes: null,
|
|
88
|
+
|
|
89
|
+
resolvedSecurity: requestSecurity,
|
|
90
|
+
|
|
91
|
+
securitySource: client._options.apiKeyHeader,
|
|
92
|
+
retryConfig: options?.retries
|
|
93
|
+
|| client._options.retryConfig
|
|
94
|
+
|| { strategy: "none" },
|
|
95
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const requestRes = client._createRequest(context, {
|
|
99
|
+
security: requestSecurity,
|
|
100
|
+
method: "GET",
|
|
101
|
+
baseURL: options?.serverURL,
|
|
102
|
+
path: path,
|
|
103
|
+
headers: headers,
|
|
104
|
+
userAgent: client._options.userAgent,
|
|
105
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
106
|
+
}, options);
|
|
107
|
+
if (!requestRes.ok) {
|
|
108
|
+
return [requestRes, { status: "invalid" }];
|
|
109
|
+
}
|
|
110
|
+
const req = requestRes.value;
|
|
111
|
+
|
|
112
|
+
const doResult = await client._do(req, {
|
|
113
|
+
context,
|
|
114
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
115
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
116
|
+
retryConfig: context.retryConfig,
|
|
117
|
+
retryCodes: context.retryCodes,
|
|
118
|
+
});
|
|
119
|
+
if (!doResult.ok) {
|
|
120
|
+
return [doResult, { status: "request-error", request: req }];
|
|
121
|
+
}
|
|
122
|
+
const response = doResult.value;
|
|
123
|
+
|
|
124
|
+
const [result] = await M.match<
|
|
125
|
+
Array<string>,
|
|
126
|
+
| SyllableSDKError
|
|
127
|
+
| ResponseValidationError
|
|
128
|
+
| ConnectionError
|
|
129
|
+
| RequestAbortedError
|
|
130
|
+
| RequestTimeoutError
|
|
131
|
+
| InvalidRequestError
|
|
132
|
+
| UnexpectedClientError
|
|
133
|
+
| SDKValidationError
|
|
134
|
+
>(
|
|
135
|
+
M.json(200, z.array(z.string())),
|
|
136
|
+
M.fail("4XX"),
|
|
137
|
+
M.fail("5XX"),
|
|
138
|
+
)(response, req);
|
|
139
|
+
if (!result.ok) {
|
|
140
|
+
return [result, { status: "complete", request: req, response }];
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return [result, { status: "complete", request: req, response }];
|
|
144
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.3",
|
|
64
|
-
sdkVersion: "1.0.
|
|
64
|
+
sdkVersion: "1.0.71-rc.2",
|
|
65
65
|
genVersion: "2.950.2",
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 1.0.
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 1.0.71-rc.2 2.950.2 0.0.3 syllable-sdk",
|
|
67
67
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -151,6 +151,7 @@ import { tool$promptsGetById } from "./tools/promptsGetById.js";
|
|
|
151
151
|
import { tool$promptsList } from "./tools/promptsList.js";
|
|
152
152
|
import { tool$promptsPromptGetSupportedLlms } from "./tools/promptsPromptGetSupportedLlms.js";
|
|
153
153
|
import { tool$promptsPromptsHistory } from "./tools/promptsPromptsHistory.js";
|
|
154
|
+
import { tool$promptsPromptsListActiveLabels } from "./tools/promptsPromptsListActiveLabels.js";
|
|
154
155
|
import { tool$promptsUpdate } from "./tools/promptsUpdate.js";
|
|
155
156
|
import { tool$pronunciationsPronunciationsDeleteCsv } from "./tools/pronunciationsPronunciationsDeleteCsv.js";
|
|
156
157
|
import { tool$pronunciationsPronunciationsDownloadCsv } from "./tools/pronunciationsPronunciationsDownloadCsv.js";
|
|
@@ -214,7 +215,7 @@ export function createMCPServer(deps: {
|
|
|
214
215
|
}) {
|
|
215
216
|
const server = new McpServer({
|
|
216
217
|
name: "SyllableSDK",
|
|
217
|
-
version: "1.0.
|
|
218
|
+
version: "1.0.71-rc.2",
|
|
218
219
|
});
|
|
219
220
|
|
|
220
221
|
const client = new SyllableSDKCore({
|
|
@@ -295,6 +296,7 @@ export function createMCPServer(deps: {
|
|
|
295
296
|
tool(tool$promptsList);
|
|
296
297
|
tool(tool$promptsCreate);
|
|
297
298
|
tool(tool$promptsUpdate);
|
|
299
|
+
tool(tool$promptsPromptsListActiveLabels);
|
|
298
300
|
tool(tool$promptsGetById);
|
|
299
301
|
tool(tool$promptsDelete);
|
|
300
302
|
tool(tool$promptsPromptsHistory);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { promptsPromptsListActiveLabels } from "../../funcs/promptsPromptsListActiveLabels.js";
|
|
6
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
7
|
+
|
|
8
|
+
export const tool$promptsPromptsListActiveLabels: ToolDefinition = {
|
|
9
|
+
name: "prompts-prompts-list-active-labels",
|
|
10
|
+
description: `List Active Prompt Labels
|
|
11
|
+
|
|
12
|
+
List all distinct labels in use across active prompts.`,
|
|
13
|
+
tool: async (client, ctx) => {
|
|
14
|
+
const [result, apiCall] = await promptsPromptsListActiveLabels(
|
|
15
|
+
client,
|
|
16
|
+
{ fetchOptions: { signal: ctx.mcpReq.signal } },
|
|
17
|
+
).$inspect();
|
|
18
|
+
|
|
19
|
+
if (!result.ok) {
|
|
20
|
+
return {
|
|
21
|
+
content: [{ type: "text", text: result.error.message }],
|
|
22
|
+
isError: true,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const value = result.value;
|
|
27
|
+
|
|
28
|
+
return formatResult(value, apiCall);
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -26,6 +26,10 @@ export type PromptCreateRequest = {
|
|
|
26
26
|
* The description of the prompt
|
|
27
27
|
*/
|
|
28
28
|
description?: string | null | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The prompt labels
|
|
31
|
+
*/
|
|
32
|
+
labels?: Array<string> | null | undefined;
|
|
29
33
|
/**
|
|
30
34
|
* The type of the prompt
|
|
31
35
|
*/
|
|
@@ -68,6 +72,7 @@ export const PromptCreateRequest$inboundSchema: z.ZodType<
|
|
|
68
72
|
> = z.object({
|
|
69
73
|
name: z.string(),
|
|
70
74
|
description: z.nullable(z.string()).optional(),
|
|
75
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
71
76
|
type: z.string(),
|
|
72
77
|
context: z.nullable(z.string()).optional(),
|
|
73
78
|
tools: z.array(z.string()).optional(),
|
|
@@ -89,6 +94,7 @@ export const PromptCreateRequest$inboundSchema: z.ZodType<
|
|
|
89
94
|
export type PromptCreateRequest$Outbound = {
|
|
90
95
|
name: string;
|
|
91
96
|
description?: string | null | undefined;
|
|
97
|
+
labels?: Array<string> | null | undefined;
|
|
92
98
|
type: string;
|
|
93
99
|
context?: string | null | undefined;
|
|
94
100
|
tools?: Array<string> | undefined;
|
|
@@ -107,6 +113,7 @@ export const PromptCreateRequest$outboundSchema: z.ZodType<
|
|
|
107
113
|
> = z.object({
|
|
108
114
|
name: z.string(),
|
|
109
115
|
description: z.nullable(z.string()).optional(),
|
|
116
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
110
117
|
type: z.string(),
|
|
111
118
|
context: z.nullable(z.string()).optional(),
|
|
112
119
|
tools: z.array(z.string()).optional(),
|
|
@@ -55,6 +55,10 @@ export type PromptHistoryResponse = {
|
|
|
55
55
|
* Description of the prompt at this version
|
|
56
56
|
*/
|
|
57
57
|
promptDescription?: string | null | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Labels of the prompt at this version
|
|
60
|
+
*/
|
|
61
|
+
labels?: Array<string> | null | undefined;
|
|
58
62
|
/**
|
|
59
63
|
* Name of the prompt at this version
|
|
60
64
|
*/
|
|
@@ -100,6 +104,7 @@ export const PromptHistoryResponse$inboundSchema: z.ZodType<
|
|
|
100
104
|
version_number: z.number().int(),
|
|
101
105
|
prompt_text: z.string(),
|
|
102
106
|
prompt_description: z.nullable(z.string()).optional(),
|
|
107
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
103
108
|
prompt_name: z.string(),
|
|
104
109
|
llm_config: z.nullable(PromptLlmConfig$inboundSchema).optional(),
|
|
105
110
|
comments: z.nullable(z.string()).optional(),
|
|
@@ -132,6 +137,7 @@ export type PromptHistoryResponse$Outbound = {
|
|
|
132
137
|
version_number: number;
|
|
133
138
|
prompt_text: string;
|
|
134
139
|
prompt_description?: string | null | undefined;
|
|
140
|
+
labels?: Array<string> | null | undefined;
|
|
135
141
|
prompt_name: string;
|
|
136
142
|
llm_config?: PromptLlmConfig$Outbound | null | undefined;
|
|
137
143
|
comments?: string | null | undefined;
|
|
@@ -153,6 +159,7 @@ export const PromptHistoryResponse$outboundSchema: z.ZodType<
|
|
|
153
159
|
versionNumber: z.number().int(),
|
|
154
160
|
promptText: z.string(),
|
|
155
161
|
promptDescription: z.nullable(z.string()).optional(),
|
|
162
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
156
163
|
promptName: z.string(),
|
|
157
164
|
llmConfig: z.nullable(PromptLlmConfig$outboundSchema).optional(),
|
|
158
165
|
comments: z.nullable(z.string()).optional(),
|
|
@@ -50,6 +50,10 @@ export type PromptResponse = {
|
|
|
50
50
|
* The description of the prompt
|
|
51
51
|
*/
|
|
52
52
|
description?: string | null | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* The prompt labels
|
|
55
|
+
*/
|
|
56
|
+
labels?: Array<string> | null | undefined;
|
|
53
57
|
/**
|
|
54
58
|
* The type of the prompt
|
|
55
59
|
*/
|
|
@@ -122,6 +126,7 @@ export const PromptResponse$inboundSchema: z.ZodType<
|
|
|
122
126
|
> = z.object({
|
|
123
127
|
name: z.string(),
|
|
124
128
|
description: z.nullable(z.string()).optional(),
|
|
129
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
125
130
|
type: z.string(),
|
|
126
131
|
context: z.nullable(z.string()).optional(),
|
|
127
132
|
tools: z.array(z.string()).optional(),
|
|
@@ -157,6 +162,7 @@ export const PromptResponse$inboundSchema: z.ZodType<
|
|
|
157
162
|
export type PromptResponse$Outbound = {
|
|
158
163
|
name: string;
|
|
159
164
|
description?: string | null | undefined;
|
|
165
|
+
labels?: Array<string> | null | undefined;
|
|
160
166
|
type: string;
|
|
161
167
|
context?: string | null | undefined;
|
|
162
168
|
tools?: Array<string> | undefined;
|
|
@@ -182,6 +188,7 @@ export const PromptResponse$outboundSchema: z.ZodType<
|
|
|
182
188
|
> = z.object({
|
|
183
189
|
name: z.string(),
|
|
184
190
|
description: z.nullable(z.string()).optional(),
|
|
191
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
185
192
|
type: z.string(),
|
|
186
193
|
context: z.nullable(z.string()).optional(),
|
|
187
194
|
tools: z.array(z.string()).optional(),
|
|
@@ -26,6 +26,10 @@ export type PromptUpdateRequest = {
|
|
|
26
26
|
* The description of the prompt
|
|
27
27
|
*/
|
|
28
28
|
description?: string | null | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The prompt labels. Omit this field to keep the existing labels; send an empty list or null to remove them.
|
|
31
|
+
*/
|
|
32
|
+
labels?: Array<string> | null | undefined;
|
|
29
33
|
/**
|
|
30
34
|
* The type of the prompt
|
|
31
35
|
*/
|
|
@@ -72,6 +76,7 @@ export const PromptUpdateRequest$inboundSchema: z.ZodType<
|
|
|
72
76
|
> = z.object({
|
|
73
77
|
name: z.string(),
|
|
74
78
|
description: z.nullable(z.string()).optional(),
|
|
79
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
75
80
|
type: z.string(),
|
|
76
81
|
context: z.nullable(z.string()).optional(),
|
|
77
82
|
tools: z.array(z.string()).optional(),
|
|
@@ -94,6 +99,7 @@ export const PromptUpdateRequest$inboundSchema: z.ZodType<
|
|
|
94
99
|
export type PromptUpdateRequest$Outbound = {
|
|
95
100
|
name: string;
|
|
96
101
|
description?: string | null | undefined;
|
|
102
|
+
labels?: Array<string> | null | undefined;
|
|
97
103
|
type: string;
|
|
98
104
|
context?: string | null | undefined;
|
|
99
105
|
tools?: Array<string> | undefined;
|
|
@@ -113,6 +119,7 @@ export const PromptUpdateRequest$outboundSchema: z.ZodType<
|
|
|
113
119
|
> = z.object({
|
|
114
120
|
name: z.string(),
|
|
115
121
|
description: z.nullable(z.string()).optional(),
|
|
122
|
+
labels: z.nullable(z.array(z.string())).optional(),
|
|
116
123
|
type: z.string(),
|
|
117
124
|
context: z.nullable(z.string()).optional(),
|
|
118
125
|
tools: z.array(z.string()).optional(),
|
package/src/sdk/prompts.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { promptsGetById } from "../funcs/promptsGetById.js";
|
|
|
8
8
|
import { promptsList } from "../funcs/promptsList.js";
|
|
9
9
|
import { promptsPromptGetSupportedLlms } from "../funcs/promptsPromptGetSupportedLlms.js";
|
|
10
10
|
import { promptsPromptsHistory } from "../funcs/promptsPromptsHistory.js";
|
|
11
|
+
import { promptsPromptsListActiveLabels } from "../funcs/promptsPromptsListActiveLabels.js";
|
|
11
12
|
import { promptsUpdate } from "../funcs/promptsUpdate.js";
|
|
12
13
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
13
14
|
import * as components from "../models/components/index.js";
|
|
@@ -66,6 +67,21 @@ export class Prompts extends ClientSDK {
|
|
|
66
67
|
));
|
|
67
68
|
}
|
|
68
69
|
|
|
70
|
+
/**
|
|
71
|
+
* List Active Prompt Labels
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* List all distinct labels in use across active prompts.
|
|
75
|
+
*/
|
|
76
|
+
async promptsListActiveLabels(
|
|
77
|
+
options?: RequestOptions,
|
|
78
|
+
): Promise<Array<string>> {
|
|
79
|
+
return unwrapAsync(promptsPromptsListActiveLabels(
|
|
80
|
+
this,
|
|
81
|
+
options,
|
|
82
|
+
));
|
|
83
|
+
}
|
|
84
|
+
|
|
69
85
|
/**
|
|
70
86
|
* Get Prompt By Id
|
|
71
87
|
*
|