@breign/client 1.0.94 → 1.0.95

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.
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AnimationCreateRequestUio, AppChatCreateRequestUio, AppChatCreateResponseUio, AppChatSayRequestUio, AppChatSayResponseUio, AppChatSubmitMessageRequestUio, AppConfigurationUio, AppCreateRequestUio, AppFlowCreateRequestUio, AppInstanceCreateRequestUio, AppInstanceListItemUio, AppLightUio, AppProbeRequestUio, AppProbeResponseUio, AppStatusRequestUio, AppStatusResponseUio, AppSubmitMessageRequestUio, AppTextToSpeechRequestUio, AppTextToSpeechResponseUio, AppUio, AppUpdateRequestUio, AudioFileUio, AudioFillerExistsResponseUio, BodyWithIdUio, BodyWithMessageUio, ConversationUio, DeleteMessageAudio200ResponseUio, FileCreationRequestUio, FileCreationResponseUio, FillersArrayInnerUio, FlowUio, S3UploadBodyUio, SequenceCreateRequestUio } from '../models/index';
13
+ import type { AnimationCreateRequestUio, AppChatCreateRequestUio, AppChatCreateResponseUio, AppChatSayRequestUio, AppChatSayResponseUio, AppChatSubmitMessageRequestUio, AppConfigurationUio, AppCreateRequestUio, AppFlowCreateRequestUio, AppInstanceCreateRequestUio, AppInstanceListItemUio, AppLightUio, AppProbeRequestUio, AppProbeResponseUio, AppStatusRequestUio, AppStatusResponseUio, AppSubmitMessageRequestUio, AppTextToSpeechRequestUio, AppTextToSpeechResponseUio, AppUio, AppUpdateRequestUio, AppVoiceValidateRequestUio, AppVoiceValidateResponseUio, AudioFileUio, AudioFillerExistsResponseUio, BodyWithIdUio, BodyWithMessageUio, ConversationUio, DeleteMessageAudio200ResponseUio, FileCreationRequestUio, FileCreationResponseUio, FillersArrayInnerUio, FlowUio, S3UploadBodyUio, SequenceCreateRequestUio } from '../models/index';
14
14
  export interface AddAnimationRequest {
15
15
  appId: string;
16
16
  animationCreateRequestUio: AnimationCreateRequestUio;
@@ -156,6 +156,10 @@ export interface UpdateAppProfilePictureRequest {
156
156
  appId: string;
157
157
  fileCreationRequestUio: FileCreationRequestUio;
158
158
  }
159
+ export interface ValidateAppVoiceRequest {
160
+ appId: string;
161
+ appVoiceValidateRequestUio: AppVoiceValidateRequestUio;
162
+ }
159
163
  /**
160
164
  *
161
165
  */
@@ -492,4 +496,14 @@ export declare class AppApi extends runtime.BaseAPI {
492
496
  * Update profile picture for an app
493
497
  */
494
498
  updateAppProfilePicture(appId: string, fileCreationRequestUio: FileCreationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<S3UploadBodyUio>;
499
+ /**
500
+ * Validate voice provider, model and voice id without persisting app settings
501
+ * Validate app voice settings
502
+ */
503
+ validateAppVoiceRaw(requestParameters: ValidateAppVoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppVoiceValidateResponseUio>>;
504
+ /**
505
+ * Validate voice provider, model and voice id without persisting app settings
506
+ * Validate app voice settings
507
+ */
508
+ validateAppVoice(appId: string, appVoiceValidateRequestUio: AppVoiceValidateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppVoiceValidateResponseUio>;
495
509
  }
@@ -1178,5 +1178,39 @@ class AppApi extends runtime.BaseAPI {
1178
1178
  const response = await this.updateAppProfilePictureRaw({ appId: appId, fileCreationRequestUio: fileCreationRequestUio }, initOverrides);
1179
1179
  return await response.value();
1180
1180
  }
1181
+ /**
1182
+ * Validate voice provider, model and voice id without persisting app settings
1183
+ * Validate app voice settings
1184
+ */
1185
+ async validateAppVoiceRaw(requestParameters, initOverrides) {
1186
+ if (requestParameters['appId'] == null) {
1187
+ throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling validateAppVoice().');
1188
+ }
1189
+ if (requestParameters['appVoiceValidateRequestUio'] == null) {
1190
+ throw new runtime.RequiredError('appVoiceValidateRequestUio', 'Required parameter "appVoiceValidateRequestUio" was null or undefined when calling validateAppVoice().');
1191
+ }
1192
+ const queryParameters = {};
1193
+ const headerParameters = {};
1194
+ headerParameters['Content-Type'] = 'application/json';
1195
+ if (this.configuration && this.configuration.apiKey) {
1196
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1197
+ }
1198
+ const response = await this.request({
1199
+ path: `/apps/{appId}/voice/validate`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))),
1200
+ method: 'POST',
1201
+ headers: headerParameters,
1202
+ query: queryParameters,
1203
+ body: (0, index_1.AppVoiceValidateRequestUioToJSON)(requestParameters['appVoiceValidateRequestUio']),
1204
+ }, initOverrides);
1205
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AppVoiceValidateResponseUioFromJSON)(jsonValue));
1206
+ }
1207
+ /**
1208
+ * Validate voice provider, model and voice id without persisting app settings
1209
+ * Validate app voice settings
1210
+ */
1211
+ async validateAppVoice(appId, appVoiceValidateRequestUio, initOverrides) {
1212
+ const response = await this.validateAppVoiceRaw({ appId: appId, appVoiceValidateRequestUio: appVoiceValidateRequestUio }, initOverrides);
1213
+ return await response.value();
1214
+ }
1181
1215
  }
