syllable-sdk 1.0.2-rc.6 → 1.0.2-rc.8

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 (46) hide show
  1. package/bin/mcp-server.js +30 -32
  2. package/bin/mcp-server.js.map +11 -11
  3. package/docs/sdks/batches/README.md +4 -4
  4. package/docs/sdks/prompts/README.md +4 -2
  5. package/docs/sdks/workflows/README.md +8 -8
  6. package/examples/package-lock.json +1 -1
  7. package/jsr.json +1 -1
  8. package/lib/config.d.ts +2 -2
  9. package/lib/config.js +2 -2
  10. package/mcp-server/mcp-server.js +1 -1
  11. package/mcp-server/server.js +1 -1
  12. package/models/components/dictionarymetadata.d.ts +2 -2
  13. package/models/components/dictionarymetadata.d.ts.map +1 -1
  14. package/models/components/dictionarymetadata.js +2 -2
  15. package/models/components/dictionarymetadata.js.map +1 -1
  16. package/models/components/promptcreaterequest.d.ts +5 -0
  17. package/models/components/promptcreaterequest.d.ts.map +1 -1
  18. package/models/components/promptcreaterequest.js +4 -0
  19. package/models/components/promptcreaterequest.js.map +1 -1
  20. package/models/components/promptresponse.d.ts +5 -5
  21. package/models/components/promptresponse.d.ts.map +1 -1
  22. package/models/components/promptresponse.js +2 -2
  23. package/models/components/promptresponse.js.map +1 -1
  24. package/models/components/promptupdaterequest.d.ts +5 -5
  25. package/models/components/promptupdaterequest.d.ts.map +1 -1
  26. package/models/components/promptupdaterequest.js +2 -2
  27. package/models/components/promptupdaterequest.js.map +1 -1
  28. package/models/components/pronunciationoverride.d.ts +8 -29
  29. package/models/components/pronunciationoverride.d.ts.map +1 -1
  30. package/models/components/pronunciationoverride.js +9 -32
  31. package/models/components/pronunciationoverride.js.map +1 -1
  32. package/models/components/pronunciationscsvuploadresponse.d.ts +6 -6
  33. package/models/components/pronunciationscsvuploadresponse.d.ts.map +1 -1
  34. package/models/components/pronunciationscsvuploadresponse.js +6 -6
  35. package/models/components/pronunciationscsvuploadresponse.js.map +1 -1
  36. package/openapi.json +89 -126
  37. package/package.json +1 -1
  38. package/src/lib/config.ts +2 -2
  39. package/src/mcp-server/mcp-server.ts +1 -1
  40. package/src/mcp-server/server.ts +1 -1
  41. package/src/models/components/dictionarymetadata.ts +4 -4
  42. package/src/models/components/promptcreaterequest.ts +9 -0
  43. package/src/models/components/promptresponse.ts +7 -7
  44. package/src/models/components/promptupdaterequest.ts +7 -7
  45. package/src/models/components/pronunciationoverride.ts +16 -62
  46. package/src/models/components/pronunciationscsvuploadresponse.ts +12 -12
@@ -46,6 +46,10 @@ export type PromptCreateRequest = {
46
46
  * Whether session end functionality is enabled for this prompt
47
47
  */
48
48
  sessionEndEnabled?: boolean | undefined;
49
+ /**
50
+ * The comments for the most recent edit to the prompt
51
+ */
52
+ editComments?: string | null | undefined;
49
53
  /**
50
54
  * Whether to include the default tools (`hangup`) in the list of tools for the prompt. If you disable this during creation, you might want to disable it during updates as well, otherwise the default tools will be added when updating the prompt.
51
55
  */
@@ -65,11 +69,13 @@ export const PromptCreateRequest$inboundSchema: z.ZodType<
65
69
  tools: z.array(z.string()).optional(),
66
70
  llm_config: PromptLlmConfig$inboundSchema,
67
71
  session_end_enabled: z.boolean().default(false),
72
+ edit_comments: z.nullable(z.string()).optional(),
68
73
  include_default_tools: z.boolean().default(true),
69
74
  }).transform((v) => {
70
75
  return remap$(v, {
71
76
  "llm_config": "llmConfig",
72
77
  "session_end_enabled": "sessionEndEnabled",
78
+ "edit_comments": "editComments",
73
79
  "include_default_tools": "includeDefaultTools",
74
80
  });
75
81
  });
