syllable-sdk 0.1.0-alpha.231 → 0.1.0-alpha.233

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.
Files changed (34) hide show
  1. package/docs/sdks/batches/README.md +4 -4
  2. package/docs/sdks/prompts/README.md +1 -1
  3. package/docs/sdks/workflows/README.md +8 -8
  4. package/funcs/promptsPromptsHistory.d.ts +1 -1
  5. package/funcs/promptsPromptsHistory.js +1 -1
  6. package/jsr.json +1 -1
  7. package/lib/config.d.ts +2 -2
  8. package/lib/config.js +2 -2
  9. package/models/components/index.d.ts +1 -0
  10. package/models/components/index.d.ts.map +1 -1
  11. package/models/components/index.js +1 -0
  12. package/models/components/index.js.map +1 -1
  13. package/models/components/languagecode.d.ts +3 -3
  14. package/models/components/languagecode.js +1 -1
  15. package/models/components/languagecode.js.map +1 -1
  16. package/models/components/prompthistory.d.ts +24 -8
  17. package/models/components/prompthistory.d.ts.map +1 -1
  18. package/models/components/prompthistory.js +13 -0
  19. package/models/components/prompthistory.js.map +1 -1
  20. package/models/components/prompthistorylinkedtool.d.ts +50 -0
  21. package/models/components/prompthistorylinkedtool.d.ts.map +1 -0
  22. package/models/components/prompthistorylinkedtool.js +78 -0
  23. package/models/components/prompthistorylinkedtool.js.map +1 -0
  24. package/openapi.json +116 -44
  25. package/package.json +1 -1
  26. package/sdk/prompts.d.ts +1 -1
  27. package/sdk/prompts.js +1 -1
  28. package/src/funcs/promptsPromptsHistory.ts +1 -1
  29. package/src/lib/config.ts +2 -2
  30. package/src/models/components/index.ts +1 -0
  31. package/src/models/components/languagecode.ts +1 -1
  32. package/src/models/components/prompthistory.ts +41 -8
  33. package/src/models/components/prompthistorylinkedtool.ts +106 -0
  34. package/src/sdk/prompts.ts +1 -1
@@ -0,0 +1,106 @@
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
+ * Record of a tool linked to a previous prompt version in the prompt history.
13
+ */
14
+ export type PromptHistoryLinkedTool = {
15
+ /**
16
+ * ID of the tool
17
+ */
18
+ toolId: number;
19
+ /**
20
+ * Current name of the tool (may have been different at the time the given version of the prompt was created)
21
+ */
22
+ currentToolName: string;
23
+ /**
24
+ * Whether the tool has changed (not including being deleted) since the given version of the prompt was created
25
+ */
26
+ outOfDate: boolean;
27
+ /**
28
+ * Whether the tool has been deleted since the given version of the prompt was created
29
+ */
30
+ deleted: boolean;
31
+ };
32
+
33
+ /** @internal */
34
+ export const PromptHistoryLinkedTool$inboundSchema: z.ZodType<
35
+ PromptHistoryLinkedTool,
36
+ z.ZodTypeDef,
37
+ unknown
38
+ > = z.object({
39
+ tool_id: z.number().int(),
40
+ current_tool_name: z.string(),
41
+ out_of_date: z.boolean(),
42
+ deleted: z.boolean(),
43
+ }).transform((v) => {
44
+ return remap$(v, {
45
+ "tool_id": "toolId",
46
+ "current_tool_name": "currentToolName",
47
+ "out_of_date": "outOfDate",
48
+ });
49
+ });
50
+
51
+ /** @internal */
52
+ export type PromptHistoryLinkedTool$Outbound = {
53
+ tool_id: number;
54
+ current_tool_name: string;
55
+ out_of_date: boolean;
56
+ deleted: boolean;
57
+ };
58
+
59
+ /** @internal */
60
+ export const PromptHistoryLinkedTool$outboundSchema: z.ZodType<
61
+ PromptHistoryLinkedTool$Outbound,
62
+ z.ZodTypeDef,
63
+ PromptHistoryLinkedTool
64
+ > = z.object({
65
+ toolId: z.number().int(),
66
+ currentToolName: z.string(),
67
+ outOfDate: z.boolean(),
68
+ deleted: z.boolean(),
69
+ }).transform((v) => {
70
+ return remap$(v, {
71
+ toolId: "tool_id",
72
+ currentToolName: "current_tool_name",
73
+ outOfDate: "out_of_date",
74
+ });
75
+ });
76
+
77
+ /**
78
+ * @internal
79
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
80
+ */
81
+ export namespace PromptHistoryLinkedTool$ {
82
+ /** @deprecated use `PromptHistoryLinkedTool$inboundSchema` instead. */
83
+ export const inboundSchema = PromptHistoryLinkedTool$inboundSchema;
84
+ /** @deprecated use `PromptHistoryLinkedTool$outboundSchema` instead. */
85
+ export const outboundSchema = PromptHistoryLinkedTool$outboundSchema;
86
+ /** @deprecated use `PromptHistoryLinkedTool$Outbound` instead. */
87
+ export type Outbound = PromptHistoryLinkedTool$Outbound;
88
+ }
89
+
90
+ export function promptHistoryLinkedToolToJSON(
91
+ promptHistoryLinkedTool: PromptHistoryLinkedTool,
92
+ ): string {
93
+ return JSON.stringify(
94
+ PromptHistoryLinkedTool$outboundSchema.parse(promptHistoryLinkedTool),
95
+ );
96
+ }
97
+
98
+ export function promptHistoryLinkedToolFromJSON(
99
+ jsonString: string,
100
+ ): SafeParseResult<PromptHistoryLinkedTool, SDKValidationError> {
101
+ return safeParse(
102
+ jsonString,
103
+ (x) => PromptHistoryLinkedTool$inboundSchema.parse(JSON.parse(x)),
104
+ `Failed to parse 'PromptHistoryLinkedTool' from JSON`,
105
+ );
106
+ }
@@ -104,7 +104,7 @@ export class Prompts extends ClientSDK {
104
104
  * Get Prompt History
105
105
  *
106
106
  * @remarks
107
- * Get a prompt by ID
107
+ * Get a list of historical versions of a prompt by its ID
108
108
  */
109
109
  async promptsHistory(
110
110
  request: operations.PromptsHistoryRequest,