syllable-sdk 1.0.2-rc.1 → 1.0.2-rc.11

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 (126) hide show
  1. package/README.md +2 -0
  2. package/bin/mcp-server.js +269 -142
  3. package/bin/mcp-server.js.map +26 -23
  4. package/docs/sdks/batches/README.md +4 -4
  5. package/docs/sdks/campaigns/README.md +24 -0
  6. package/docs/sdks/incidents/README.md +0 -8
  7. package/docs/sdks/prompts/README.md +4 -2
  8. package/docs/sdks/pronunciations/README.md +74 -5
  9. package/docs/sdks/workflows/README.md +8 -8
  10. package/examples/package-lock.json +1 -1
  11. package/funcs/pronunciationsPronunciationsDeleteCsv.d.ts +13 -0
  12. package/funcs/pronunciationsPronunciationsDeleteCsv.d.ts.map +1 -0
  13. package/funcs/pronunciationsPronunciationsDeleteCsv.js +101 -0
  14. package/funcs/pronunciationsPronunciationsDeleteCsv.js.map +1 -0
  15. package/funcs/pronunciationsPronunciationsDownloadCsv.d.ts +2 -1
  16. package/funcs/pronunciationsPronunciationsDownloadCsv.d.ts.map +1 -1
  17. package/funcs/pronunciationsPronunciationsDownloadCsv.js +10 -3
  18. package/funcs/pronunciationsPronunciationsDownloadCsv.js.map +1 -1
  19. package/jsr.json +1 -1
  20. package/lib/config.d.ts +3 -3
  21. package/lib/config.js +3 -3
  22. package/lib/config.js.map +1 -1
  23. package/mcp-server/mcp-server.js +1 -1
  24. package/mcp-server/mcp-server.js.map +1 -1
  25. package/mcp-server/server.d.ts.map +1 -1
  26. package/mcp-server/server.js +3 -1
  27. package/mcp-server/server.js.map +1 -1
  28. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.d.ts +3 -0
  29. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.d.ts.map +1 -0
  30. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.js +23 -0
  31. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.js.map +1 -0
  32. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.d.ts.map +1 -1
  33. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.js +2 -1
  34. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.js.map +1 -1
  35. package/models/components/campaignproperties.d.ts +3 -0
  36. package/models/components/campaignproperties.d.ts.map +1 -1
  37. package/models/components/campaignproperties.js +1 -0
  38. package/models/components/campaignproperties.js.map +1 -1
  39. package/models/components/dictionarymetadata.d.ts +2 -2
  40. package/models/components/dictionarymetadata.d.ts.map +1 -1
  41. package/models/components/dictionarymetadata.js +2 -2
  42. package/models/components/dictionarymetadata.js.map +1 -1
  43. package/models/components/incidentcreaterequest.d.ts +3 -1
  44. package/models/components/incidentcreaterequest.d.ts.map +1 -1
  45. package/models/components/incidentcreaterequest.js.map +1 -1
  46. package/models/components/incidentresponse.d.ts +3 -1
  47. package/models/components/incidentresponse.d.ts.map +1 -1
  48. package/models/components/incidentresponse.js.map +1 -1
  49. package/models/components/incidentupdaterequest.d.ts +3 -11
  50. package/models/components/incidentupdaterequest.d.ts.map +1 -1
  51. package/models/components/incidentupdaterequest.js +0 -8
  52. package/models/components/incidentupdaterequest.js.map +1 -1
  53. package/models/components/matchtype.d.ts +3 -0
  54. package/models/components/matchtype.d.ts.map +1 -1
  55. package/models/components/matchtype.js +1 -0
  56. package/models/components/matchtype.js.map +1 -1
  57. package/models/components/outboundcampaign.d.ts +9 -0
  58. package/models/components/outboundcampaign.d.ts.map +1 -1
  59. package/models/components/outboundcampaign.js +4 -0
  60. package/models/components/outboundcampaign.js.map +1 -1
  61. package/models/components/outboundcampaigninput.d.ts +9 -0
  62. package/models/components/outboundcampaigninput.d.ts.map +1 -1
  63. package/models/components/outboundcampaigninput.js +4 -0
  64. package/models/components/outboundcampaigninput.js.map +1 -1
  65. package/models/components/promptcreaterequest.d.ts +5 -0
  66. package/models/components/promptcreaterequest.d.ts.map +1 -1
  67. package/models/components/promptcreaterequest.js +4 -0
  68. package/models/components/promptcreaterequest.js.map +1 -1
  69. package/models/components/promptresponse.d.ts +5 -5
  70. package/models/components/promptresponse.d.ts.map +1 -1
  71. package/models/components/promptresponse.js +2 -2
  72. package/models/components/promptresponse.js.map +1 -1
  73. package/models/components/promptupdaterequest.d.ts +5 -5
  74. package/models/components/promptupdaterequest.d.ts.map +1 -1
  75. package/models/components/promptupdaterequest.js +2 -2
  76. package/models/components/promptupdaterequest.js.map +1 -1
  77. package/models/components/pronunciationoverride.d.ts +8 -29
  78. package/models/components/pronunciationoverride.d.ts.map +1 -1
  79. package/models/components/pronunciationoverride.js +9 -32
  80. package/models/components/pronunciationoverride.js.map +1 -1
  81. package/models/components/pronunciationscsvuploadresponse.d.ts +6 -6
  82. package/models/components/pronunciationscsvuploadresponse.d.ts.map +1 -1
  83. package/models/components/pronunciationscsvuploadresponse.js +6 -6
  84. package/models/components/pronunciationscsvuploadresponse.js.map +1 -1
  85. package/models/components/voicesamplecreaterequest.d.ts +10 -0
  86. package/models/components/voicesamplecreaterequest.d.ts.map +1 -1
  87. package/models/components/voicesamplecreaterequest.js +6 -0
  88. package/models/components/voicesamplecreaterequest.js.map +1 -1
  89. package/models/operations/index.d.ts +1 -0
  90. package/models/operations/index.d.ts.map +1 -1
  91. package/models/operations/index.js +1 -0
  92. package/models/operations/index.js.map +1 -1
  93. package/models/operations/pronunciationsdownloadcsv.d.ts +35 -0
  94. package/models/operations/pronunciationsdownloadcsv.d.ts.map +1 -0
  95. package/models/operations/pronunciationsdownloadcsv.js +82 -0
  96. package/models/operations/pronunciationsdownloadcsv.js.map +1 -0
  97. package/openapi.json +202 -164
  98. package/package.json +1 -1
  99. package/sdk/pronunciations.d.ts +6 -1
  100. package/sdk/pronunciations.d.ts.map +1 -1
  101. package/sdk/pronunciations.js +7 -0
  102. package/sdk/pronunciations.js.map +1 -1
  103. package/src/funcs/pronunciationsPronunciationsDeleteCsv.ts +139 -0
  104. package/src/funcs/pronunciationsPronunciationsDownloadCsv.ts +15 -7
  105. package/src/lib/config.ts +3 -3
  106. package/src/mcp-server/mcp-server.ts +1 -1
  107. package/src/mcp-server/server.ts +3 -1
  108. package/src/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.ts +26 -0
  109. package/src/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.ts +3 -1
  110. package/src/models/components/campaignproperties.ts +1 -0
  111. package/src/models/components/dictionarymetadata.ts +4 -4
  112. package/src/models/components/incidentcreaterequest.ts +3 -1
  113. package/src/models/components/incidentresponse.ts +3 -1
  114. package/src/models/components/incidentupdaterequest.ts +3 -23
  115. package/src/models/components/matchtype.ts +1 -0
  116. package/src/models/components/outboundcampaign.ts +9 -0
  117. package/src/models/components/outboundcampaigninput.ts +9 -0
  118. package/src/models/components/promptcreaterequest.ts +9 -0
  119. package/src/models/components/promptresponse.ts +7 -7
  120. package/src/models/components/promptupdaterequest.ts +7 -7
  121. package/src/models/components/pronunciationoverride.ts +16 -62
  122. package/src/models/components/pronunciationscsvuploadresponse.ts +12 -12
  123. package/src/models/components/voicesamplecreaterequest.ts +16 -0
  124. package/src/models/operations/index.ts +1 -0
  125. package/src/models/operations/pronunciationsdownloadcsv.ts +84 -0
  126. package/src/sdk/pronunciations.ts +15 -1
