@mobilon-dev/chotto 0.3.71 → 0.3.73

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.
@@ -3,38 +3,11 @@ import AudioMessage from '../AudioMessage.vue';
3
3
  declare const meta: Meta<typeof AudioMessage>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof AudioMessage>;
6
- export declare const Default: Story;
7
- export declare const LeftMessage: Story;
8
- export declare const LeftMessageWithActions: Story;
9
- export declare const RightMessage: Story;
10
- export declare const LeftMessageWithAvatar: Story;
11
- export declare const RightMessageWithAvatar: Story;
12
- export declare const LeftMessageWithAvatarAndSubtext: Story;
13
- export declare const RightMessageWithAvatarAndSubtext: Story;
14
- export declare const RightMessageSent: Story;
15
- export declare const RightMessageReceived: Story;
16
- export declare const RightMessageRead: Story;
17
- export declare const RightMessagePending: Story;
18
- export declare const RightMessageError: Story;
19
- export declare const RightMessageErrorWithStatusMsg: Story;
20
- export declare const RightMessageWithActions: Story;
21
- export declare const RightMessageWithActionsAndText: Story;
22
- export declare const LeftMessageWithActionsAndText: Story;
23
- export declare const RightMessageWithActionsAndTextWithLink: Story;
24
- export declare const LeftMessageWithActionsAndTextWithLink: Story;
25
- export declare const RightMessageWithTranscript: Story;
26
- export declare const LeftMessageWithTranscript: Story;
27
- export declare const LeftMessageWithReplyText: Story;
28
- export declare const RightMessageWithReplyText: Story;
29
- export declare const LeftMessageWithReplyImage: Story;
30
- export declare const RightMessageWithReplyImage: Story;
31
- export declare const LeftMessageWithReplyVideo: Story;
32
- export declare const RightMessageWithReplyVideo: Story;
33
- export declare const LeftMessageWithReplyFile: Story;
34
- export declare const RightMessageWithReplyFile: Story;
35
- export declare const LeftMessageWithReplyAudio: Story;
36
- export declare const RightMessageWithReplyAudio: Story;
37
- export declare const LeftMessageWithReplyCall: Story;
38
- export declare const RightMessageWithReplyCall: Story;
39
- export declare const LeftMessageWithPreviewLink: Story;
40
- export declare const RightMessageWithPreviewLink: Story;
6
+ export declare const WithTextAndSummary: Story;
7
+ export declare const WithoutTextAndSummary: Story;
8
+ export declare const WithoutText: Story;
9
+ export declare const WithoutSummary: Story;
10
+ export declare const PlannedStatus: Story;
11
+ export declare const ErrorStatus: Story;
12
+ export declare const NotConfiguredStatus: Story;
13
+ export declare const WithLongTextAndSummary: Story;
@@ -4,3 +4,10 @@ declare const meta: Meta<typeof CallMessage>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof CallMessage>;
6
6
  export declare const Default: Story;
7
+ export declare const ReadyStatus: Story;
8
+ export declare const PlannedStatus: Story;
9
+ export declare const ErrorStatus: Story;
10
+ export declare const NotConfiguredStatus: Story;
11
+ export declare const WithoutText: Story;
12
+ export declare const WithoutSummary: Story;
13
+ export declare const WithoutTextAndSummary: Story;
@@ -1,4 +1,4 @@
1
- import { IAction, IDialog } from '@types';
1
+ import { IAction } from '@types';
2
2
  export interface Reply {
3
3
  messageId: string;
4
4
  type: string;
@@ -82,16 +82,14 @@ export interface IAudioMessage {
82
82
  actions?: IAction[];
83
83
  views?: number;
84
84
  text?: string;
85
- /** Транскрипт: мок {text}, JSON-строка {"replies":[...]}, либо объект {replies} */
86
- transcript?: {
87
- text: string;
88
- } | string | ICallTranscriptPayload;
89
- /** Резюме: JSON-строка {"summary":"..."}, либо объект {summary} */
90
- summary?: string | ICallSummaryPayload;
85
+ /** Транскрипт со статусом и HTML */
86
+ transcript?: IAudioRecognitionPayload;
87
+ /** Резюме со статусом и HTML */
88
+ summary?: IAudioSummaryPayload;
91
89
  /** Сырые поля API для audio (пример: meta.transcript/meta.summary/meta.url) */
92
90
  meta?: Record<string, unknown> & {
93
- transcript?: string | ICallTranscriptPayload;
94
- summary?: string | ICallSummaryPayload;
91
+ transcript?: IAudioRecognitionPayload;
92
+ summary?: IAudioSummaryPayload;
95
93
  url?: string;
96
94
  };
97
95
  reply?: Reply;
@@ -113,9 +111,15 @@ export interface ICallTranscriptReply {
113
111
  export interface ICallTranscriptPayload {
114
112
  replies?: ICallTranscriptReply[];
115
113
  }
116
- /** Распарсенное тело строки meta.callSummary */
117
- export interface ICallSummaryPayload {
118
- summary?: string;
114
+ export type AudioRecognitionStatus = 'RECOGNITION_PLANNED' | 'RECOGNITION_READY' | 'RECOGNITION_NOT_CONFIGURED' | 'RECOGNITION_ERROR';
115
+ export type AudioSummaryStatus = 'SUMMARY_PLANNED' | 'SUMMARY_READY' | 'SUMMARY_NOT_CONFIGURED' | 'SUMMARY_ERROR';
116
+ export interface IAudioRecognitionPayload {
117
+ status?: AudioRecognitionStatus;
118
+ html?: string;
119
+ }
120
+ export interface IAudioSummaryPayload {
121
+ status?: AudioSummaryStatus;
122
+ html?: string;
119
123
  }
120
124
  export interface ICallMessage {
121
125
  messageId: string;
@@ -137,15 +141,10 @@ export interface ICallMessage {
137
141
  text?: string;
138
142
  actions?: IAction[];
139
143
  views?: number;
140
- /**
141
- * Транскрипт: JSON-строка {"replies":[...]}, объект с replies, либо мок { dialog, text }
142
- */
143
- transcript?: string | ICallTranscriptPayload | {
144
- dialog?: IDialog[];
145
- text?: string;
146
- };
147
- /** Резюме: строка, JSON-строка {"summary":"..."} или объект { summary } */
148
- callSummary?: string | ICallSummaryPayload;
144
+ /** Транскрипт со статусом и HTML */
145
+ transcript?: IAudioRecognitionPayload;
146
+ /** Резюме со статусом и HTML */
147
+ summary?: IAudioSummaryPayload;
149
148
  reactions?: MessageReactions;
150
149
  backgroundColor?: string;
151
150
  hasMessengerAccount?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobilon-dev/chotto",
3
- "version": "0.3.71",
3
+ "version": "0.3.73",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",