@@ -83,6 +89,7 @@ export type PromptCreateRequest$Outbound = {
83
89
  tools?: Array<string> | undefined;
84
90
  llm_config: PromptLlmConfig$Outbound;
85
91
  session_end_enabled: boolean;
92
+ edit_comments?: string | null | undefined;
86
93
  include_default_tools: boolean;
87
94
  };
88
95
 
@@ -99,11 +106,13 @@ export const PromptCreateRequest$outboundSchema: z.ZodType<
99
106
  tools: z.array(z.string()).optional(),
100
107
  llmConfig: PromptLlmConfig$outboundSchema,
101
108
  sessionEndEnabled: z.boolean().default(false),
109
+ editComments: z.nullable(z.string()).optional(),
102
110
  includeDefaultTools: z.boolean().default(true),
103
111
  }).transform((v) => {
104
112
  return remap$(v, {
105
113
  llmConfig: "llm_config",
106
114
  sessionEndEnabled: "session_end_enabled",
115
+ editComments: "edit_comments",
107
116
  includeDefaultTools: "include_default_tools",
108
117
  });
109
118
  });
@@ -60,14 +60,14 @@ export type PromptResponse = {
60
60
  * Whether session end functionality is enabled for this prompt
61
61
  */
62
62
  sessionEndEnabled?: boolean | undefined;
63
- /**
64
- * The internal ID of the prompt
65
- */
66
- id: number;
67
63
  /**
68
64
  * The comments for the most recent edit to the prompt
69
65
  */
70
66
  editComments?: string | null | undefined;
67
+ /**
68
+ * The internal ID of the prompt
69
+ */
70
+ id: number;
71
71
  /**
72
72
  * The last updated date of the prompt
73
73
  */
@@ -103,8 +103,8 @@ export const PromptResponse$inboundSchema: z.ZodType<
103
103
  tools: z.array(z.string()).optional(),
104
104
  llm_config: PromptLlmConfig$inboundSchema,
105
105
  session_end_enabled: z.boolean().default(false),
106
- id: z.number().int(),
107
106
  edit_comments: z.nullable(z.string()).optional(),
107
+ id: z.number().int(),
108
108
  last_updated: z.nullable(z.string()),
109
109
  last_updated_by: z.nullable(z.string()).optional(),
110
110
  agent_count: z.nullable(z.number().int()).optional(),
@@ -132,8 +132,8 @@ export type PromptResponse$Outbound = {
132
132
  tools?: Array<string> | undefined;
133
133
  llm_config: PromptLlmConfig$Outbound;
134
134
  session_end_enabled: boolean;
135
- id: number;
136
135
  edit_comments?: string | null | undefined;
136
+ id: number;
137
137
  last_updated: string | null;
138
138
  last_updated_by?: string | null | undefined;
139
139
  agent_count?: number | null | undefined;
@@ -154,8 +154,8 @@ export const PromptResponse$outboundSchema: z.ZodType<
154
154
  tools: z.array(z.string()).optional(),
155
155
  llmConfig: PromptLlmConfig$outboundSchema,
156
156
  sessionEndEnabled: z.boolean().default(false),
157
- id: z.number().int(),
158
157
  editComments: z.nullable(z.string()).optional(),
158
+ id: z.number().int(),
159
159
  lastUpdated: z.nullable(z.string()),
160
160
  lastUpdatedBy: z.nullable(z.string()).optional(),
161
161
  agentCount: z.nullable(z.number().int()).optional(),
@@ -46,14 +46,14 @@ export type PromptUpdateRequest = {
46
46
  * Whether session end functionality is enabled for this prompt
47
47
  */
48
48
  sessionEndEnabled?: boolean | undefined;
49
- /**
50
- * The internal ID of the prompt
51
- */
52
- id: number;
53
49
  /**
54
50
  * The comments for the most recent edit to the prompt
55
51
  */
56
52
  editComments?: string | null | undefined;
53
+ /**
54
+ * The internal ID of the prompt
55
+ */
56
+ id: number;
57
57
  /**
58
58
  * Whether to include the default tools (`hangup`) in the list of tools for the prompt. If you remove one of the default tools from your prompt, you might want to disable this option so that the tool is not added again when updated.
59
59
  */
@@ -73,8 +73,8 @@ export const PromptUpdateRequest$inboundSchema: z.ZodType<
73
73
  tools: z.array(z.string()).optional(),
74
74
  llm_config: PromptLlmConfig$inboundSchema,
75
75
  session_end_enabled: z.boolean().default(false),
76
- id: z.number().int(),
77
76
  edit_comments: z.nullable(z.string()).optional(),
77
+ id: z.number().int(),
78
78
  include_default_tools: z.boolean().default(true),
79
79
  }).transform((v) => {
80
80
  return remap$(v, {
@@ -94,8 +94,8 @@ export type PromptUpdateRequest$Outbound = {
94
94
  tools?: Array<string> | undefined;
95
95
  llm_config: PromptLlmConfig$Outbound;
96
96
  session_end_enabled: boolean;
97
- id: number;
98
97
  edit_comments?: string | null | undefined;
98
+ id: number;
99
99
  include_default_tools: boolean;
100
100
  };
101
101
 
@@ -112,8 +112,8 @@ export const PromptUpdateRequest$outboundSchema: z.ZodType<
112
112
  tools: z.array(z.string()).optional(),
113
113
  llmConfig: PromptLlmConfig$outboundSchema,
114
114
  sessionEndEnabled: z.boolean().default(false),
115
- id: z.number().int(),
116
115
  editComments: z.nullable(z.string()).optional(),
116
+ id: z.number().int(),
117
117
  includeDefaultTools: z.boolean().default(true),
118
118
  }).transform((v) => {
119
119
  return remap$(v, {
@@ -13,70 +13,24 @@ import {
13
13
  MatchType$outboundSchema,
14
14
  } from "./matchtype.js";
15
15
 
16
- export type Language = string | Array<string>;
17
-
18
16
  /**
19
17
  * A single text replacement rule.
20
18
  */
21
19
  export type PronunciationOverride = {
22
20
  text: string;
23
21
  replacement: string;
24
- language?: string | Array<string> | null | undefined;
25
- provider?: string | null | undefined;
26
- voice?: string | null | undefined;
22
+ languages?: Array<string> | undefined;
23
+ provider?: string | undefined;
24
+ voice?: string | undefined;
27
25
  /**
28
26
  * Matching strategy for override text.
29
27
  */
30
28
  matchType?: MatchType | undefined;
31
29
  matchOptions?: Array<string> | undefined;
32
30
  enabled?: boolean | undefined;
33
- notes?: string | null | undefined;
31
+ notes?: string | undefined;
34
32
  };
35
33
 
36
- /** @internal */
37
- export const Language$inboundSchema: z.ZodType<
38
- Language,
39
- z.ZodTypeDef,
40
- unknown
41
- > = z.union([z.string(), z.array(z.string())]);
42
-
43
- /** @internal */
44
- export type Language$Outbound = string | Array<string>;
45
-
46
- /** @internal */
47
- export const Language$outboundSchema: z.ZodType<
48
- Language$Outbound,
49
- z.ZodTypeDef,
50
- Language
51
- > = z.union([z.string(), z.array(z.string())]);
52
-
53
- /**
54
- * @internal
55
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
56
- */
57
- export namespace Language$ {
58
- /** @deprecated use `Language$inboundSchema` instead. */
59
- export const inboundSchema = Language$inboundSchema;
60
- /** @deprecated use `Language$outboundSchema` instead. */
61
- export const outboundSchema = Language$outboundSchema;
62
- /** @deprecated use `Language$Outbound` instead. */
63
- export type Outbound = Language$Outbound;
64
- }
65
-
66
- export function languageToJSON(language: Language): string {
67
- return JSON.stringify(Language$outboundSchema.parse(language));
68
- }
69
-
70
- export function languageFromJSON(
71
- jsonString: string,
72
- ): SafeParseResult<Language, SDKValidationError> {
73
- return safeParse(
74
- jsonString,
75
- (x) => Language$inboundSchema.parse(JSON.parse(x)),
76
- `Failed to parse 'Language' from JSON`,
77
- );
78
- }
79
-
80
34
  /** @internal */
81
35
  export const PronunciationOverride$inboundSchema: z.ZodType<
82
36
  PronunciationOverride,
@@ -85,13 +39,13 @@ export const PronunciationOverride$inboundSchema: z.ZodType<
85
39
  > = z.object({
86
40
  text: z.string(),
87
41
  replacement: z.string(),
88
- language: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
89
- provider: z.nullable(z.string()).optional(),
90
- voice: z.nullable(z.string()).optional(),
42
+ languages: z.array(z.string()).optional(),
43
+ provider: z.string().default(""),
44
+ voice: z.string().default(""),
91
45
  match_type: MatchType$inboundSchema.optional(),
92
46
  match_options: z.array(z.string()).optional(),
93
47
  enabled: z.boolean().default(true),
94
- notes: z.nullable(z.string()).optional(),
48
+ notes: z.string().default(""),
95
49
  }).transform((v) => {
96
50
  return remap$(v, {
97
51
  "match_type": "matchType",
@@ -103,13 +57,13 @@ export const PronunciationOverride$inboundSchema: z.ZodType<
103
57
  export type PronunciationOverride$Outbound = {
104
58
  text: string;
105
59
  replacement: string;
106
- language?: string | Array<string> | null | undefined;
107
- provider?: string | null | undefined;
108
- voice?: string | null | undefined;
60
+ languages?: Array<string> | undefined;
61
+ provider: string;
62
+ voice: string;
109
63
  match_type?: string | undefined;
110
64
  match_options?: Array<string> | undefined;
111
65
  enabled: boolean;
112
- notes?: string | null | undefined;
66
+ notes: string;
113
67
  };
114
68
 
115
69
  /** @internal */
@@ -120,13 +74,13 @@ export const PronunciationOverride$outboundSchema: z.ZodType<
120
74
  > = z.object({
121
75
  text: z.string(),
122
76
  replacement: z.string(),
123
- language: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
124
- provider: z.nullable(z.string()).optional(),
125
- voice: z.nullable(z.string()).optional(),
77
+ languages: z.array(z.string()).optional(),
78
+ provider: z.string().default(""),
79
+ voice: z.string().default(""),
126
80
  matchType: MatchType$outboundSchema.optional(),
127
81
  matchOptions: z.array(z.string()).optional(),
128
82
  enabled: z.boolean().default(true),
129
- notes: z.nullable(z.string()).optional(),
83
+ notes: z.string().default(""),
130
84
  }).transform((v) => {
131
85
  return remap$(v, {
132
86
  matchType: "match_type",
@@ -13,10 +13,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
13
  */
14
14
  export type PronunciationsCsvUploadResponse = {
15
15
  revision: number;
16
- hash?: string | null | undefined;
17
- entries?: number | null | undefined;
16
+ hash: string;
17
+ entries: number;
18
18
  uploadedAt?: Date | undefined;
19
- uploadedBy?: string | null | undefined;
19
+ uploadedBy: string;
20
20
  };
21
21
 
22
22
  /** @internal */
@@ -26,11 +26,11 @@ export const PronunciationsCsvUploadResponse$inboundSchema: z.ZodType<
26
26
  unknown
27
27
  > = z.object({
28
28
  revision: z.number().int(),
29
- hash: z.nullable(z.string()).optional(),
30
- entries: z.nullable(z.number().int()).optional(),
29
+ hash: z.string(),
30
+ entries: z.number().int(),
31
31
  uploaded_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
32
32
  .optional(),
33
- uploaded_by: z.nullable(z.string()).optional(),
33
+ uploaded_by: z.string(),
34
34
  }).transform((v) => {
35
35
  return remap$(v, {
36
36
  "uploaded_at": "uploadedAt",
@@ -41,10 +41,10 @@ export const PronunciationsCsvUploadResponse$inboundSchema: z.ZodType<
41
41
  /** @internal */
42
42
  export type PronunciationsCsvUploadResponse$Outbound = {
43
43
  revision: number;
44
- hash?: string | null | undefined;
45
- entries?: number | null | undefined;
44
+ hash: string;
45
+ entries: number;
46
46
  uploaded_at?: string | undefined;
47
- uploaded_by?: string | null | undefined;
47
+ uploaded_by: string;
48
48
  };
49
49
 
50
50
  /** @internal */
@@ -54,10 +54,10 @@ export const PronunciationsCsvUploadResponse$outboundSchema: z.ZodType<
54
54
  PronunciationsCsvUploadResponse
55
55
  > = z.object({
56
56
  revision: z.number().int(),
57
- hash: z.nullable(z.string()).optional(),
58
- entries: z.nullable(z.number().int()).optional(),
57
+ hash: z.string(),
58
+ entries: z.number().int(),
59
59
  uploadedAt: z.date().transform(v => v.toISOString()).optional(),
60
- uploadedBy: z.nullable(z.string()).optional(),
60
+ uploadedBy: z.string(),
61
61
  }).transform((v) => {
62
62
  return remap$(v, {
63
63
  uploadedAt: "uploaded_at",