@@ -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",
@@ -47,6 +47,14 @@ export type VoiceSampleCreateRequest = {
47
47
  * Pitch of the voice in the range of -20.0 to 20.0. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch. 0 means use the original pitch. Only supported for Google configs.
48
48
  */
49
49
  voicePitch?: number | null | undefined;
50
+ /**
51
+ * Text to generate for this voice.
52
+ */
53
+ text?: string | undefined;
54
+ /**
55
+ * Apply TTS pronunciation fixes.
56
+ */
57
+ applyPronunciationOverrides?: boolean | undefined;
50
58
  };
51
59
 
52
60
  /** @internal */
@@ -60,6 +68,8 @@ export const VoiceSampleCreateRequest$inboundSchema: z.ZodType<
60
68
  voice_display_name: AgentVoiceDisplayName$inboundSchema,
61
69
  voice_speed: z.nullable(z.number()).optional(),
62
70
  voice_pitch: z.nullable(z.number()).optional(),
71
+ text: z.string().default(""),
72
+ apply_pronunciation_overrides: z.boolean().default(false),
63
73
  }).transform((v) => {
64
74
  return remap$(v, {
65
75
  "language_code": "languageCode",
@@ -67,6 +77,7 @@ export const VoiceSampleCreateRequest$inboundSchema: z.ZodType<
67
77
  "voice_display_name": "voiceDisplayName",
68
78
  "voice_speed": "voiceSpeed",
69
79
  "voice_pitch": "voicePitch",
80
+ "apply_pronunciation_overrides": "applyPronunciationOverrides",
70
81
  });
71
82
  });
72
83
 
@@ -77,6 +88,8 @@ export type VoiceSampleCreateRequest$Outbound = {
77
88
  voice_display_name: string;
78
89
  voice_speed?: number | null | undefined;
79
90
  voice_pitch?: number | null | undefined;
91
+ text: string;
92
+ apply_pronunciation_overrides: boolean;
80
93
  };
81
94
 
82
95
  /** @internal */
@@ -90,6 +103,8 @@ export const VoiceSampleCreateRequest$outboundSchema: z.ZodType<
90
103
  voiceDisplayName: AgentVoiceDisplayName$outboundSchema,
91
104
  voiceSpeed: z.nullable(z.number()).optional(),
92
105
  voicePitch: z.nullable(z.number()).optional(),
106
+ text: z.string().default(""),
107
+ applyPronunciationOverrides: z.boolean().default(false),
93
108
  }).transform((v) => {
94
109
  return remap$(v, {
95
110
  languageCode: "language_code",
@@ -97,6 +112,7 @@ export const VoiceSampleCreateRequest$outboundSchema: z.ZodType<
97
112
  voiceDisplayName: "voice_display_name",
98
113
  voiceSpeed: "voice_speed",
99
114
  voicePitch: "voice_pitch",
115
+ applyPronunciationOverrides: "apply_pronunciation_overrides",
100
116
  });
101
117
  });
102
118
 
@@ -70,6 +70,7 @@ export * from "./promptsdelete.js";
70
70
  export * from "./promptsgetbyid.js";
71
71
  export * from "./promptshistory.js";
72
72
  export * from "./promptslist.js";
73
+ export * from "./pronunciationsdownloadcsv.js";
73
74
  export * from "./rolesdelete.js";
74
75
  export * from "./rolesgetbyid.js";
75
76
  export * from "./roleslist.js";
