falaai-api 1.21.51 → 1.21.67
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.
- checksums.yaml +4 -4
- data/README.md +13 -6
- data/docs/AnalysisApi.md +6 -2
- data/docs/DiagnosticParticipant.md +1 -1
- data/docs/DiagnosticRequest.md +2 -2
- data/docs/DiagnosticResponse.md +3 -1
- data/docs/DiagnosticUsage.md +1 -1
- data/docs/Participant.md +1 -1
- data/docs/ParticipantDiagnostic.md +1 -1
- data/docs/ResponseExtractConversationsV1WhatsappExtractconversationsPost.md +42 -0
- data/docs/RiskAuditAppliedActionV2.md +0 -4
- data/docs/RiskAuditAuditDecisionsV2.md +1 -3
- data/docs/RiskAuditConversationScoresV2.md +0 -2
- data/docs/RiskAuditDetectionItemV2.md +5 -75
- data/docs/RiskAuditRequest.md +3 -5
- data/docs/RiskAuditSummaryV2.md +0 -4
- data/docs/RiskAuditUsageV2.md +1 -1
- data/docs/RiskAuditVerdictV2.md +1 -7
- data/docs/SpeechApi.md +5 -3
- data/docs/TranscriptionUsage.md +1 -1
- data/docs/WhatsappApi.md +20 -12
- data/docs/WhatsappConversation.md +1 -1
- data/docs/WhatsappMeta.md +7 -3
- data/docs/WhatsappPreviewItem.md +32 -0
- data/docs/WhatsappPreviewItemBreakdown.md +26 -0
- data/docs/WhatsappPreviewItemCredits.md +20 -0
- data/docs/WhatsappPreviewItemMedia.md +30 -0
- data/docs/WhatsappPreviewParams.md +32 -0
- data/docs/WhatsappPreviewResponse.md +32 -0
- data/docs/WhatsappPreviewWindow.md +22 -0
- data/docs/WhatsappUsage.md +17 -1
- data/docs/index.html +58 -29
- data/lib/falaai-api/api/analysis_api.rb +5 -1
- data/lib/falaai-api/api/email_alerts_api.rb +1 -1
- data/lib/falaai-api/api/health_api.rb +1 -1
- data/lib/falaai-api/api/speech_api.rb +7 -5
- data/lib/falaai-api/api/usage_api.rb +1 -1
- data/lib/falaai-api/api/version_api.rb +1 -1
- data/lib/falaai-api/api/webhooks_api.rb +1 -1
- data/lib/falaai-api/api/whatsapp_api.rb +27 -24
- data/lib/falaai-api/api_client.rb +1 -1
- data/lib/falaai-api/api_error.rb +1 -1
- data/lib/falaai-api/api_model_base.rb +1 -1
- data/lib/falaai-api/configuration.rb +1 -1
- data/lib/falaai-api/models/audio_event.rb +1 -1
- data/lib/falaai-api/models/audio_input_meta.rb +1 -1
- data/lib/falaai-api/models/create_email_alert_request.rb +1 -1
- data/lib/falaai-api/models/create_webhook_request.rb +1 -1
- data/lib/falaai-api/models/diagnostic_analysis_map.rb +1 -1
- data/lib/falaai-api/models/diagnostic_audio_event.rb +1 -1
- data/lib/falaai-api/models/diagnostic_categorical_analysis.rb +1 -1
- data/lib/falaai-api/models/diagnostic_participant.rb +2 -9
- data/lib/falaai-api/models/diagnostic_request.rb +5 -12
- data/lib/falaai-api/models/diagnostic_response.rb +15 -5
- data/lib/falaai-api/models/diagnostic_text_analysis.rb +1 -1
- data/lib/falaai-api/models/diagnostic_usage.rb +3 -3
- data/lib/falaai-api/models/email_alert_item.rb +1 -1
- data/lib/falaai-api/models/email_alert_list_response.rb +1 -1
- data/lib/falaai-api/models/email_alert_message_response.rb +1 -1
- data/lib/falaai-api/models/email_event.rb +1 -1
- data/lib/falaai-api/models/health_response.rb +1 -1
- data/lib/falaai-api/models/http_validation_error.rb +1 -1
- data/lib/falaai-api/models/location_inner.rb +1 -1
- data/lib/falaai-api/models/message_response.rb +1 -1
- data/lib/falaai-api/models/participant.rb +2 -2
- data/lib/falaai-api/models/participant_diagnostic.rb +2 -19
- data/lib/falaai-api/models/response_extract_conversations_v1_whatsapp_extractconversations_post.rb +103 -0
- data/lib/falaai-api/models/risk_audit_analysis_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_applied_action_v2.rb +2 -26
- data/lib/falaai-api/models/risk_audit_audio_event_model_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_audit_decisions_v2.rb +5 -17
- data/lib/falaai-api/models/risk_audit_conversation_scores_v2.rb +2 -12
- data/lib/falaai-api/models/risk_audit_detection_item_v2.rb +19 -393
- data/lib/falaai-api/models/risk_audit_detections_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_indexer_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_meta_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_participant_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_participants_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_request.rb +11 -37
- data/lib/falaai-api/models/risk_audit_scores_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_scoring_explanation_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_summary_v2.rb +2 -24
- data/lib/falaai-api/models/risk_audit_timeline_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_usage_v2.rb +2 -2
- data/lib/falaai-api/models/risk_audit_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_v2_response.rb +1 -1
- data/lib/falaai-api/models/risk_audit_verdict_v2.rb +5 -36
- data/lib/falaai-api/models/transcription_response.rb +1 -1
- data/lib/falaai-api/models/transcription_usage.rb +2 -2
- data/lib/falaai-api/models/update_email_alert_request.rb +1 -1
- data/lib/falaai-api/models/update_webhook_request.rb +1 -1
- data/lib/falaai-api/models/usage_by_key_item.rb +1 -1
- data/lib/falaai-api/models/usage_log_item.rb +1 -1
- data/lib/falaai-api/models/usage_log_response.rb +1 -1
- data/lib/falaai-api/models/validation_error.rb +1 -1
- data/lib/falaai-api/models/version_response.rb +1 -1
- data/lib/falaai-api/models/webhook_event.rb +1 -1
- data/lib/falaai-api/models/webhook_item.rb +1 -1
- data/lib/falaai-api/models/webhook_list_response.rb +1 -1
- data/lib/falaai-api/models/whatsapp_conversation.rb +2 -2
- data/lib/falaai-api/models/whatsapp_conversations_response.rb +30 -6
- data/lib/falaai-api/models/whatsapp_meta.rb +86 -32
- data/lib/falaai-api/models/whatsapp_preview_item.rb +354 -0
- data/lib/falaai-api/models/whatsapp_preview_item_breakdown.rb +273 -0
- data/lib/falaai-api/models/whatsapp_preview_item_credits.rb +192 -0
- data/lib/falaai-api/models/whatsapp_preview_item_media.rb +329 -0
- data/lib/falaai-api/models/whatsapp_preview_params.rb +354 -0
- data/lib/falaai-api/models/whatsapp_preview_response.rb +384 -0
- data/lib/falaai-api/models/whatsapp_preview_window.rb +219 -0
- data/lib/falaai-api/models/whatsapp_speaker.rb +1 -1
- data/lib/falaai-api/models/whatsapp_usage.rb +220 -4
- data/lib/falaai-api/version.rb +15 -15
- data/lib/falaai-api.rb +9 -1
- metadata +18 -2
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **conversation_id** | **String** |
|
|
7
|
+
| **conversation_id** | **String** | Stable conversation id: yyyymmddhhmm-<first speaker>[-xN for >2 speakers] | |
|
|
8
8
|
| **first_at** | **String** | Real start (wall-clock, ISO) | |
|
|
9
9
|
| **last_at** | **String** | Real end (wall-clock, ISO) | |
|
|
10
10
|
| **duration_seconds** | **Float** | (last - first) + last turn duration | |
|
data/docs/WhatsappMeta.md
CHANGED
|
@@ -13,13 +13,15 @@
|
|
|
13
13
|
| **_end** | **String** | Window end (ISO) | |
|
|
14
14
|
| **gap_minutes** | **Float** | Gap used to split conversations | |
|
|
15
15
|
| **min_messages** | **Integer** | Minimum messages per conversation | |
|
|
16
|
-
| **chars_per_minute** | **Float** | Chars per minute used to estimate duration | |
|
|
17
16
|
| **turns** | **Integer** | Total parsed turns | |
|
|
18
17
|
| **system_lines** | **Integer** | System lines ignored | |
|
|
19
18
|
| **conversations_total** | **Integer** | Conversations before window filter | |
|
|
20
19
|
| **conversations_in_window** | **Integer** | Conversations overlapping the window | |
|
|
21
20
|
| **monologues_dropped** | **Integer** | Single-speaker conversations dropped | |
|
|
22
21
|
| **conversations_selected** | **Integer** | Final conversations returned | |
|
|
22
|
+
| **voice_note** | **Boolean** | Voice/video medias were transcribed | |
|
|
23
|
+
| **expression** | **Boolean** | Visual expressions were described | |
|
|
24
|
+
| **windows** | **Integer** | Explicit windows used (0 = simple start/end range) | |
|
|
23
25
|
|
|
24
26
|
## Example
|
|
25
27
|
|
|
@@ -36,13 +38,15 @@ instance = FalaAI::WhatsappMeta.new(
|
|
|
36
38
|
_end: null,
|
|
37
39
|
gap_minutes: null,
|
|
38
40
|
min_messages: null,
|
|
39
|
-
chars_per_minute: null,
|
|
40
41
|
turns: null,
|
|
41
42
|
system_lines: null,
|
|
42
43
|
conversations_total: null,
|
|
43
44
|
conversations_in_window: null,
|
|
44
45
|
monologues_dropped: null,
|
|
45
|
-
conversations_selected: null
|
|
46
|
+
conversations_selected: null,
|
|
47
|
+
voice_note: null,
|
|
48
|
+
expression: null,
|
|
49
|
+
windows: null
|
|
46
50
|
)
|
|
47
51
|
```
|
|
48
52
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# FalaAI::WhatsappPreviewItem
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **conversation_id** | **String** | Stable id: yyyymmddhhmm-<first speaker>[-xN for >2 speakers] | |
|
|
8
|
+
| **first_at** | **String** | Conversation start (ISO) | |
|
|
9
|
+
| **last_at** | **String** | Conversation end (ISO) | |
|
|
10
|
+
| **duration_minutes** | **Float** | Conversation duration in minutes | |
|
|
11
|
+
| **messages** | **Integer** | Messages in this conversation | |
|
|
12
|
+
| **characters** | **Integer** | Characters of this conversation (estimate: media text is only replaced by tokens on extraction) | |
|
|
13
|
+
| **media** | [**WhatsappPreviewItemMedia**](WhatsappPreviewItemMedia.md) | Media of this conversation | |
|
|
14
|
+
| **credits** | [**WhatsappPreviewItemCredits**](WhatsappPreviewItemCredits.md) | Credits of this conversation | |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'falaai-api'
|
|
20
|
+
|
|
21
|
+
instance = FalaAI::WhatsappPreviewItem.new(
|
|
22
|
+
conversation_id: null,
|
|
23
|
+
first_at: null,
|
|
24
|
+
last_at: null,
|
|
25
|
+
duration_minutes: null,
|
|
26
|
+
messages: null,
|
|
27
|
+
characters: null,
|
|
28
|
+
media: null,
|
|
29
|
+
credits: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# FalaAI::WhatsappPreviewItemBreakdown
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **conversation** | **Float** | Conversation credit (0,15) | |
|
|
8
|
+
| **figurinha** | **Float** | Figurinha credits of this conversation | |
|
|
9
|
+
| **gif** | **Float** | GIF credits of this conversation | |
|
|
10
|
+
| **emoji** | **Float** | Emoji credits of this conversation | |
|
|
11
|
+
| **audio** | **Float** | Audio credits of this conversation | |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'falaai-api'
|
|
17
|
+
|
|
18
|
+
instance = FalaAI::WhatsappPreviewItemBreakdown.new(
|
|
19
|
+
conversation: null,
|
|
20
|
+
figurinha: null,
|
|
21
|
+
gif: null,
|
|
22
|
+
emoji: null,
|
|
23
|
+
audio: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# FalaAI::WhatsappPreviewItemCredits
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **total** | **Float** | Credits of THIS conversation (2 decimals, exact fraction — the charge is ONE ceil on the batch total) | |
|
|
8
|
+
| **breakdown** | [**WhatsappPreviewItemBreakdown**](WhatsappPreviewItemBreakdown.md) | Credits by component for THIS conversation | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'falaai-api'
|
|
14
|
+
|
|
15
|
+
instance = FalaAI::WhatsappPreviewItemCredits.new(
|
|
16
|
+
total: null,
|
|
17
|
+
breakdown: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# FalaAI::WhatsappPreviewItemMedia
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **figurinha** | **Integer** | Figurinha occurrences in this conversation (0 quando expression=false) | |
|
|
8
|
+
| **gif** | **Integer** | GIF occurrences in this conversation (0 quando expression=false) | |
|
|
9
|
+
| **emoji** | **Integer** | Emoji occurrences in this conversation (0 quando expression=false) | |
|
|
10
|
+
| **ptt** | **Integer** | Voice/audio/video turns in this conversation (cobra 0,19/segundo SO quando voice_note=true) | |
|
|
11
|
+
| **ptt_seconds** | **Float** | Voice/video SECONDS counted in this conversation (0 quando voice_note=false) | |
|
|
12
|
+
| **anexos** | **Integer** | Image/document turns in this conversation (ANEXO: nunca cobrado) | |
|
|
13
|
+
| **by_type** | **Hash<String, Integer>** | Media turns by type in THIS conversation (voz/audio/video/imagem/figurinha/gif/arquivo/oculta/chamada) | |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'falaai-api'
|
|
19
|
+
|
|
20
|
+
instance = FalaAI::WhatsappPreviewItemMedia.new(
|
|
21
|
+
figurinha: null,
|
|
22
|
+
gif: null,
|
|
23
|
+
emoji: null,
|
|
24
|
+
ptt: null,
|
|
25
|
+
ptt_seconds: null,
|
|
26
|
+
anexos: null,
|
|
27
|
+
by_type: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# FalaAI::WhatsappPreviewParams
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **start** | **String** | Window start actually used (file period when start/end are omitted in dry_run) | |
|
|
8
|
+
| **_end** | **String** | Window end actually used (file period when start/end are omitted in dry_run) | |
|
|
9
|
+
| **timezone** | **String** | Timezone informed | |
|
|
10
|
+
| **date_format** | **String** | Date order used | |
|
|
11
|
+
| **gap_minutes** | **Float** | Gap used to split conversations | |
|
|
12
|
+
| **min_messages** | **Integer** | Minimum messages per conversation | |
|
|
13
|
+
| **voice_note** | **Boolean** | Voice/video medias would be transcribed (charge flag) | |
|
|
14
|
+
| **expression** | **Boolean** | Visual expressions would be described (charge flag) | |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'falaai-api'
|
|
20
|
+
|
|
21
|
+
instance = FalaAI::WhatsappPreviewParams.new(
|
|
22
|
+
start: null,
|
|
23
|
+
_end: null,
|
|
24
|
+
timezone: null,
|
|
25
|
+
date_format: null,
|
|
26
|
+
gap_minutes: null,
|
|
27
|
+
min_messages: null,
|
|
28
|
+
voice_note: null,
|
|
29
|
+
expression: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# FalaAI::WhatsappPreviewResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **object** | **String** | Object type. Always 'whatsapp_preview' | |
|
|
8
|
+
| **dry_run** | **Boolean** | Always true (preview: no AI call, no charge) | |
|
|
9
|
+
| **credits_charged** | **Integer** | Always 0 in preview | |
|
|
10
|
+
| **credits_total** | **Float** | TOTAL credits = exact SUM of the selected conversations (2 decimals, NO rounding up) | |
|
|
11
|
+
| **params** | [**WhatsappPreviewParams**](WhatsappPreviewParams.md) | Filter parameters actually used (reuse them in the extraction) | |
|
|
12
|
+
| **windows** | [**Array<WhatsappPreviewWindow>**](WhatsappPreviewWindow.md) | Explicit windows used (empty when a single start/end range was used) | |
|
|
13
|
+
| **items** | [**Array<WhatsappPreviewItem>**](WhatsappPreviewItem.md) | Per-conversation detail (send back as `windows` to extract only what you want) | |
|
|
14
|
+
| **warnings** | **Array<String>** | Human-readable notices about what would be ignored | |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'falaai-api'
|
|
20
|
+
|
|
21
|
+
instance = FalaAI::WhatsappPreviewResponse.new(
|
|
22
|
+
object: null,
|
|
23
|
+
dry_run: null,
|
|
24
|
+
credits_charged: null,
|
|
25
|
+
credits_total: null,
|
|
26
|
+
params: null,
|
|
27
|
+
windows: null,
|
|
28
|
+
items: null,
|
|
29
|
+
warnings: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# FalaAI::WhatsappPreviewWindow
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **start** | **String** | Window start used | |
|
|
8
|
+
| **_end** | **String** | Window end used | |
|
|
9
|
+
| **selected** | **Integer** | Conversations matched by THIS window (before the union dedupe) | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'falaai-api'
|
|
15
|
+
|
|
16
|
+
instance = FalaAI::WhatsappPreviewWindow.new(
|
|
17
|
+
start: null,
|
|
18
|
+
_end: null,
|
|
19
|
+
selected: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/WhatsappUsage.md
CHANGED
|
@@ -6,7 +6,15 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **conversations** | **Integer** | Number of conversations returned | |
|
|
8
8
|
| **characters** | **Integer** | Total characters across conversations | |
|
|
9
|
-
| **
|
|
9
|
+
| **expressions** | **Integer** | Chargeable expression occurrences (figurinha+GIF+emoji); 0 quando expression=false | |
|
|
10
|
+
| **expressions_figurinha** | **Integer** | Figurinha occurrences (cobra 0,15 cada quando expression=true) | |
|
|
11
|
+
| **expressions_gif** | **Integer** | GIF occurrences (cobra 0,18 cada quando expression=true) | |
|
|
12
|
+
| **expressions_emoji** | **Integer** | Emoji occurrences (cobra 0,1 cada quando expression=true) | |
|
|
13
|
+
| **voice_notes** | **Integer** | Voice notes (PTT) resolved to text | |
|
|
14
|
+
| **conversation_credits** | **Float** | Credits for conversations (0,15 each) | |
|
|
15
|
+
| **expression_credits** | **Float** | Credits for expressions (figurinha 0,15 / GIF 0,18 / emoji 0,1) | |
|
|
16
|
+
| **audio_credits** | **Float** | Credits for transcribed voice seconds (0,19 per second; 0 quando voice_note=false) | |
|
|
17
|
+
| **credits_consumed** | **Float** | Total credits = round(conversation_credits + expression_credits + audio_credits, 2) | |
|
|
10
18
|
| **processing_ms** | **Integer** | Total processing time in milliseconds | |
|
|
11
19
|
|
|
12
20
|
## Example
|
|
@@ -17,6 +25,14 @@ require 'falaai-api'
|
|
|
17
25
|
instance = FalaAI::WhatsappUsage.new(
|
|
18
26
|
conversations: null,
|
|
19
27
|
characters: null,
|
|
28
|
+
expressions: null,
|
|
29
|
+
expressions_figurinha: null,
|
|
30
|
+
expressions_gif: null,
|
|
31
|
+
expressions_emoji: null,
|
|
32
|
+
voice_notes: null,
|
|
33
|
+
conversation_credits: null,
|
|
34
|
+
expression_credits: null,
|
|
35
|
+
audio_credits: null,
|
|
20
36
|
credits_consumed: null,
|
|
21
37
|
processing_ms: null
|
|
22
38
|
)
|