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.
Files changed (159) hide show
  1. package/README.md +23 -7
  2. package/docs/sdks/prompts/README.md +78 -0
  3. package/docs/sdks/services/README.md +245 -0
  4. package/docs/sdks/sessions/README.md +1 -1
  5. package/docs/sdks/syllablesdk/README.md +3 -2
  6. package/docs/sdks/tools/README.md +163 -1
  7. package/docs/sdks/transcript/README.md +2 -0
  8. package/funcs/promptsPromptsHistory.d.ts +17 -0
  9. package/funcs/promptsPromptsHistory.d.ts.map +1 -0
  10. package/funcs/promptsPromptsHistory.js +106 -0
  11. package/funcs/promptsPromptsHistory.js.map +1 -0
  12. package/funcs/servicesCreate.d.ts +13 -0
  13. package/funcs/servicesCreate.d.ts.map +1 -0
  14. package/funcs/servicesCreate.js +96 -0
  15. package/funcs/servicesCreate.js.map +1 -0
  16. package/funcs/servicesList.d.ts +17 -0
  17. package/funcs/servicesList.d.ts.map +1 -0
  18. package/funcs/servicesList.js +111 -0
  19. package/funcs/servicesList.js.map +1 -0
  20. package/funcs/servicesUpdate.d.ts +13 -0
  21. package/funcs/servicesUpdate.d.ts.map +1 -0
  22. package/funcs/servicesUpdate.js +96 -0
  23. package/funcs/servicesUpdate.js.map +1 -0
  24. package/funcs/sessionsSessionRecordingStream.d.ts +1 -1
  25. package/funcs/sessionsSessionRecordingStream.d.ts.map +1 -1
  26. package/funcs/sessionsSessionRecordingStream.js +2 -2
  27. package/funcs/sessionsSessionRecordingStream.js.map +1 -1
  28. package/funcs/toolsCreate.d.ts +16 -0
  29. package/funcs/toolsCreate.d.ts.map +1 -0
  30. package/funcs/toolsCreate.js +99 -0
  31. package/funcs/toolsCreate.js.map +1 -0
  32. package/funcs/toolsList.d.ts +1 -1
  33. package/funcs/toolsList.js +1 -1
  34. package/funcs/toolsUpdate.d.ts +16 -0
  35. package/funcs/toolsUpdate.d.ts.map +1 -0
  36. package/funcs/toolsUpdate.js +99 -0
  37. package/funcs/toolsUpdate.js.map +1 -0
  38. package/lib/config.d.ts +4 -4
  39. package/lib/config.d.ts.map +1 -1
  40. package/lib/config.js +4 -4
  41. package/lib/config.js.map +1 -1
  42. package/models/components/index.d.ts +8 -0
  43. package/models/components/index.d.ts.map +1 -1
  44. package/models/components/index.js +8 -0
  45. package/models/components/index.js.map +1 -1
  46. package/models/components/listresponseservice.d.ts +38 -0
  47. package/models/components/listresponseservice.d.ts.map +1 -0
  48. package/models/components/listresponseservice.js +81 -0
  49. package/models/components/listresponseservice.js.map +1 -0
  50. package/models/components/prompt.d.ts +10 -0
  51. package/models/components/prompt.d.ts.map +1 -1
  52. package/models/components/prompt.js +8 -0
  53. package/models/components/prompt.js.map +1 -1
  54. package/models/components/prompthistory.d.ts +41 -0
  55. package/models/components/prompthistory.d.ts.map +1 -0
  56. package/models/components/prompthistory.js +88 -0
  57. package/models/components/prompthistory.js.map +1 -0
  58. package/models/components/promptproperties.d.ts +3 -0
  59. package/models/components/promptproperties.d.ts.map +1 -1
  60. package/models/components/promptproperties.js +1 -0
  61. package/models/components/promptproperties.js.map +1 -1
  62. package/models/components/service.d.ts +47 -0
  63. package/models/components/service.d.ts.map +1 -0
  64. package/models/components/service.js +65 -0
  65. package/models/components/service.js.map +1 -0
  66. package/models/components/servicecreate.d.ts +37 -0
  67. package/models/components/servicecreate.d.ts.map +1 -0
  68. package/models/components/servicecreate.js +61 -0
  69. package/models/components/servicecreate.js.map +1 -0
  70. package/models/components/serviceproperties.d.ts +28 -0
  71. package/models/components/serviceproperties.d.ts.map +1 -0
  72. package/models/components/serviceproperties.js +50 -0
  73. package/models/components/serviceproperties.js.map +1 -0
  74. package/models/components/serviceupdate.d.ts +42 -0
  75. package/models/components/serviceupdate.d.ts.map +1 -0
  76. package/models/components/serviceupdate.js +63 -0
  77. package/models/components/serviceupdate.js.map +1 -0
  78. package/models/components/sessionproperties.d.ts +3 -0
  79. package/models/components/sessionproperties.d.ts.map +1 -1
  80. package/models/components/sessionproperties.js +1 -0
  81. package/models/components/sessionproperties.js.map +1 -1
  82. package/models/components/toolcreate.d.ts +66 -0
  83. package/models/components/toolcreate.d.ts.map +1 -0
  84. package/models/components/toolcreate.js +95 -0
  85. package/models/components/toolcreate.js.map +1 -0
  86. package/models/components/toolupdate.d.ts +71 -0
  87. package/models/components/toolupdate.d.ts.map +1 -0
  88. package/models/components/toolupdate.js +97 -0
  89. package/models/components/toolupdate.js.map +1 -0
  90. package/models/operations/index.d.ts +2 -0
  91. package/models/operations/index.d.ts.map +1 -1
  92. package/models/operations/index.js +2 -0
  93. package/models/operations/index.js.map +1 -1
  94. package/models/operations/promptshistory.d.ts +29 -0
  95. package/models/operations/promptshistory.d.ts.map +1 -0
  96. package/models/operations/promptshistory.js +68 -0
  97. package/models/operations/promptshistory.js.map +1 -0
  98. package/models/operations/promptslist.d.ts +3 -0
  99. package/models/operations/promptslist.d.ts.map +1 -1
  100. package/models/operations/promptslist.js +1 -0
  101. package/models/operations/promptslist.js.map +1 -1
  102. package/models/operations/servicelist.d.ts +97 -0
  103. package/models/operations/servicelist.d.ts.map +1 -0
  104. package/models/operations/servicelist.js +137 -0
  105. package/models/operations/servicelist.js.map +1 -0
  106. package/models/operations/sessionslist.d.ts +3 -0
  107. package/models/operations/sessionslist.d.ts.map +1 -1
  108. package/models/operations/sessionslist.js +1 -0
  109. package/models/operations/sessionslist.js.map +1 -1
  110. package/package.json +1 -1
  111. package/sdk/prompts.d.ts +7 -0
  112. package/sdk/prompts.d.ts.map +1 -1
  113. package/sdk/prompts.js +10 -0
  114. package/sdk/prompts.js.map +1 -1
  115. package/sdk/sdk.d.ts +3 -0
  116. package/sdk/sdk.d.ts.map +1 -1
  117. package/sdk/sdk.js +5 -0
  118. package/sdk/sdk.js.map +1 -1
  119. package/sdk/services.d.ts +21 -0
  120. package/sdk/services.d.ts.map +1 -0
  121. package/sdk/services.js +36 -0
  122. package/sdk/services.js.map +1 -0
  123. package/sdk/sessions.d.ts +1 -1
  124. package/sdk/sessions.d.ts.map +1 -1
  125. package/sdk/tools.d.ts +15 -1
  126. package/sdk/tools.d.ts.map +1 -1
  127. package/sdk/tools.js +21 -1
  128. package/sdk/tools.js.map +1 -1
  129. package/src/funcs/promptsPromptsHistory.ts +139 -0
  130. package/src/funcs/servicesCreate.ts +128 -0
  131. package/src/funcs/servicesList.ts +144 -0
  132. package/src/funcs/servicesUpdate.ts +128 -0
  133. package/src/funcs/sessionsSessionRecordingStream.ts +4 -4
  134. package/src/funcs/toolsCreate.ts +131 -0
  135. package/src/funcs/toolsList.ts +1 -1
  136. package/src/funcs/toolsUpdate.ts +131 -0
  137. package/src/lib/config.ts +4 -4
  138. package/src/models/components/index.ts +8 -0
  139. package/src/models/components/listresponseservice.ts +101 -0
  140. package/src/models/components/prompt.ts +18 -0
  141. package/src/models/components/prompthistory.ts +103 -0
  142. package/src/models/components/promptproperties.ts +1 -0
  143. package/src/models/components/service.ts +83 -0
  144. package/src/models/components/servicecreate.ts +72 -0
  145. package/src/models/components/serviceproperties.ts +33 -0
  146. package/src/models/components/serviceupdate.ts +79 -0
  147. package/src/models/components/sessionproperties.ts +1 -0
  148. package/src/models/components/toolcreate.ts +141 -0
  149. package/src/models/components/toolupdate.ts +148 -0
  150. package/src/models/operations/index.ts +2 -0
  151. package/src/models/operations/promptshistory.ts +75 -0
  152. package/src/models/operations/promptslist.ts +1 -0
  153. package/src/models/operations/servicelist.ts +184 -0
  154. package/src/models/operations/sessionslist.ts +1 -0
  155. package/src/sdk/prompts.ts +18 -0
  156. package/src/sdk/sdk.ts +6 -0
  157. package/src/sdk/services.ts +58 -0
  158. package/src/sdk/sessions.ts +1 -1
  159. package/src/sdk/tools.ts +37 -1
@@ -27,7 +27,7 @@ import { Result } from "../types/fp.js";
27
27
  * Tool List
28
28
  *
29
29
  * @remarks
30
- * List the existing agents
30
+ * List the existing tools
31
31
  */
32
32
  export async function toolsList(
33
33
  client: SyllableSDKCore,
@@ -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
- "https://syllable-app-558bbffbc8-zmhqc",
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.4",
65
- genVersion: "2.460.1",
64
+ sdkVersion: "0.1.0-alpha.6",
65
+ genVersion: "2.461.2",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 0.1.0-alpha.4 2.460.1 0.0.2 syllable-sdk",
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
+ }
@@ -11,6 +11,7 @@ export const PromptProperties = {
11
11
  Context: "context",
12
12
  Tools: "tools",
13
13
  LlmConfig: "llm_config",
14
+ LastUpdatedBy: "last_updated_by",
14
15
  } as const;
15
16
  export type PromptProperties = ClosedEnum<typeof PromptProperties>;
16
17
 
@@ -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
+ }