1182
1216
  exports.AppApi = AppApi;
@@ -0,0 +1,50 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AppVoiceValidateRequestUio
16
+ */
17
+ export interface AppVoiceValidateRequestUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AppVoiceValidateRequestUio
22
+ */
23
+ voiceProvider: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AppVoiceValidateRequestUio
28
+ */
29
+ voiceModelId: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof AppVoiceValidateRequestUio
34
+ */
35
+ voiceId: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof AppVoiceValidateRequestUio
40
+ */
41
+ text?: string;
42
+ }
43
+ /**
44
+ * Check if a given object implements the AppVoiceValidateRequestUio interface.
45
+ */
46
+ export declare function instanceOfAppVoiceValidateRequestUio(value: object): value is AppVoiceValidateRequestUio;
47
+ export declare function AppVoiceValidateRequestUioFromJSON(json: any): AppVoiceValidateRequestUio;
48
+ export declare function AppVoiceValidateRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppVoiceValidateRequestUio;
49
+ export declare function AppVoiceValidateRequestUioToJSON(json: any): AppVoiceValidateRequestUio;
50
+ export declare function AppVoiceValidateRequestUioToJSONTyped(value?: AppVoiceValidateRequestUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAppVoiceValidateRequestUio = instanceOfAppVoiceValidateRequestUio;
17
+ exports.AppVoiceValidateRequestUioFromJSON = AppVoiceValidateRequestUioFromJSON;
18
+ exports.AppVoiceValidateRequestUioFromJSONTyped = AppVoiceValidateRequestUioFromJSONTyped;
19
+ exports.AppVoiceValidateRequestUioToJSON = AppVoiceValidateRequestUioToJSON;
20
+ exports.AppVoiceValidateRequestUioToJSONTyped = AppVoiceValidateRequestUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AppVoiceValidateRequestUio interface.
23
+ */
24
+ function instanceOfAppVoiceValidateRequestUio(value) {
25
+ if (!('voiceProvider' in value) || value['voiceProvider'] === undefined)
26
+ return false;
27
+ if (!('voiceModelId' in value) || value['voiceModelId'] === undefined)
28
+ return false;
29
+ if (!('voiceId' in value) || value['voiceId'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function AppVoiceValidateRequestUioFromJSON(json) {
34
+ return AppVoiceValidateRequestUioFromJSONTyped(json, false);
35
+ }
36
+ function AppVoiceValidateRequestUioFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'voiceProvider': json['voiceProvider'],
42
+ 'voiceModelId': json['voiceModelId'],
43
+ 'voiceId': json['voiceId'],
44
+ 'text': json['text'] == null ? undefined : json['text'],
45
+ };
46
+ }
47
+ function AppVoiceValidateRequestUioToJSON(json) {
48
+ return AppVoiceValidateRequestUioToJSONTyped(json, false);
49
+ }
50
+ function AppVoiceValidateRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'voiceProvider': value['voiceProvider'],
56
+ 'voiceModelId': value['voiceModelId'],
57
+ 'voiceId': value['voiceId'],
58
+ 'text': value['text'],
59
+ };
60
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AppVoiceValidateResponseUio
16
+ */
17
+ export interface AppVoiceValidateResponseUio {
18
+ /**
19
+ *
20
+ * @type {boolean}
21
+ * @memberof AppVoiceValidateResponseUio
22
+ */
23
+ ok: boolean;
24
+ }
25
+ /**
26
+ * Check if a given object implements the AppVoiceValidateResponseUio interface.
27
+ */
28
+ export declare function instanceOfAppVoiceValidateResponseUio(value: object): value is AppVoiceValidateResponseUio;
29
+ export declare function AppVoiceValidateResponseUioFromJSON(json: any): AppVoiceValidateResponseUio;
30
+ export declare function AppVoiceValidateResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppVoiceValidateResponseUio;
31
+ export declare function AppVoiceValidateResponseUioToJSON(json: any): AppVoiceValidateResponseUio;
32
+ export declare function AppVoiceValidateResponseUioToJSONTyped(value?: AppVoiceValidateResponseUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAppVoiceValidateResponseUio = instanceOfAppVoiceValidateResponseUio;
17
+ exports.AppVoiceValidateResponseUioFromJSON = AppVoiceValidateResponseUioFromJSON;
18
+ exports.AppVoiceValidateResponseUioFromJSONTyped = AppVoiceValidateResponseUioFromJSONTyped;
19
+ exports.AppVoiceValidateResponseUioToJSON = AppVoiceValidateResponseUioToJSON;
20
+ exports.AppVoiceValidateResponseUioToJSONTyped = AppVoiceValidateResponseUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AppVoiceValidateResponseUio interface.
23
+ */
24
+ function instanceOfAppVoiceValidateResponseUio(value) {
25
+ if (!('ok' in value) || value['ok'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function AppVoiceValidateResponseUioFromJSON(json) {
30
+ return AppVoiceValidateResponseUioFromJSONTyped(json, false);
31
+ }
32
+ function AppVoiceValidateResponseUioFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'ok': json['ok'],
38
+ };
39
+ }
40
+ function AppVoiceValidateResponseUioToJSON(json) {
41
+ return AppVoiceValidateResponseUioToJSONTyped(json, false);
42
+ }
43
+ function AppVoiceValidateResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'ok': value['ok'],
49
+ };
50
+ }
@@ -61,6 +61,8 @@ export * from './AppTextToSpeechRequestUio';
61
61
  export * from './AppTextToSpeechResponseUio';
62
62
  export * from './AppUio';
63
63
  export * from './AppUpdateRequestUio';
64
+ export * from './AppVoiceValidateRequestUio';
65
+ export * from './AppVoiceValidateResponseUio';
64
66
  export * from './AttachmentCreateRequestUio';
65
67
  export * from './AttachmentCreateResponseUio';
66
68
  export * from './AttachmentDetailsResponseUio';
@@ -79,6 +79,8 @@ __exportStar(require("./AppTextToSpeechRequestUio"), exports);
79
79
  __exportStar(require("./AppTextToSpeechResponseUio"), exports);
80
80
  __exportStar(require("./AppUio"), exports);
81
81
  __exportStar(require("./AppUpdateRequestUio"), exports);
82
+ __exportStar(require("./AppVoiceValidateRequestUio"), exports);
83
+ __exportStar(require("./AppVoiceValidateResponseUio"), exports);
82
84
  __exportStar(require("./AttachmentCreateRequestUio"), exports);
83
85
  __exportStar(require("./AttachmentCreateResponseUio"), exports);
84
86
  __exportStar(require("./AttachmentDetailsResponseUio"), exports);
package/dist/openapi.json CHANGED
@@ -2573,6 +2573,51 @@
2573
2573
  "tags" : [ "app" ]
2574
2574
  }