@@ -0,0 +1,84 @@
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 PronunciationsDownloadCsvResponse = {
12
+ headers: { [k: string]: Array<string> };
13
+ result: ReadableStream<Uint8Array>;
14
+ };
15
+
16
+ /** @internal */
17
+ export const PronunciationsDownloadCsvResponse$inboundSchema: z.ZodType<
18
+ PronunciationsDownloadCsvResponse,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ Headers: z.record(z.array(z.string())),
23
+ Result: z.instanceof(ReadableStream<Uint8Array>),
24
+ }).transform((v) => {
25
+ return remap$(v, {
26
+ "Headers": "headers",
27
+ "Result": "result",
28
+ });
29
+ });
30
+
31
+ /** @internal */
32
+ export type PronunciationsDownloadCsvResponse$Outbound = {
33
+ Headers: { [k: string]: Array<string> };
34
+ Result: ReadableStream<Uint8Array>;
35
+ };
36
+
37
+ /** @internal */
38
+ export const PronunciationsDownloadCsvResponse$outboundSchema: z.ZodType<
39
+ PronunciationsDownloadCsvResponse$Outbound,
40
+ z.ZodTypeDef,
41
+ PronunciationsDownloadCsvResponse
42
+ > = z.object({
43
+ headers: z.record(z.array(z.string())),
44
+ result: z.instanceof(ReadableStream<Uint8Array>),
45
+ }).transform((v) => {
46
+ return remap$(v, {
47
+ headers: "Headers",
48
+ result: "Result",
49
+ });
50
+ });
51
+
52
+ /**
53
+ * @internal
54
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
55
+ */
56
+ export namespace PronunciationsDownloadCsvResponse$ {
57
+ /** @deprecated use `PronunciationsDownloadCsvResponse$inboundSchema` instead. */
58
+ export const inboundSchema = PronunciationsDownloadCsvResponse$inboundSchema;
59
+ /** @deprecated use `PronunciationsDownloadCsvResponse$outboundSchema` instead. */
60
+ export const outboundSchema =
61
+ PronunciationsDownloadCsvResponse$outboundSchema;
62
+ /** @deprecated use `PronunciationsDownloadCsvResponse$Outbound` instead. */
63
+ export type Outbound = PronunciationsDownloadCsvResponse$Outbound;
64
+ }
65
+
66
+ export function pronunciationsDownloadCsvResponseToJSON(
67
+ pronunciationsDownloadCsvResponse: PronunciationsDownloadCsvResponse,
68
+ ): string {
69
+ return JSON.stringify(
70
+ PronunciationsDownloadCsvResponse$outboundSchema.parse(
71
+ pronunciationsDownloadCsvResponse,
72
+ ),
73
+ );
74
+ }
75
+
76
+ export function pronunciationsDownloadCsvResponseFromJSON(
77
+ jsonString: string,
78
+ ): SafeParseResult<PronunciationsDownloadCsvResponse, SDKValidationError> {
79
+ return safeParse(
80
+ jsonString,
81
+ (x) => PronunciationsDownloadCsvResponse$inboundSchema.parse(JSON.parse(x)),
82
+ `Failed to parse 'PronunciationsDownloadCsvResponse' from JSON`,
83
+ );
84
+ }
@@ -2,12 +2,14 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { pronunciationsPronunciationsDeleteCsv } from "../funcs/pronunciationsPronunciationsDeleteCsv.js";
5
6
  import { pronunciationsPronunciationsDownloadCsv } from "../funcs/pronunciationsPronunciationsDownloadCsv.js";
6
7
  import { pronunciationsPronunciationsGet } from "../funcs/pronunciationsPronunciationsGet.js";
7
8
  import { pronunciationsPronunciationsGetMetadata } from "../funcs/pronunciationsPronunciationsGetMetadata.js";
8
9
  import { pronunciationsPronunciationsUploadCsv } from "../funcs/pronunciationsPronunciationsUploadCsv.js";
9
10
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
10
11
  import * as components from "../models/components/index.js";
12
+ import * as operations from "../models/operations/index.js";
11
13
  import { unwrapAsync } from "../types/fp.js";
12
14
 
13
15
  export class Pronunciations extends ClientSDK {
@@ -40,7 +42,7 @@ export class Pronunciations extends ClientSDK {
40
42
  */
41
43
  async pronunciationsDownloadCsv(
42
44
  options?: RequestOptions,
43
- ): Promise<void> {
45
+ ): Promise<operations.PronunciationsDownloadCsvResponse> {
44
46
  return unwrapAsync(pronunciationsPronunciationsDownloadCsv(
45
47
  this,
46
48
  options,
@@ -60,4 +62,16 @@ export class Pronunciations extends ClientSDK {
60
62
  options,
61
63
  ));
62
64
  }
65
+
66
+ /**
67
+ * Delete Pronunciations Dictionary
68
+ */
69
+ async pronunciationsDeleteCsv(
70
+ options?: RequestOptions,
71
+ ): Promise<void> {
72
+ return unwrapAsync(pronunciationsPronunciationsDeleteCsv(
73
+ this,
74
+ options,
75
+ ));
76
+ }
63
77
  }