@webitel/api-services 26.12.16 → 26.12.18
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.
- package/package.json +1 -1
- package/src/api/clients/media/media.ts +100 -67
- package/src/enums/TtsGoogleVoice/TtsGoogleVoice.ts +336 -0
- package/src/enums/TtsMicrosoftVoice/TtsMicrosoftVoice.ts +7 -0
- package/src/enums/TtsTextType/TtsTextType.ts +6 -0
- package/src/enums/index.ts +7 -0
- package/src/validations/index.ts +2 -0
- package/src/validations/quickReply/__tests__/quickReply.validations.spec.ts +51 -0
- package/src/validations/quickReply/quickReply.validations.ts +12 -0
- package/src/validations/textToSpeech/__tests__/textToSpeech.validations.spec.ts +47 -0
- package/src/validations/textToSpeech/textToSpeech.validations.ts +10 -0
- package/types/.tsbuildinfo +1 -1
- package/types/api/clients/media/media.d.ts +28 -7
- package/types/enums/TtsGoogleVoice/TtsGoogleVoice.d.ts +7 -0
- package/types/enums/TtsMicrosoftVoice/TtsMicrosoftVoice.d.ts +5 -0
- package/types/enums/TtsTextType/TtsTextType.d.ts +5 -0
- package/types/enums/index.d.ts +5 -1
- package/types/validations/index.d.ts +2 -0
- package/types/validations/quickReply/quickReply.validations.d.ts +13 -0
- package/types/validations/textToSpeech/textToSpeech.validations.d.ts +10 -0
|
@@ -1,22 +1,43 @@
|
|
|
1
|
-
import type { ApiId, ApiParams, DeleteItemParams
|
|
1
|
+
import type { ApiId, ApiParams, DeleteItemParams } from '../_shared/types';
|
|
2
|
+
/** [Claude] The app passes these: the API base URL and token are its concern, not this package's */
|
|
3
|
+
export type MediaUrlAuth = {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
accessToken: string;
|
|
6
|
+
};
|
|
2
7
|
declare const getMediaList: (params: ApiParams) => Promise<{
|
|
3
8
|
items: any;
|
|
4
9
|
next: any;
|
|
5
10
|
}>;
|
|
6
|
-
export declare const downloadMedia: (id: ApiId) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
7
11
|
export declare const downloadFile: (id: ApiId, fileName?: string) => Promise<void>;
|
|
8
|
-
export declare const getCallMediaUrl: (id: ApiId, { download, }
|
|
12
|
+
export declare const getCallMediaUrl: (id: ApiId, { auth, download, }: {
|
|
13
|
+
auth: MediaUrlAuth;
|
|
9
14
|
download?: boolean;
|
|
10
15
|
}) => string;
|
|
11
|
-
export declare const getMediaStreamUrl: (id: ApiId
|
|
12
|
-
|
|
16
|
+
export declare const getMediaStreamUrl: (id: ApiId, { auth, }: {
|
|
17
|
+
auth: MediaUrlAuth;
|
|
18
|
+
}) => string;
|
|
19
|
+
export declare const getMediaDownloadUrl: (id: ApiId, { auth, }: {
|
|
20
|
+
auth: MediaUrlAuth;
|
|
21
|
+
}) => string;
|
|
22
|
+
export declare const getMediaUrl: (id: ApiId, { auth, isThumb, }: {
|
|
23
|
+
auth: MediaUrlAuth;
|
|
24
|
+
isThumb?: boolean;
|
|
25
|
+
}) => string;
|
|
26
|
+
export type TextToSpeechParams = {
|
|
27
|
+
profileId: string;
|
|
28
|
+
textType: string;
|
|
29
|
+
language: string;
|
|
30
|
+
voice: string;
|
|
31
|
+
format: string;
|
|
32
|
+
text: string;
|
|
33
|
+
};
|
|
13
34
|
export declare const MediaAPI: {
|
|
14
35
|
getList: (params: ApiParams) => Promise<{
|
|
15
36
|
items: any;
|
|
16
37
|
next: any;
|
|
17
38
|
}>;
|
|
18
|
-
|
|
19
|
-
|
|
39
|
+
upload: (files: File[]) => Promise<any>;
|
|
40
|
+
generateTts: (params: TextToSpeechParams) => Promise<Blob>;
|
|
20
41
|
delete: ({ id }: DeleteItemParams) => Promise<any>;
|
|
21
42
|
getLookup: (params: Parameters<typeof getMediaList>[0]) => Promise<{
|
|
22
43
|
items: any;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [Claude] Google voice names a TTS profile accepts; a form filters them by the
|
|
3
|
+
* language prefix (e.g. `uk-UA`). Moved from webitel-flow-diagram and the admin
|
|
4
|
+
* media page, which kept their own copies.
|
|
5
|
+
*/
|
|
6
|
+
export declare const TtsGoogleVoiceList: readonly ["ro-RO-Wavenet-A", "ms-MY-Standard-A", "ms-MY-Standard-B", "ms-MY-Standard-C", "ms-MY-Standard-D", "id-ID-Standard-A", "id-ID-Standard-B", "id-ID-Standard-C", "id-ID-Standard-D", "nl-BE-Standard-A", "nl-BE-Standard-B", "nl-NL-Standard-B", "nl-NL-Standard-C", "nl-NL-Standard-D", "nl-NL-Standard-E", "nl-NL-Standard-A", "fil-PH-Standard-B", "fil-PH-Standard-C", "fil-PH-Standard-D", "fil-PH-Standard-A", "yue-HK-Standard-A", "yue-HK-Standard-B", "yue-HK-Standard-C", "yue-HK-Standard-D", "fr-FR-Standard-A", "fr-FR-Standard-B", "fr-FR-Standard-C", "fr-FR-Standard-D", "de-DE-Standard-E", "de-DE-Standard-A", "de-DE-Standard-B", "de-DE-Standard-C", "de-DE-Standard-D", "de-DE-Standard-F", "fr-CA-Standard-A", "fr-CA-Standard-B", "fr-CA-Standard-C", "fr-CA-Standard-D", "it-IT-Standard-B", "it-IT-Standard-C", "it-IT-Standard-D", "en-AU-Standard-A", "en-AU-Standard-B", "en-AU-Standard-C", "en-AU-Standard-D", "en-GB-Standard-A", "en-GB-Standard-B", "en-GB-Standard-C", "en-GB-Standard-D", "en-GB-Standard-F", "cs-CZ-Standard-A", "el-GR-Standard-A", "pt-BR-Standard-A", "es-US-Standard-A", "es-US-Standard-B", "es-US-Standard-C", "th-TH-Standard-A", "bn-IN-Standard-A", "bn-IN-Standard-B", "en-IN-Standard-D", "en-IN-Standard-A", "en-IN-Standard-B", "en-IN-Standard-C", "gu-IN-Standard-A", "gu-IN-Standard-B", "hi-IN-Standard-D", "hi-IN-Standard-A", "hi-IN-Standard-B", "hi-IN-Standard-C", "kn-IN-Standard-A", "kn-IN-Standard-B", "ml-IN-Standard-A", "ml-IN-Standard-B", "ta-IN-Standard-A", "ta-IN-Standard-B", "te-IN-Standard-A", "te-IN-Standard-B", "pa-IN-Standard-A", "pa-IN-Standard-B", "pa-IN-Standard-C", "pa-IN-Standard-D", "da-DK-Standard-A", "da-DK-Standard-C", "da-DK-Standard-D", "da-DK-Standard-E", "fi-FI-Standard-A", "is-is-Standard-A", "sv-SE-Standard-A", "nb-NO-Standard-A", "nb-NO-Standard-B", "nb-NO-Standard-C", "nb-NO-Standard-D", "nb-no-Standard-E", "pt-PT-Standard-A", "pt-PT-Standard-B", "pt-PT-Standard-C", "pt-PT-Standard-D", "af-ZA-Standard-A", "bg-bg-Standard-A", "hu-HU-Standard-A", "lv-lv-Standard-A", "pl-PL-Standard-E", "ro-RO-Standard-A", "sk-SK-Standard-A", "sr-rs-Standard-A", "uk-UA-Chirp3-HD-Achernar", "uk-UA-Chirp3-HD-Achird", "uk-UA-Chirp3-HD-Algenib", "uk-UA-Chirp3-HD-Algieba", "uk-UA-Chirp3-HD-Alnilam", "uk-UA-Chirp3-HD-Autonoe", "uk-UA-Chirp3-HD-Callirrhoe", "uk-UA-Chirp3-HD-Despina", "uk-UA-Chirp3-HD-Enceladus", "uk-UA-Chirp3-HD-Erinome", "uk-UA-Chirp3-HD-Gacrux", "uk-UA-Chirp3-HD-Iapetus", "uk-UA-Chirp3-HD-Laomedeia", "uk-UA-Chirp3-HD-Pulcherrima", "uk-UA-Chirp3-HD-Rasalgethi", "uk-UA-Chirp3-HD-Sadachbia", "uk-UA-Chirp3-HD-Sadaltager", "uk-UA-Chirp3-HD-Schedar", "uk-UA-Chirp3-HD-Sulafat", "uk-UA-Chirp3-HD-Umbriel", "uk-UA-Chirp3-HD-Vindemiatrix", "uk-UA-Chirp3-HD-Zubenelgenubi", "uk-UA-Standard-B", "uk-UA-Wavenet-B", "pl-PL-Standard-A", "pl-PL-Standard-B", "pl-PL-Standard-C", "pl-PL-Standard-D", "tr-TR-Standard-B", "tr-TR-Standard-C", "tr-TR-Standard-D", "tr-TR-Standard-E", "tr-TR-Standard-A", "ca-es-Standard-A", "es-ES-Standard-C", "es-ES-Standard-D", "es-ES-Standard-B", "es-ES-Standard-A", "ar-XA-Standard-A", "ar-XA-Standard-B", "ar-XA-Standard-C", "ar-XA-Standard-D", "fr-FR-Standard-E", "it-IT-Standard-A", "ru-RU-Standard-E", "ru-RU-Standard-A", "ru-RU-Standard-B", "ru-RU-Standard-C", "ru-RU-Standard-D", "en-US-Standard-A", "en-US-Standard-B", "en-US-Standard-C", "en-US-Standard-D", "en-US-Standard-E", "en-US-Standard-F", "en-US-Standard-G", "en-US-Standard-H", "en-US-Standard-I", "en-US-Standard-J", "cmn-CN-Standard-C", "cmn-CN-Standard-B", "cmn-CN-Standard-A", "cmn-CN-Standard-D", "ja-JP-Standard-A", "ja-JP-Standard-B", "ja-JP-Standard-C", "ja-JP-Standard-D", "cmn-TW-Standard-A", "cmn-TW-Standard-B", "cmn-TW-Standard-C", "ko-KR-Standard-B", "ko-KR-Standard-C", "ko-KR-Standard-D", "ko-KR-Standard-A", "vi-VN-Standard-A", "vi-VN-Standard-B", "vi-VN-Standard-C", "vi-VN-Standard-D", "ar-XA-Wavenet-A", "ar-XA-Wavenet-B", "ar-XA-Wavenet-C", "ar-XA-Wavenet-D", "bn-IN-Wavenet-A", "bn-IN-Wavenet-B", "en-GB-Wavenet-A", "en-GB-Wavenet-B", "en-GB-Wavenet-C", "en-GB-Wavenet-D", "en-GB-Wavenet-F", "fr-CA-Wavenet-A", "fr-CA-Wavenet-B", "fr-CA-Wavenet-C", "fr-CA-Wavenet-D", "en-US-Wavenet-G", "en-US-Wavenet-H", "en-US-Wavenet-I", "en-US-Wavenet-J", "en-US-Wavenet-A", "en-US-Wavenet-B", "en-US-Wavenet-C", "en-US-Wavenet-D", "en-US-Wavenet-E", "en-US-Wavenet-F", "es-ES-Wavenet-C", "es-ES-Wavenet-D", "es-ES-Wavenet-B", "fi-FI-Wavenet-A", "gu-IN-Wavenet-A", "gu-IN-Wavenet-B", "ja-JP-Wavenet-B", "ja-JP-Wavenet-C", "ja-JP-Wavenet-D", "ja-JP-Wavenet-A", "kn-IN-Wavenet-A", "kn-IN-Wavenet-B", "ml-IN-Wavenet-A", "ml-IN-Wavenet-B", "sv-SE-Wavenet-A", "ta-IN-Wavenet-A", "ta-IN-Wavenet-B", "tr-TR-Wavenet-B", "tr-TR-Wavenet-C", "tr-TR-Wavenet-D", "tr-TR-Wavenet-E", "tr-TR-Wavenet-A", "ms-MY-Wavenet-A", "ms-MY-Wavenet-B", "ms-MY-Wavenet-C", "ms-MY-Wavenet-D", "pa-IN-Wavenet-A", "pa-IN-Wavenet-B", "pa-IN-Wavenet-C", "pa-IN-Wavenet-D", "cs-CZ-Wavenet-A", "de-DE-Wavenet-F", "de-DE-Wavenet-A", "de-DE-Wavenet-B", "de-DE-Wavenet-C", "de-DE-Wavenet-D", "de-DE-Wavenet-E", "en-AU-Wavenet-A", "en-AU-Wavenet-B", "en-AU-Wavenet-C", "en-AU-Wavenet-D", "en-IN-Wavenet-D", "en-IN-Wavenet-A", "en-IN-Wavenet-B", "en-IN-Wavenet-C", "es-US-Wavenet-A", "es-US-Wavenet-B", "es-US-Wavenet-C", "fr-FR-Wavenet-E", "fr-FR-Wavenet-A", "fr-FR-Wavenet-B", "fr-FR-Wavenet-C", "fr-FR-Wavenet-D", "hi-IN-Wavenet-D", "hi-IN-Wavenet-A", "hi-IN-Wavenet-B", "hi-IN-Wavenet-C", "id-ID-Wavenet-D", "id-ID-Wavenet-A", "id-ID-Wavenet-B", "id-ID-Wavenet-C", "it-IT-Wavenet-A", "it-IT-Wavenet-B", "it-IT-Wavenet-C", "it-IT-Wavenet-D", "ko-KR-Wavenet-A", "ko-KR-Wavenet-B", "ko-KR-Wavenet-C", "ko-KR-Wavenet-D", "ru-RU-Wavenet-E", "ru-RU-Wavenet-A", "ru-RU-Wavenet-B", "ru-RU-Wavenet-C", "ru-RU-Wavenet-D", "uk-UA-Wavenet-A", "cmn-CN-Wavenet-A", "cmn-CN-Wavenet-B", "cmn-CN-Wavenet-C", "cmn-CN-Wavenet-D", "cmn-TW-Wavenet-A", "cmn-TW-Wavenet-B", "cmn-TW-Wavenet-C", "da-DK-Wavenet-C", "da-DK-Wavenet-D", "da-DK-Wavenet-E", "da-DK-Wavenet-A", "el-GR-Wavenet-A", "fil-PH-Wavenet-A", "fil-PH-Wavenet-B", "fil-PH-Wavenet-C", "fil-PH-Wavenet-D", "hu-HU-Wavenet-A", "nb-NO-Wavenet-A", "nb-NO-Wavenet-B", "nb-NO-Wavenet-C", "nb-NO-Wavenet-D", "nb-no-Wavenet-E", "nl-BE-Wavenet-A", "nl-BE-Wavenet-B", "nl-NL-Wavenet-B", "nl-NL-Wavenet-C", "nl-NL-Wavenet-D", "nl-NL-Wavenet-A", "nl-NL-Wavenet-E", "pt-PT-Wavenet-A", "pt-PT-Wavenet-B", "pt-PT-Wavenet-C", "pt-PT-Wavenet-D", "sk-SK-Wavenet-A", "vi-VN-Wavenet-A", "vi-VN-Wavenet-B", "vi-VN-Wavenet-C", "vi-VN-Wavenet-D", "pl-PL-Wavenet-A", "pl-PL-Wavenet-B", "pl-PL-Wavenet-C", "pl-PL-Wavenet-E", "pl-PL-Wavenet-D", "pt-BR-Wavenet-A"];
|
|
7
|
+
export type TtsGoogleVoice = (typeof TtsGoogleVoiceList)[number];
|
package/types/enums/index.d.ts
CHANGED
|
@@ -12,7 +12,11 @@ import { RelativeDatetimeValue } from './RelativeDatetimeValue/RelativeDatetimeV
|
|
|
12
12
|
import { ResourceCidType } from './ResourceCidType/ResourceCidType';
|
|
13
13
|
import { ResourceIgnoreEarlyMedia } from './ResourceIgnoreEarlyMedia/ResourceIgnoreEarlyMedia';
|
|
14
14
|
import { TimeBaseScore } from './TimeBaseScore/TimeBaseScore';
|
|
15
|
+
import { TtsGoogleVoiceList } from './TtsGoogleVoice/TtsGoogleVoice';
|
|
16
|
+
import { TtsMicrosoftVoice } from './TtsMicrosoftVoice/TtsMicrosoftVoice';
|
|
17
|
+
import { TtsTextType } from './TtsTextType/TtsTextType';
|
|
15
18
|
import { TypesResourceStrategy } from './TypesResourceStrategy/TypesResourceStrategy';
|
|
16
19
|
import { UrlProtocol } from './UrlProtocol/UrlProtocol';
|
|
17
20
|
import { UserPresenceStatus } from './UserPresenceStatus/UserPresenceStatus';
|
|
18
|
-
export {
|
|
21
|
+
export type { TtsGoogleVoice } from './TtsGoogleVoice/TtsGoogleVoice';
|
|
22
|
+
export { AgentStatus, CallReportingStatus, ChannelState, ChannelType, ChatGatewayProvider, FormatDateMode, MemberStopCause, QueuePeriod, QueueStrategy, QueueStrategyList, QueueType, QueueTypeName, RelativeDatetimeValue, ResourceCidType, ResourceIgnoreEarlyMedia, TimeBaseScore, TtsGoogleVoiceList, TtsMicrosoftVoice, TtsTextType, TypesResourceStrategy, UrlProtocol, UserPresenceStatus, };
|
|
@@ -49,6 +49,7 @@ export * from './queueMember/memberCommunication.validations';
|
|
|
49
49
|
export * from './queueMember/queueMember.validations';
|
|
50
50
|
export * from './queueResGroup/queueResGroup.validations';
|
|
51
51
|
export * from './queueSkill/queueSkill.validations';
|
|
52
|
+
export * from './quickReply/quickReply.validations';
|
|
52
53
|
export * from './region/region.validations';
|
|
53
54
|
export * from './resource/resource.validations';
|
|
54
55
|
export * from './resourceDisplay/resourceDisplay.validations';
|
|
@@ -62,6 +63,7 @@ export * from './team/team.validations';
|
|
|
62
63
|
export * from './teamAgent/teamAgent.validations';
|
|
63
64
|
export * from './teamFlow/teamFlow.validations';
|
|
64
65
|
export * from './teamHook/teamHook.validations';
|
|
66
|
+
export * from './textToSpeech/textToSpeech.validations';
|
|
65
67
|
export * from './typeExtension/typeExtension.validations';
|
|
66
68
|
export * from './types';
|
|
67
69
|
export * from './user/user.validations';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const quickReplySchema: z.ZodObject<{
|
|
3
|
+
article?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
4
|
+
createdAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
5
|
+
createdBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
6
|
+
id?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
7
|
+
name?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
8
|
+
queues?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
9
|
+
teams?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
10
|
+
text?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
11
|
+
updatedAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
12
|
+
updatedBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
13
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** [Claude] The media "Text-to-Speech" popup: the fields a file can't be generated without. */
|
|
3
|
+
export declare const textToSpeechSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
profile: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
name: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
text: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|