@maxim_mazurok/gapi.client.texttospeech-v1 0.2.20260312 → 0.2.20260602

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 (3) hide show
  1. package/index.d.ts +26 -3
  2. package/package.json +1 -1
  3. package/readme.md +17 -0
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://texttospeech.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20260312
12
+ // Revision: 20260602
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -29,8 +29,10 @@ declare namespace gapi.client {
29
29
  enableTextnorm?: boolean;
30
30
  /** Only for Journey voices. If false, the synthesis is context aware and has a higher latency. */
31
31
  lowLatencyJourneySynthesis?: boolean;
32
- /** Optional. Input only. If true, relaxes safety filters for Gemini TTS. */
32
+ /** Optional. Input only. Deprecated, use safety_settings instead. If true, relaxes safety filters for Gemini TTS. */
33
33
  relaxSafetyFilters?: boolean;
34
+ /** Optional. Input only. This applies to Gemini TTS only. If set, the category specified in the safety setting will be blocked if the harm probability is above the threshold. Otherwise, the safety filter will be disabled by default. */
35
+ safetySettings?: SafetySettings;
34
36
  }
35
37
  interface AudioConfig {
36
38
  /** Required. The format of the audio byte stream. */
@@ -125,11 +127,32 @@ declare namespace gapi.client {
125
127
  /** The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */
126
128
  response?: {[P in string]: any};
127
129
  }
130
+ interface SafetySetting {
131
+ /** The harm category to apply the safety setting to. */
132
+ category?:
133
+ | 'HARM_CATEGORY_UNSPECIFIED'
134
+ | 'HARM_CATEGORY_HATE_SPEECH'
135
+ | 'HARM_CATEGORY_DANGEROUS_CONTENT'
136
+ | 'HARM_CATEGORY_HARASSMENT'
137
+ | 'HARM_CATEGORY_SEXUALLY_EXPLICIT';
138
+ /** The harm block threshold for the safety setting. */
139
+ threshold?:
140
+ | 'HARM_BLOCK_THRESHOLD_UNSPECIFIED'
141
+ | 'BLOCK_LOW_AND_ABOVE'
142
+ | 'BLOCK_MEDIUM_AND_ABOVE'
143
+ | 'BLOCK_ONLY_HIGH'
144
+ | 'BLOCK_NONE'
145
+ | 'OFF';
146
+ }
147
+ interface SafetySettings {
148
+ /** The safety settings for the request. */
149
+ settings?: SafetySetting[];
150
+ }
128
151
  interface Status {
129
152
  /** The status code, which should be an enum value of google.rpc.Code. */
130
153
  code?: number;
131
154
  /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
132
- details?: Array<{[P in string]: any}>;
155
+ details?: {[P in string]: any}[];
133
156
  /** A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */
134
157
  message?: string;
135
158
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.texttospeech-v1",
3
- "version": "0.2.20260312",
3
+ "version": "0.2.20260602",
4
4
  "description": "TypeScript typings for Cloud Text-to-Speech API v1",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -11,6 +11,23 @@ Install typings for Cloud Text-to-Speech API:
11
11
  npm install @types/gapi.client.texttospeech-v1 --save-dev
12
12
  ```
13
13
 
14
+ ## TypeScript 6.0+
15
+
16
+ TypeScript 6.0 changed `types` to default to `[]`. You must now explicitly list type packages in `tsconfig.json`:
17
+
18
+ ```json
19
+ {
20
+ "compilerOptions": {
21
+ "types": [
22
+ "gapi",
23
+ "gapi.auth2",
24
+ "gapi.client",
25
+ "gapi.client.texttospeech-v1"
26
+ ]
27
+ }
28
+ }
29
+ ```
30
+
14
31
  ## Usage
15
32
 
16
33
  You need to initialize Google API client in your code: