kapso-client-ruby 1.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d1396532c211130ca44e86a95c6928fed4e9005041326f64bf3bad63ef187eb9
4
+ data.tar.gz: 563208fa7bd2c5c4d1025e0f05ac400b52aaa2c42bad5c99279803d985eb4bd1
5
+ SHA512:
6
+ metadata.gz: c90eb6b79eb4a63e0c0c5bff5194b2ae0dbd9b1fb8ceff914b15053b8b3b2ad5a3fdcb85e54e197c241fc760aad7f75b0b841f765cca8e60ca229c574e4340c2
7
+ data.tar.gz: e1191ea0de205a6590e4f9affa69adf315a007fb0479b89a7a2d0507644f8ccbbdc34ad653be748b62b6c4a0cd1c91f835ec539e31f2bc25399dfccf29eed970
data/.rubocop.yml ADDED
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ # RuboCop configuration for WhatsApp Cloud API Ruby SDK
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 3.0
7
+ NewCops: enable
8
+ Exclude:
9
+ - 'vendor/**/*'
10
+ - 'bin/**/*'
11
+ - 'spec/fixtures/**/*'
12
+
13
+ # Metrics
14
+ Layout/LineLength:
15
+ Max: 120
16
+ AllowedPatterns: ['\A#']
17
+
18
+ Metrics/MethodLength:
19
+ Max: 25
20
+ Exclude:
21
+ - 'spec/**/*'
22
+
23
+ Metrics/ClassLength:
24
+ Max: 150
25
+ Exclude:
26
+ - 'spec/**/*'
27
+
28
+ Metrics/BlockLength:
29
+ Max: 25
30
+ Exclude:
31
+ - 'spec/**/*'
32
+ - '*.gemspec'
33
+ - 'Rakefile'
34
+
35
+ Metrics/AbcSize:
36
+ Max: 20
37
+ Exclude:
38
+ - 'spec/**/*'
39
+
40
+ # Style
41
+ Style/Documentation:
42
+ Enabled: false
43
+
44
+ Style/StringLiterals:
45
+ EnforcedStyle: single_quotes
46
+
47
+ Style/StringLiteralsInInterpolation:
48
+ EnforcedStyle: single_quotes
49
+
50
+ Style/FrozenStringLiteralComment:
51
+ Enabled: true
52
+
53
+ Style/ClassAndModuleChildren:
54
+ EnforcedStyle: compact
55
+
56
+ # Layout
57
+ Layout/MultilineMethodCallIndentation:
58
+ EnforcedStyle: indented
59
+
60
+ Layout/FirstArrayElementIndentation:
61
+ EnforcedStyle: consistent
62
+
63
+ Layout/FirstHashElementIndentation:
64
+ EnforcedStyle: consistent
65
+
66
+ # Naming
67
+ Naming/FileName:
68
+ Exclude:
69
+ - 'whatsapp-cloud-api-ruby.gemspec'
70
+
71
+ # RSpec specific rules
72
+ RSpec/ExampleLength:
73
+ Max: 15
74
+
75
+ RSpec/MultipleExpectations:
76
+ Max: 5
77
+
78
+ RSpec/NestedGroups:
79
+ Max: 4
80
+
81
+ RSpec/DescribeClass:
82
+ Enabled: false
data/CHANGELOG.md ADDED
@@ -0,0 +1,92 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2025-01-09
9
+
10
+ ### Added
11
+
12
+ - Initial release of WhatsApp Cloud API Ruby SDK
13
+ - Complete WhatsApp Cloud API support with all message types
14
+ - Support for text, image, audio, video, document, sticker, location, and contact messages
15
+ - Interactive message support (buttons, lists, product catalogs)
16
+ - Template message creation and management
17
+ - Media upload, download, and management
18
+ - Phone number registration and verification
19
+ - Call management and permissions (via Kapso proxy)
20
+ - Conversation history and management (via Kapso proxy)
21
+ - Contact management with metadata and tagging (via Kapso proxy)
22
+ - Comprehensive error handling with categorization and retry hints
23
+ - Debug logging with configurable levels
24
+ - Automatic retry logic with exponential backoff
25
+ - Rate limiting detection and handling
26
+ - Support for both Meta Graph API and Kapso proxy
27
+ - Webhook signature verification utilities
28
+ - Extensive documentation and examples
29
+ - Test suite with VCR cassettes
30
+ - Ruby 2.7+ compatibility
31
+
32
+ ### Features
33
+
34
+ #### Core Messaging
35
+ - Send text messages with URL preview support
36
+ - Send media messages (images, audio, video, documents, stickers)
37
+ - Send location and contact messages
38
+ - Send interactive button and list messages
39
+ - Send template messages with parameter substitution
40
+ - Message reactions (add/remove)
41
+ - Message read status and typing indicators
42
+
43
+ #### Media Management
44
+ - Upload media files with automatic MIME type detection
45
+ - Download media with authentication handling
46
+ - Get media metadata (size, type, SHA256)
47
+ - Delete media files
48
+ - Save media directly to files
49
+ - Support for different authentication strategies
50
+
51
+ #### Template Management
52
+ - List, create, update, and delete message templates
53
+ - Template builders for marketing, utility, and authentication templates
54
+ - Component validation and example handling
55
+ - Support for all template types (text, media, interactive)
56
+
57
+ #### Advanced Features (Kapso Proxy)
58
+ - Message history queries with filtering
59
+ - Conversation management and status updates
60
+ - Contact management with metadata and search
61
+ - Call history and management
62
+ - Analytics and reporting
63
+ - Data export/import capabilities
64
+
65
+ #### Error Handling
66
+ - Comprehensive error categorization (14+ categories)
67
+ - Intelligent retry recommendations
68
+ - Rate limiting detection with retry-after support
69
+ - Detailed error context and debugging information
70
+ - Custom error classes for different scenarios
71
+
72
+ #### Developer Experience
73
+ - Extensive documentation with code examples
74
+ - Debug logging with request/response tracing
75
+ - Configurable HTTP client with connection pooling
76
+ - Type-safe response objects
77
+ - Comprehensive test suite
78
+ - Ruby best practices and conventions
79
+
80
+ ### Dependencies
81
+ - faraday (~> 2.0) - HTTP client
82
+ - faraday-multipart (~> 1.0) - Multipart form support
83
+ - mime-types (~> 3.0) - MIME type detection
84
+ - dry-validation (~> 1.10) - Input validation
85
+
86
+ ### Development Dependencies
87
+ - rspec (~> 3.0) - Testing framework
88
+ - webmock (~> 3.18) - HTTP request mocking
89
+ - vcr (~> 6.0) - HTTP interaction recording
90
+ - rubocop (~> 1.50) - Code style checking
91
+ - simplecov (~> 0.22) - Code coverage
92
+ - yard (~> 0.9) - Documentation generation
data/Gemfile ADDED
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in whatsapp-cloud-api-ruby.gemspec
6
+ gemspec
7
+
8
+ gem 'rake', '~> 13.0'
9
+
10
+ group :development, :test do
11
+ gem 'rspec', '~> 3.12'
12
+ gem 'webmock', '~> 3.18'
13
+ gem 'vcr', '~> 6.1'
14
+ gem 'simplecov', '~> 0.22'
15
+ gem 'rubocop', '~> 1.50'
16
+ gem 'rubocop-rspec', '~> 2.20'
17
+ gem 'yard', '~> 0.9'
18
+ gem 'pry', '~> 0.14'
19
+ gem 'pry-byebug', '~> 3.10'
20
+ gem 'dotenv', '~> 2.8' # For loading .env files in examples
21
+ end