2575
2575
  },
2576
+ "/apps/{appId}/voice/validate" : {
2577
+ "post" : {
2578
+ "description" : "Validate voice provider, model and voice id without persisting app settings",
2579
+ "operationId" : "validateAppVoice",
2580
+ "parameters" : [ {
2581
+ "description" : "ID of the app",
2582
+ "in" : "path",
2583
+ "name" : "appId",
2584
+ "required" : true,
2585
+ "schema" : {
2586
+ "type" : "string"
2587
+ }
2588
+ } ],
2589
+ "requestBody" : {
2590
+ "content" : {
2591
+ "application/json" : {
2592
+ "schema" : {
2593
+ "$ref" : "#/components/schemas/AppVoiceValidateRequest"
2594
+ }
2595
+ }
2596
+ },
2597
+ "required" : true
2598
+ },
2599
+ "responses" : {
2600
+ "200" : {
2601
+ "content" : {
2602
+ "application/json" : {
2603
+ "schema" : {
2604
+ "$ref" : "#/components/schemas/AppVoiceValidateResponse"
2605
+ }
2606
+ }
2607
+ },
2608
+ "description" : "Voice settings are valid"
2609
+ },
2610
+ "400" : {
2611
+ "description" : "Invalid voice settings"
2612
+ },
2613
+ "404" : {
2614
+ "description" : "App not found"
2615
+ }
2616
+ },
2617
+ "summary" : "Validate app voice settings",
2618
+ "tags" : [ "app" ]
2619
+ }
2620
+ },
2576
2621
  "/apps/{appId}/instances" : {
2577
2622
  "get" : {
2578
2623
  "description" : "List persisted instances for an app (excludes ephemeral instances)",
@@ -10869,6 +10914,33 @@
10869
10914
  "required" : [ "audio" ],
10870
10915
  "type" : "object"
10871
10916
  },
10917
+ "AppVoiceValidateRequest" : {
10918
+ "properties" : {
10919
+ "voiceProvider" : {
10920
+ "type" : "string"
10921
+ },
10922
+ "voiceModelId" : {
10923
+ "type" : "string"
10924
+ },
10925
+ "voiceId" : {
10926
+ "type" : "string"
10927
+ },
10928
+ "text" : {
10929
+ "type" : "string"
10930
+ }
10931
+ },
10932
+ "required" : [ "voiceId", "voiceModelId", "voiceProvider" ],
10933
+ "type" : "object"
10934
+ },
10935
+ "AppVoiceValidateResponse" : {
10936
+ "properties" : {
10937
+ "ok" : {
10938
+ "type" : "boolean"
10939
+ }
10940
+ },
10941
+ "required" : [ "ok" ],
10942
+ "type" : "object"
10943
+ },
10872
10944
  "AppInstanceListItem" : {
10873
10945
  "properties" : {
10874
10946
  "id" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.94",
3
+ "version": "1.0.95",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",