apologist 1.1.0 → 1.2.0
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/.fern/metadata.json +2 -2
- data/.fern/replay.lock +47 -1
- data/lib/Apologist/agent/client.rb +84 -0
- data/lib/Apologist/agent/types/pause_agent_response.rb +11 -0
- data/lib/Apologist/agent/types/resume_agent_response.rb +11 -0
- data/lib/Apologist/channels/client.rb +100 -0
- data/lib/Apologist/channels/types/receive_whats_app_message_request.rb +15 -0
- data/lib/Apologist/channels/types/verify_whats_app_webhook_request.rb +17 -0
- data/lib/Apologist/channels/types/verify_whats_app_webhook_request_hub_mode.rb +13 -0
- data/lib/Apologist/client.rb +11 -1
- data/lib/Apologist/conversations/client.rb +168 -0
- data/lib/Apologist/conversations/types/get_conversation_request.rb +11 -0
- data/lib/Apologist/conversations/types/get_conversation_response.rb +11 -0
- data/lib/Apologist/conversations/types/list_conversations_request.rb +13 -0
- data/lib/Apologist/conversations/types/list_conversations_response.rb +17 -0
- data/lib/Apologist/conversations/types/pause_conversation_request.rb +11 -0
- data/lib/Apologist/conversations/types/pause_conversation_response.rb +11 -0
- data/lib/Apologist/conversations/types/resume_conversation_request.rb +11 -0
- data/lib/Apologist/conversations/types/resume_conversation_response.rb +11 -0
- data/lib/Apologist/types/agent_pause_state.rb +18 -0
- data/lib/Apologist/types/conversation.rb +28 -0
- data/lib/Apologist/version.rb +1 -1
- data/lib/Apologist.rb +17 -0
- data/reference.md +539 -0
- metadata +18 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Apologist
|
|
4
|
+
module Types
|
|
5
|
+
# A conversation scoped to the requesting agent.
|
|
6
|
+
class Conversation < Internal::Types::Model
|
|
7
|
+
field :id, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :external_id, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :agent_id, -> { Integer }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :team_id, -> { Integer }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :tags, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :started_at, -> { String }, optional: true, nullable: false
|
|
18
|
+
|
|
19
|
+
field :ended_at, -> { String }, optional: true, nullable: false
|
|
20
|
+
|
|
21
|
+
field :agent_paused, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
22
|
+
|
|
23
|
+
field :agent_paused_at, -> { String }, optional: true, nullable: false
|
|
24
|
+
|
|
25
|
+
field :agent_resumed_at, -> { String }, optional: true, nullable: false
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
data/lib/Apologist/version.rb
CHANGED
data/lib/Apologist.rb
CHANGED
|
@@ -60,9 +60,18 @@ require_relative "Apologist/benchmarks/types/benchmark_run_request_content"
|
|
|
60
60
|
require_relative "Apologist/benchmarks/types/benchmark_run_request_reasoning_effort"
|
|
61
61
|
require_relative "Apologist/benchmarks/types/benchmark_run_request_verbosity"
|
|
62
62
|
require_relative "Apologist/benchmarks/types/get_benchmark_run_response"
|
|
63
|
+
require_relative "Apologist/types/agent_pause_state"
|
|
64
|
+
require_relative "Apologist/agent/types/pause_agent_response"
|
|
65
|
+
require_relative "Apologist/agent/types/resume_agent_response"
|
|
66
|
+
require_relative "Apologist/types/conversation"
|
|
67
|
+
require_relative "Apologist/conversations/types/list_conversations_response"
|
|
68
|
+
require_relative "Apologist/conversations/types/get_conversation_response"
|
|
69
|
+
require_relative "Apologist/conversations/types/pause_conversation_response"
|
|
70
|
+
require_relative "Apologist/conversations/types/resume_conversation_response"
|
|
63
71
|
require_relative "Apologist/channels/types/get_discord_channel_status_response"
|
|
64
72
|
require_relative "Apologist/channels/types/get_line_channel_status_response"
|
|
65
73
|
require_relative "Apologist/channels/types/verify_facebook_webhook_request_hub_mode"
|
|
74
|
+
require_relative "Apologist/channels/types/verify_whats_app_webhook_request_hub_mode"
|
|
66
75
|
require_relative "Apologist/shares/types/get_shared_messages_response"
|
|
67
76
|
require_relative "Apologist/types/error"
|
|
68
77
|
require_relative "Apologist/types/success_response"
|
|
@@ -119,6 +128,12 @@ require_relative "Apologist/benchmarks/client"
|
|
|
119
128
|
require_relative "Apologist/benchmarks/types/list_benchmark_runs_request"
|
|
120
129
|
require_relative "Apologist/benchmarks/types/benchmark_run_request"
|
|
121
130
|
require_relative "Apologist/benchmarks/types/get_benchmark_run_request"
|
|
131
|
+
require_relative "Apologist/agent/client"
|
|
132
|
+
require_relative "Apologist/conversations/client"
|
|
133
|
+
require_relative "Apologist/conversations/types/list_conversations_request"
|
|
134
|
+
require_relative "Apologist/conversations/types/get_conversation_request"
|
|
135
|
+
require_relative "Apologist/conversations/types/pause_conversation_request"
|
|
136
|
+
require_relative "Apologist/conversations/types/resume_conversation_request"
|
|
122
137
|
require_relative "Apologist/channels/client"
|
|
123
138
|
require_relative "Apologist/channels/types/get_discord_channel_status_request"
|
|
124
139
|
require_relative "Apologist/channels/types/receive_discord_interaction_request"
|
|
@@ -129,6 +144,8 @@ require_relative "Apologist/channels/types/receive_facebook_message_request"
|
|
|
129
144
|
require_relative "Apologist/channels/types/get_instagram_privacy_policy_request"
|
|
130
145
|
require_relative "Apologist/channels/types/receive_telegram_update_request"
|
|
131
146
|
require_relative "Apologist/channels/types/receive_twilio_message_request"
|
|
147
|
+
require_relative "Apologist/channels/types/verify_whats_app_webhook_request"
|
|
148
|
+
require_relative "Apologist/channels/types/receive_whats_app_message_request"
|
|
132
149
|
require_relative "Apologist/shares/client"
|
|
133
150
|
require_relative "Apologist/shares/types/get_shared_messages_request"
|
|
134
151
|
require_relative "Apologist/environment"
|
data/reference.md
CHANGED
|
@@ -2322,6 +2322,372 @@ client.benchmarks.get_benchmark_run(
|
|
|
2322
2322
|
</dl>
|
|
2323
2323
|
|
|
2324
2324
|
|
|
2325
|
+
</dd>
|
|
2326
|
+
</dl>
|
|
2327
|
+
</details>
|
|
2328
|
+
|
|
2329
|
+
## Agent
|
|
2330
|
+
<details><summary><code>client.agent.<a href="/lib/Apologist/agent/client.rb">pause_agent</a>() -> Apologist::Agent::Types::PauseAgentResponse</code></summary>
|
|
2331
|
+
<dl>
|
|
2332
|
+
<dd>
|
|
2333
|
+
|
|
2334
|
+
#### 📝 Description
|
|
2335
|
+
|
|
2336
|
+
<dl>
|
|
2337
|
+
<dd>
|
|
2338
|
+
|
|
2339
|
+
<dl>
|
|
2340
|
+
<dd>
|
|
2341
|
+
|
|
2342
|
+
Pauses the agent globally and fans out pause transition messages to open conversations. Requires an API key.
|
|
2343
|
+
</dd>
|
|
2344
|
+
</dl>
|
|
2345
|
+
</dd>
|
|
2346
|
+
</dl>
|
|
2347
|
+
|
|
2348
|
+
#### 🔌 Usage
|
|
2349
|
+
|
|
2350
|
+
<dl>
|
|
2351
|
+
<dd>
|
|
2352
|
+
|
|
2353
|
+
<dl>
|
|
2354
|
+
<dd>
|
|
2355
|
+
|
|
2356
|
+
```ruby
|
|
2357
|
+
client.agent.pause_agent
|
|
2358
|
+
```
|
|
2359
|
+
</dd>
|
|
2360
|
+
</dl>
|
|
2361
|
+
</dd>
|
|
2362
|
+
</dl>
|
|
2363
|
+
|
|
2364
|
+
#### ⚙️ Parameters
|
|
2365
|
+
|
|
2366
|
+
<dl>
|
|
2367
|
+
<dd>
|
|
2368
|
+
|
|
2369
|
+
<dl>
|
|
2370
|
+
<dd>
|
|
2371
|
+
|
|
2372
|
+
**request_options:** `Apologist::Agent::RequestOptions`
|
|
2373
|
+
|
|
2374
|
+
</dd>
|
|
2375
|
+
</dl>
|
|
2376
|
+
</dd>
|
|
2377
|
+
</dl>
|
|
2378
|
+
|
|
2379
|
+
|
|
2380
|
+
</dd>
|
|
2381
|
+
</dl>
|
|
2382
|
+
</details>
|
|
2383
|
+
|
|
2384
|
+
<details><summary><code>client.agent.<a href="/lib/Apologist/agent/client.rb">resume_agent</a>() -> Apologist::Agent::Types::ResumeAgentResponse</code></summary>
|
|
2385
|
+
<dl>
|
|
2386
|
+
<dd>
|
|
2387
|
+
|
|
2388
|
+
#### 📝 Description
|
|
2389
|
+
|
|
2390
|
+
<dl>
|
|
2391
|
+
<dd>
|
|
2392
|
+
|
|
2393
|
+
<dl>
|
|
2394
|
+
<dd>
|
|
2395
|
+
|
|
2396
|
+
Resumes the agent globally and fans out resume transition messages to open conversations. Requires an API key.
|
|
2397
|
+
</dd>
|
|
2398
|
+
</dl>
|
|
2399
|
+
</dd>
|
|
2400
|
+
</dl>
|
|
2401
|
+
|
|
2402
|
+
#### 🔌 Usage
|
|
2403
|
+
|
|
2404
|
+
<dl>
|
|
2405
|
+
<dd>
|
|
2406
|
+
|
|
2407
|
+
<dl>
|
|
2408
|
+
<dd>
|
|
2409
|
+
|
|
2410
|
+
```ruby
|
|
2411
|
+
client.agent.resume_agent
|
|
2412
|
+
```
|
|
2413
|
+
</dd>
|
|
2414
|
+
</dl>
|
|
2415
|
+
</dd>
|
|
2416
|
+
</dl>
|
|
2417
|
+
|
|
2418
|
+
#### ⚙️ Parameters
|
|
2419
|
+
|
|
2420
|
+
<dl>
|
|
2421
|
+
<dd>
|
|
2422
|
+
|
|
2423
|
+
<dl>
|
|
2424
|
+
<dd>
|
|
2425
|
+
|
|
2426
|
+
**request_options:** `Apologist::Agent::RequestOptions`
|
|
2427
|
+
|
|
2428
|
+
</dd>
|
|
2429
|
+
</dl>
|
|
2430
|
+
</dd>
|
|
2431
|
+
</dl>
|
|
2432
|
+
|
|
2433
|
+
|
|
2434
|
+
</dd>
|
|
2435
|
+
</dl>
|
|
2436
|
+
</details>
|
|
2437
|
+
|
|
2438
|
+
## Conversations
|
|
2439
|
+
<details><summary><code>client.conversations.<a href="/lib/Apologist/conversations/client.rb">list_conversations</a>() -> Apologist::Conversations::Types::ListConversationsResponse</code></summary>
|
|
2440
|
+
<dl>
|
|
2441
|
+
<dd>
|
|
2442
|
+
|
|
2443
|
+
#### 📝 Description
|
|
2444
|
+
|
|
2445
|
+
<dl>
|
|
2446
|
+
<dd>
|
|
2447
|
+
|
|
2448
|
+
<dl>
|
|
2449
|
+
<dd>
|
|
2450
|
+
|
|
2451
|
+
Returns a paginated list of conversations for the requesting agent, newest first.
|
|
2452
|
+
</dd>
|
|
2453
|
+
</dl>
|
|
2454
|
+
</dd>
|
|
2455
|
+
</dl>
|
|
2456
|
+
|
|
2457
|
+
#### 🔌 Usage
|
|
2458
|
+
|
|
2459
|
+
<dl>
|
|
2460
|
+
<dd>
|
|
2461
|
+
|
|
2462
|
+
<dl>
|
|
2463
|
+
<dd>
|
|
2464
|
+
|
|
2465
|
+
```ruby
|
|
2466
|
+
client.conversations.list_conversations
|
|
2467
|
+
```
|
|
2468
|
+
</dd>
|
|
2469
|
+
</dl>
|
|
2470
|
+
</dd>
|
|
2471
|
+
</dl>
|
|
2472
|
+
|
|
2473
|
+
#### ⚙️ Parameters
|
|
2474
|
+
|
|
2475
|
+
<dl>
|
|
2476
|
+
<dd>
|
|
2477
|
+
|
|
2478
|
+
<dl>
|
|
2479
|
+
<dd>
|
|
2480
|
+
|
|
2481
|
+
**page:** `Integer`
|
|
2482
|
+
|
|
2483
|
+
</dd>
|
|
2484
|
+
</dl>
|
|
2485
|
+
|
|
2486
|
+
<dl>
|
|
2487
|
+
<dd>
|
|
2488
|
+
|
|
2489
|
+
**per_page:** `Integer` — Results per page (clamped to 100).
|
|
2490
|
+
|
|
2491
|
+
</dd>
|
|
2492
|
+
</dl>
|
|
2493
|
+
|
|
2494
|
+
<dl>
|
|
2495
|
+
<dd>
|
|
2496
|
+
|
|
2497
|
+
**request_options:** `Apologist::Conversations::RequestOptions`
|
|
2498
|
+
|
|
2499
|
+
</dd>
|
|
2500
|
+
</dl>
|
|
2501
|
+
</dd>
|
|
2502
|
+
</dl>
|
|
2503
|
+
|
|
2504
|
+
|
|
2505
|
+
</dd>
|
|
2506
|
+
</dl>
|
|
2507
|
+
</details>
|
|
2508
|
+
|
|
2509
|
+
<details><summary><code>client.conversations.<a href="/lib/Apologist/conversations/client.rb">get_conversation</a>(id:) -> Apologist::Conversations::Types::GetConversationResponse</code></summary>
|
|
2510
|
+
<dl>
|
|
2511
|
+
<dd>
|
|
2512
|
+
|
|
2513
|
+
#### 📝 Description
|
|
2514
|
+
|
|
2515
|
+
<dl>
|
|
2516
|
+
<dd>
|
|
2517
|
+
|
|
2518
|
+
<dl>
|
|
2519
|
+
<dd>
|
|
2520
|
+
|
|
2521
|
+
Returns a single conversation by internal UUID or team-scoped external id.
|
|
2522
|
+
</dd>
|
|
2523
|
+
</dl>
|
|
2524
|
+
</dd>
|
|
2525
|
+
</dl>
|
|
2526
|
+
|
|
2527
|
+
#### 🔌 Usage
|
|
2528
|
+
|
|
2529
|
+
<dl>
|
|
2530
|
+
<dd>
|
|
2531
|
+
|
|
2532
|
+
<dl>
|
|
2533
|
+
<dd>
|
|
2534
|
+
|
|
2535
|
+
```ruby
|
|
2536
|
+
client.conversations.get_conversation(id: "id")
|
|
2537
|
+
```
|
|
2538
|
+
</dd>
|
|
2539
|
+
</dl>
|
|
2540
|
+
</dd>
|
|
2541
|
+
</dl>
|
|
2542
|
+
|
|
2543
|
+
#### ⚙️ Parameters
|
|
2544
|
+
|
|
2545
|
+
<dl>
|
|
2546
|
+
<dd>
|
|
2547
|
+
|
|
2548
|
+
<dl>
|
|
2549
|
+
<dd>
|
|
2550
|
+
|
|
2551
|
+
**id:** `String` — The conversation UUID or team-scoped external id
|
|
2552
|
+
|
|
2553
|
+
</dd>
|
|
2554
|
+
</dl>
|
|
2555
|
+
|
|
2556
|
+
<dl>
|
|
2557
|
+
<dd>
|
|
2558
|
+
|
|
2559
|
+
**request_options:** `Apologist::Conversations::RequestOptions`
|
|
2560
|
+
|
|
2561
|
+
</dd>
|
|
2562
|
+
</dl>
|
|
2563
|
+
</dd>
|
|
2564
|
+
</dl>
|
|
2565
|
+
|
|
2566
|
+
|
|
2567
|
+
</dd>
|
|
2568
|
+
</dl>
|
|
2569
|
+
</details>
|
|
2570
|
+
|
|
2571
|
+
<details><summary><code>client.conversations.<a href="/lib/Apologist/conversations/client.rb">pause_conversation</a>(id:) -> Apologist::Conversations::Types::PauseConversationResponse</code></summary>
|
|
2572
|
+
<dl>
|
|
2573
|
+
<dd>
|
|
2574
|
+
|
|
2575
|
+
#### 📝 Description
|
|
2576
|
+
|
|
2577
|
+
<dl>
|
|
2578
|
+
<dd>
|
|
2579
|
+
|
|
2580
|
+
<dl>
|
|
2581
|
+
<dd>
|
|
2582
|
+
|
|
2583
|
+
Pauses the agent on a conversation identified by internal UUID or team-scoped external id. Requires an API key.
|
|
2584
|
+
</dd>
|
|
2585
|
+
</dl>
|
|
2586
|
+
</dd>
|
|
2587
|
+
</dl>
|
|
2588
|
+
|
|
2589
|
+
#### 🔌 Usage
|
|
2590
|
+
|
|
2591
|
+
<dl>
|
|
2592
|
+
<dd>
|
|
2593
|
+
|
|
2594
|
+
<dl>
|
|
2595
|
+
<dd>
|
|
2596
|
+
|
|
2597
|
+
```ruby
|
|
2598
|
+
client.conversations.pause_conversation(id: "id")
|
|
2599
|
+
```
|
|
2600
|
+
</dd>
|
|
2601
|
+
</dl>
|
|
2602
|
+
</dd>
|
|
2603
|
+
</dl>
|
|
2604
|
+
|
|
2605
|
+
#### ⚙️ Parameters
|
|
2606
|
+
|
|
2607
|
+
<dl>
|
|
2608
|
+
<dd>
|
|
2609
|
+
|
|
2610
|
+
<dl>
|
|
2611
|
+
<dd>
|
|
2612
|
+
|
|
2613
|
+
**id:** `String` — The conversation UUID or team-scoped external id
|
|
2614
|
+
|
|
2615
|
+
</dd>
|
|
2616
|
+
</dl>
|
|
2617
|
+
|
|
2618
|
+
<dl>
|
|
2619
|
+
<dd>
|
|
2620
|
+
|
|
2621
|
+
**request_options:** `Apologist::Conversations::RequestOptions`
|
|
2622
|
+
|
|
2623
|
+
</dd>
|
|
2624
|
+
</dl>
|
|
2625
|
+
</dd>
|
|
2626
|
+
</dl>
|
|
2627
|
+
|
|
2628
|
+
|
|
2629
|
+
</dd>
|
|
2630
|
+
</dl>
|
|
2631
|
+
</details>
|
|
2632
|
+
|
|
2633
|
+
<details><summary><code>client.conversations.<a href="/lib/Apologist/conversations/client.rb">resume_conversation</a>(id:) -> Apologist::Conversations::Types::ResumeConversationResponse</code></summary>
|
|
2634
|
+
<dl>
|
|
2635
|
+
<dd>
|
|
2636
|
+
|
|
2637
|
+
#### 📝 Description
|
|
2638
|
+
|
|
2639
|
+
<dl>
|
|
2640
|
+
<dd>
|
|
2641
|
+
|
|
2642
|
+
<dl>
|
|
2643
|
+
<dd>
|
|
2644
|
+
|
|
2645
|
+
Resumes the agent on a conversation identified by internal UUID or team-scoped external id. Requires an API key.
|
|
2646
|
+
</dd>
|
|
2647
|
+
</dl>
|
|
2648
|
+
</dd>
|
|
2649
|
+
</dl>
|
|
2650
|
+
|
|
2651
|
+
#### 🔌 Usage
|
|
2652
|
+
|
|
2653
|
+
<dl>
|
|
2654
|
+
<dd>
|
|
2655
|
+
|
|
2656
|
+
<dl>
|
|
2657
|
+
<dd>
|
|
2658
|
+
|
|
2659
|
+
```ruby
|
|
2660
|
+
client.conversations.resume_conversation(id: "id")
|
|
2661
|
+
```
|
|
2662
|
+
</dd>
|
|
2663
|
+
</dl>
|
|
2664
|
+
</dd>
|
|
2665
|
+
</dl>
|
|
2666
|
+
|
|
2667
|
+
#### ⚙️ Parameters
|
|
2668
|
+
|
|
2669
|
+
<dl>
|
|
2670
|
+
<dd>
|
|
2671
|
+
|
|
2672
|
+
<dl>
|
|
2673
|
+
<dd>
|
|
2674
|
+
|
|
2675
|
+
**id:** `String` — The conversation UUID or team-scoped external id
|
|
2676
|
+
|
|
2677
|
+
</dd>
|
|
2678
|
+
</dl>
|
|
2679
|
+
|
|
2680
|
+
<dl>
|
|
2681
|
+
<dd>
|
|
2682
|
+
|
|
2683
|
+
**request_options:** `Apologist::Conversations::RequestOptions`
|
|
2684
|
+
|
|
2685
|
+
</dd>
|
|
2686
|
+
</dl>
|
|
2687
|
+
</dd>
|
|
2688
|
+
</dl>
|
|
2689
|
+
|
|
2690
|
+
|
|
2325
2691
|
</dd>
|
|
2326
2692
|
</dl>
|
|
2327
2693
|
</details>
|
|
@@ -3003,6 +3369,179 @@ client.channels.receive_twilio_message(id: "id")
|
|
|
3003
3369
|
</dl>
|
|
3004
3370
|
|
|
3005
3371
|
|
|
3372
|
+
</dd>
|
|
3373
|
+
</dl>
|
|
3374
|
+
</details>
|
|
3375
|
+
|
|
3376
|
+
<details><summary><code>client.channels.<a href="/lib/Apologist/channels/client.rb">verify_whats_app_webhook</a>(id:) -> String</code></summary>
|
|
3377
|
+
<dl>
|
|
3378
|
+
<dd>
|
|
3379
|
+
|
|
3380
|
+
#### 📝 Description
|
|
3381
|
+
|
|
3382
|
+
<dl>
|
|
3383
|
+
<dd>
|
|
3384
|
+
|
|
3385
|
+
<dl>
|
|
3386
|
+
<dd>
|
|
3387
|
+
|
|
3388
|
+
Handles the Meta WhatsApp Cloud API webhook verification handshake, echoing `hub.challenge` when `hub.verify_token` matches the channel's configured token.
|
|
3389
|
+
</dd>
|
|
3390
|
+
</dl>
|
|
3391
|
+
</dd>
|
|
3392
|
+
</dl>
|
|
3393
|
+
|
|
3394
|
+
#### 🔌 Usage
|
|
3395
|
+
|
|
3396
|
+
<dl>
|
|
3397
|
+
<dd>
|
|
3398
|
+
|
|
3399
|
+
<dl>
|
|
3400
|
+
<dd>
|
|
3401
|
+
|
|
3402
|
+
```ruby
|
|
3403
|
+
client.channels.verify_whats_app_webhook(
|
|
3404
|
+
id: "id",
|
|
3405
|
+
hub_mode: "subscribe",
|
|
3406
|
+
hub_verify_token: "hub.verify_token"
|
|
3407
|
+
)
|
|
3408
|
+
```
|
|
3409
|
+
</dd>
|
|
3410
|
+
</dl>
|
|
3411
|
+
</dd>
|
|
3412
|
+
</dl>
|
|
3413
|
+
|
|
3414
|
+
#### ⚙️ Parameters
|
|
3415
|
+
|
|
3416
|
+
<dl>
|
|
3417
|
+
<dd>
|
|
3418
|
+
|
|
3419
|
+
<dl>
|
|
3420
|
+
<dd>
|
|
3421
|
+
|
|
3422
|
+
**id:** `String` — The channel id
|
|
3423
|
+
|
|
3424
|
+
</dd>
|
|
3425
|
+
</dl>
|
|
3426
|
+
|
|
3427
|
+
<dl>
|
|
3428
|
+
<dd>
|
|
3429
|
+
|
|
3430
|
+
**hub_mode:** `Apologist::Channels::Types::VerifyWhatsAppWebhookRequestHubMode`
|
|
3431
|
+
|
|
3432
|
+
</dd>
|
|
3433
|
+
</dl>
|
|
3434
|
+
|
|
3435
|
+
<dl>
|
|
3436
|
+
<dd>
|
|
3437
|
+
|
|
3438
|
+
**hub_verify_token:** `String`
|
|
3439
|
+
|
|
3440
|
+
</dd>
|
|
3441
|
+
</dl>
|
|
3442
|
+
|
|
3443
|
+
<dl>
|
|
3444
|
+
<dd>
|
|
3445
|
+
|
|
3446
|
+
**hub_challenge:** `String`
|
|
3447
|
+
|
|
3448
|
+
</dd>
|
|
3449
|
+
</dl>
|
|
3450
|
+
|
|
3451
|
+
<dl>
|
|
3452
|
+
<dd>
|
|
3453
|
+
|
|
3454
|
+
**request_options:** `Apologist::Channels::RequestOptions`
|
|
3455
|
+
|
|
3456
|
+
</dd>
|
|
3457
|
+
</dl>
|
|
3458
|
+
</dd>
|
|
3459
|
+
</dl>
|
|
3460
|
+
|
|
3461
|
+
|
|
3462
|
+
</dd>
|
|
3463
|
+
</dl>
|
|
3464
|
+
</details>
|
|
3465
|
+
|
|
3466
|
+
<details><summary><code>client.channels.<a href="/lib/Apologist/channels/client.rb">receive_whats_app_message</a>(id:, request) -> </code></summary>
|
|
3467
|
+
<dl>
|
|
3468
|
+
<dd>
|
|
3469
|
+
|
|
3470
|
+
#### 📝 Description
|
|
3471
|
+
|
|
3472
|
+
<dl>
|
|
3473
|
+
<dd>
|
|
3474
|
+
|
|
3475
|
+
<dl>
|
|
3476
|
+
<dd>
|
|
3477
|
+
|
|
3478
|
+
Receives WhatsApp Cloud API message events for the channel. Payload shape is defined by Meta. Signature verification via `x-hub-signature-256` is used when the channel has an App Secret configured; otherwise the webhook relies on URL secrecy and/or an `api_key` query parameter.
|
|
3479
|
+
</dd>
|
|
3480
|
+
</dl>
|
|
3481
|
+
</dd>
|
|
3482
|
+
</dl>
|
|
3483
|
+
|
|
3484
|
+
#### 🔌 Usage
|
|
3485
|
+
|
|
3486
|
+
<dl>
|
|
3487
|
+
<dd>
|
|
3488
|
+
|
|
3489
|
+
<dl>
|
|
3490
|
+
<dd>
|
|
3491
|
+
|
|
3492
|
+
```ruby
|
|
3493
|
+
client.channels.receive_whats_app_message(
|
|
3494
|
+
id: "id",
|
|
3495
|
+
body: {
|
|
3496
|
+
key: "value"
|
|
3497
|
+
}
|
|
3498
|
+
)
|
|
3499
|
+
```
|
|
3500
|
+
</dd>
|
|
3501
|
+
</dl>
|
|
3502
|
+
</dd>
|
|
3503
|
+
</dl>
|
|
3504
|
+
|
|
3505
|
+
#### ⚙️ Parameters
|
|
3506
|
+
|
|
3507
|
+
<dl>
|
|
3508
|
+
<dd>
|
|
3509
|
+
|
|
3510
|
+
<dl>
|
|
3511
|
+
<dd>
|
|
3512
|
+
|
|
3513
|
+
**id:** `String` — The channel id
|
|
3514
|
+
|
|
3515
|
+
</dd>
|
|
3516
|
+
</dl>
|
|
3517
|
+
|
|
3518
|
+
<dl>
|
|
3519
|
+
<dd>
|
|
3520
|
+
|
|
3521
|
+
**hub_signature256:** `String` — Meta `sha256=<hex>` HMAC of the raw body keyed with the WhatsApp App Secret. Required when the channel has an App Secret configured and the webhook URL does not include an api_key.
|
|
3522
|
+
|
|
3523
|
+
</dd>
|
|
3524
|
+
</dl>
|
|
3525
|
+
|
|
3526
|
+
<dl>
|
|
3527
|
+
<dd>
|
|
3528
|
+
|
|
3529
|
+
**request:** `Internal::Types::Hash[String, Object]` — WhatsApp Cloud API webhook payload (`entry` + `changes`).
|
|
3530
|
+
|
|
3531
|
+
</dd>
|
|
3532
|
+
</dl>
|
|
3533
|
+
|
|
3534
|
+
<dl>
|
|
3535
|
+
<dd>
|
|
3536
|
+
|
|
3537
|
+
**request_options:** `Apologist::Channels::RequestOptions`
|
|
3538
|
+
|
|
3539
|
+
</dd>
|
|
3540
|
+
</dl>
|
|
3541
|
+
</dd>
|
|
3542
|
+
</dl>
|
|
3543
|
+
|
|
3544
|
+
|
|
3006
3545
|
</dd>
|
|
3007
3546
|
</dl>
|
|
3008
3547
|
</details>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apologist
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Apologist
|
|
@@ -27,6 +27,9 @@ files:
|
|
|
27
27
|
- Rakefile
|
|
28
28
|
- custom.gemspec.rb
|
|
29
29
|
- lib/Apologist.rb
|
|
30
|
+
- lib/Apologist/agent/client.rb
|
|
31
|
+
- lib/Apologist/agent/types/pause_agent_response.rb
|
|
32
|
+
- lib/Apologist/agent/types/resume_agent_response.rb
|
|
30
33
|
- lib/Apologist/benchmarks/client.rb
|
|
31
34
|
- lib/Apologist/benchmarks/types/benchmark_run_request.rb
|
|
32
35
|
- lib/Apologist/benchmarks/types/benchmark_run_request_content.rb
|
|
@@ -47,8 +50,11 @@ files:
|
|
|
47
50
|
- lib/Apologist/channels/types/receive_line_webhook_request.rb
|
|
48
51
|
- lib/Apologist/channels/types/receive_telegram_update_request.rb
|
|
49
52
|
- lib/Apologist/channels/types/receive_twilio_message_request.rb
|
|
53
|
+
- lib/Apologist/channels/types/receive_whats_app_message_request.rb
|
|
50
54
|
- lib/Apologist/channels/types/verify_facebook_webhook_request.rb
|
|
51
55
|
- lib/Apologist/channels/types/verify_facebook_webhook_request_hub_mode.rb
|
|
56
|
+
- lib/Apologist/channels/types/verify_whats_app_webhook_request.rb
|
|
57
|
+
- lib/Apologist/channels/types/verify_whats_app_webhook_request_hub_mode.rb
|
|
52
58
|
- lib/Apologist/chat/client.rb
|
|
53
59
|
- lib/Apologist/chat/types/feedback_request.rb
|
|
54
60
|
- lib/Apologist/chat/types/flag_request.rb
|
|
@@ -59,6 +65,15 @@ files:
|
|
|
59
65
|
- lib/Apologist/chat/types/list_chat_completions_response.rb
|
|
60
66
|
- lib/Apologist/chat/types/share_request.rb
|
|
61
67
|
- lib/Apologist/client.rb
|
|
68
|
+
- lib/Apologist/conversations/client.rb
|
|
69
|
+
- lib/Apologist/conversations/types/get_conversation_request.rb
|
|
70
|
+
- lib/Apologist/conversations/types/get_conversation_response.rb
|
|
71
|
+
- lib/Apologist/conversations/types/list_conversations_request.rb
|
|
72
|
+
- lib/Apologist/conversations/types/list_conversations_response.rb
|
|
73
|
+
- lib/Apologist/conversations/types/pause_conversation_request.rb
|
|
74
|
+
- lib/Apologist/conversations/types/pause_conversation_response.rb
|
|
75
|
+
- lib/Apologist/conversations/types/resume_conversation_request.rb
|
|
76
|
+
- lib/Apologist/conversations/types/resume_conversation_response.rb
|
|
62
77
|
- lib/Apologist/corpus/client.rb
|
|
63
78
|
- lib/Apologist/corpus/types/corpus_search_request.rb
|
|
64
79
|
- lib/Apologist/corpus/types/corpus_search_request_filters.rb
|
|
@@ -116,6 +131,7 @@ files:
|
|
|
116
131
|
- lib/Apologist/shares/client.rb
|
|
117
132
|
- lib/Apologist/shares/types/get_shared_messages_request.rb
|
|
118
133
|
- lib/Apologist/shares/types/get_shared_messages_response.rb
|
|
134
|
+
- lib/Apologist/types/agent_pause_state.rb
|
|
119
135
|
- lib/Apologist/types/chat_completion_request.rb
|
|
120
136
|
- lib/Apologist/types/chat_completion_request_logprobs.rb
|
|
121
137
|
- lib/Apologist/types/chat_completion_request_metadata.rb
|
|
@@ -131,6 +147,7 @@ files:
|
|
|
131
147
|
- lib/Apologist/types/chat_completion_response_usage.rb
|
|
132
148
|
- lib/Apologist/types/chat_message.rb
|
|
133
149
|
- lib/Apologist/types/chat_message_role.rb
|
|
150
|
+
- lib/Apologist/types/conversation.rb
|
|
134
151
|
- lib/Apologist/types/cta_match_request.rb
|
|
135
152
|
- lib/Apologist/types/error.rb
|
|
136
153
|
- lib/Apologist/types/success_response.rb
|