autentique 0.1.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 +7 -0
- data/CHANGELOG.md +62 -0
- data/CONTRIBUTING.md +254 -0
- data/LICENSE +21 -0
- data/README.md +504 -0
- data/autentique.gemspec +33 -0
- data/lib/autentique/client.rb +101 -0
- data/lib/autentique/errors.rb +31 -0
- data/lib/autentique/models/document.rb +43 -0
- data/lib/autentique/models/document_input.rb +43 -0
- data/lib/autentique/models/signature.rb +41 -0
- data/lib/autentique/models/signer_input.rb +29 -0
- data/lib/autentique/resources/documents/create.rb +33 -0
- data/lib/autentique/resources/documents/delete.rb +26 -0
- data/lib/autentique/resources/documents/find.rb +45 -0
- data/lib/autentique/resources/documents/list.rb +41 -0
- data/lib/autentique/resources/documents/pending.rb +40 -0
- data/lib/autentique/resources/documents.rb +164 -0
- data/lib/autentique/resources/folders.rb +78 -0
- data/lib/autentique/resources.rb +6 -0
- data/lib/autentique/version.rb +5 -0
- data/lib/autentique.rb +74 -0
- metadata +98 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 21da834df25916c1cdc87f2818c3c91dded5682fd749b7e637ec9e3b76e434b7
|
|
4
|
+
data.tar.gz: d6d71199c1fc0d27778d07888ecea49fbc16e33711741c9dfb29eb7496b3bf0e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: fe44cfff47087f92184b7b5b14b66f72416ef748e1b09ba5fe0badecf4654c8d4af083ee11393ba421e4fbda596a01378ed027b272ce71f3073e4f052019f2a5
|
|
7
|
+
data.tar.gz: f17affdb8233040fe3c6eeab0895c44f6ffb85d9eb53353751738fbc0402e011249b96815a8bc62cca2a418ec234000677a6614fd038896781866aa68dfb297c
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2025-01-25
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Initial release of the Autentique Ruby gem
|
|
14
|
+
- Client class for API communication
|
|
15
|
+
- Document resource with create, find, list, and delete operations
|
|
16
|
+
- Folder resource for folder management
|
|
17
|
+
- Model classes for Document, Signature, DocumentInput, and SignerInput
|
|
18
|
+
- Full support for document creation with:
|
|
19
|
+
- Multiple signers
|
|
20
|
+
- Various authentication methods (email, SMS, WhatsApp)
|
|
21
|
+
- Security verifications (SMS, photo ID, biometric)
|
|
22
|
+
- Signature field positioning
|
|
23
|
+
- Advanced document configurations
|
|
24
|
+
- Sandbox mode support for testing
|
|
25
|
+
- Comprehensive error handling
|
|
26
|
+
- Rate limit awareness (60 requests/minute)
|
|
27
|
+
- Rails integration examples
|
|
28
|
+
- Complete documentation and examples
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
- ✅ Create documents with file upload
|
|
32
|
+
- ✅ Retrieve documents by ID
|
|
33
|
+
- ✅ List documents with filters
|
|
34
|
+
- ✅ Delete documents
|
|
35
|
+
- ✅ Folder management (list, create, delete)
|
|
36
|
+
- ✅ Support for all signer actions (SIGN, SIGN_AS_A_WITNESS, APPROVE, RECOGNIZE)
|
|
37
|
+
- ✅ Multiple delivery methods (email, SMS, WhatsApp, link-based)
|
|
38
|
+
- ✅ Security verifications
|
|
39
|
+
- ✅ Signature field positioning
|
|
40
|
+
- ✅ Document locale support
|
|
41
|
+
- ✅ Sandbox mode
|
|
42
|
+
- ✅ Comprehensive error handling
|
|
43
|
+
|
|
44
|
+
### Dependencies
|
|
45
|
+
- graphql-client ~> 0.18
|
|
46
|
+
- mime-types ~> 3.0
|
|
47
|
+
|
|
48
|
+
### Development Dependencies
|
|
49
|
+
- rspec ~> 3.12
|
|
50
|
+
- webmock ~> 3.18
|
|
51
|
+
- vcr ~> 6.1
|
|
52
|
+
- rubocop ~> 1.50
|
|
53
|
+
|
|
54
|
+
## [0.0.1] - 2025-01-24
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
- Project structure
|
|
58
|
+
- Basic gem scaffolding
|
|
59
|
+
|
|
60
|
+
[Unreleased]: https://github.com/yourusername/autentique-ruby/compare/v0.1.0...HEAD
|
|
61
|
+
[0.1.0]: https://github.com/yourusername/autentique-ruby/releases/tag/v0.1.0
|
|
62
|
+
[0.0.1]: https://github.com/yourusername/autentique-ruby/releases/tag/v0.0.1
|
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
# Contributing to Autentique Ruby Gem
|
|
2
|
+
|
|
3
|
+
First off, thank you for considering contributing to the Autentique Ruby gem! It's people like you that make this gem better for everyone.
|
|
4
|
+
|
|
5
|
+
## Code of Conduct
|
|
6
|
+
|
|
7
|
+
By participating in this project, you are expected to uphold our Code of Conduct:
|
|
8
|
+
|
|
9
|
+
- Be respectful and inclusive
|
|
10
|
+
- Be collaborative
|
|
11
|
+
- Be professional
|
|
12
|
+
- Focus on what is best for the community
|
|
13
|
+
|
|
14
|
+
## How Can I Contribute?
|
|
15
|
+
|
|
16
|
+
### Reporting Bugs
|
|
17
|
+
|
|
18
|
+
Before creating bug reports, please check the existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
|
|
19
|
+
|
|
20
|
+
**Bug Report Template:**
|
|
21
|
+
|
|
22
|
+
```markdown
|
|
23
|
+
**Description**
|
|
24
|
+
A clear description of what the bug is.
|
|
25
|
+
|
|
26
|
+
**To Reproduce**
|
|
27
|
+
Steps to reproduce the behavior:
|
|
28
|
+
1. Initialize client with '...'
|
|
29
|
+
2. Call method '...'
|
|
30
|
+
3. See error
|
|
31
|
+
|
|
32
|
+
**Expected behavior**
|
|
33
|
+
What you expected to happen.
|
|
34
|
+
|
|
35
|
+
**Actual behavior**
|
|
36
|
+
What actually happened.
|
|
37
|
+
|
|
38
|
+
**Environment:**
|
|
39
|
+
- Ruby version:
|
|
40
|
+
- Gem version:
|
|
41
|
+
- OS:
|
|
42
|
+
|
|
43
|
+
**Additional context**
|
|
44
|
+
Any other context about the problem.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Suggesting Enhancements
|
|
48
|
+
|
|
49
|
+
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include:
|
|
50
|
+
|
|
51
|
+
- A clear and descriptive title
|
|
52
|
+
- A detailed description of the proposed functionality
|
|
53
|
+
- Examples of how the feature would be used
|
|
54
|
+
- Why this feature would be useful
|
|
55
|
+
|
|
56
|
+
### Pull Requests
|
|
57
|
+
|
|
58
|
+
1. **Fork the repo** and create your branch from `main`
|
|
59
|
+
2. **Write clear, descriptive commit messages**
|
|
60
|
+
3. **Add tests** for your changes
|
|
61
|
+
4. **Ensure tests pass**: `bundle exec rspec`
|
|
62
|
+
5. **Check code style**: `bundle exec rubocop`
|
|
63
|
+
6. **Update documentation** if needed
|
|
64
|
+
7. **Submit your pull request**
|
|
65
|
+
|
|
66
|
+
## Development Process
|
|
67
|
+
|
|
68
|
+
### Setting Up Your Development Environment
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Clone your fork
|
|
72
|
+
git clone https://github.com/your-username/autentique-ruby.git
|
|
73
|
+
cd autentique-ruby
|
|
74
|
+
|
|
75
|
+
# Install dependencies
|
|
76
|
+
bundle install
|
|
77
|
+
|
|
78
|
+
# Set up your API key for testing
|
|
79
|
+
export AUTENTIQUE_API_KEY="your_sandbox_key"
|
|
80
|
+
|
|
81
|
+
# Run tests
|
|
82
|
+
bundle exec rspec
|
|
83
|
+
|
|
84
|
+
# Run linter
|
|
85
|
+
bundle exec rubocop
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Running Tests
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Run all tests
|
|
92
|
+
bundle exec rspec
|
|
93
|
+
|
|
94
|
+
# Run specific test file
|
|
95
|
+
bundle exec rspec spec/autentique_spec.rb
|
|
96
|
+
|
|
97
|
+
# Run with coverage
|
|
98
|
+
COVERAGE=true bundle exec rspec
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Code Style
|
|
102
|
+
|
|
103
|
+
This project follows the [Ruby Style Guide](https://rubystyle.guide/). We use RuboCop to enforce style:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Check style
|
|
107
|
+
bundle exec rubocop
|
|
108
|
+
|
|
109
|
+
# Auto-fix issues
|
|
110
|
+
bundle exec rubocop -a
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Writing Tests
|
|
114
|
+
|
|
115
|
+
- Write tests for all new functionality
|
|
116
|
+
- Maintain or improve code coverage
|
|
117
|
+
- Use RSpec for testing
|
|
118
|
+
- Use VCR cassettes for API interactions
|
|
119
|
+
- Mock external dependencies when appropriate
|
|
120
|
+
|
|
121
|
+
Example test structure:
|
|
122
|
+
|
|
123
|
+
```ruby
|
|
124
|
+
RSpec.describe Autentique::Resources::Documents do
|
|
125
|
+
let(:client) { test_client }
|
|
126
|
+
let(:documents) { described_class.new(client) }
|
|
127
|
+
|
|
128
|
+
describe '#create' do
|
|
129
|
+
it 'creates a document successfully' do
|
|
130
|
+
VCR.use_cassette('documents/create') do
|
|
131
|
+
result = documents.create(
|
|
132
|
+
file: 'spec/fixtures/test.pdf',
|
|
133
|
+
document: { name: 'Test' },
|
|
134
|
+
signers: [{ email: 'test@example.com', action: 'SIGN' }]
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
expect(result).to be_a(Autentique::Models::Document)
|
|
138
|
+
expect(result.name).to eq('Test')
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Commit Messages
|
|
146
|
+
|
|
147
|
+
Write clear, descriptive commit messages:
|
|
148
|
+
|
|
149
|
+
- Use the present tense ("Add feature" not "Added feature")
|
|
150
|
+
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
|
|
151
|
+
- Limit the first line to 72 characters
|
|
152
|
+
- Reference issues and pull requests when relevant
|
|
153
|
+
|
|
154
|
+
Good commit messages:
|
|
155
|
+
```
|
|
156
|
+
Add support for document templates
|
|
157
|
+
|
|
158
|
+
Implement folder management API
|
|
159
|
+
- Add Folders resource class
|
|
160
|
+
- Add list, create, delete methods
|
|
161
|
+
- Add comprehensive tests
|
|
162
|
+
|
|
163
|
+
Fixes #42
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Documentation
|
|
167
|
+
|
|
168
|
+
- Update README.md for new features
|
|
169
|
+
- Add YARD documentation to public methods
|
|
170
|
+
- Update CHANGELOG.md following [Keep a Changelog](https://keepachangelog.com/)
|
|
171
|
+
- Add examples for complex features
|
|
172
|
+
|
|
173
|
+
Example documentation:
|
|
174
|
+
|
|
175
|
+
```ruby
|
|
176
|
+
# Retrieve a document by ID
|
|
177
|
+
#
|
|
178
|
+
# @param id [String] The document UUID
|
|
179
|
+
# @return [Models::Document] The retrieved document
|
|
180
|
+
# @raise [NotFoundError] if document doesn't exist
|
|
181
|
+
# @raise [AuthenticationError] if API key is invalid
|
|
182
|
+
#
|
|
183
|
+
# @example
|
|
184
|
+
# client = Autentique::Client.new(api_key: 'key')
|
|
185
|
+
# doc = client.documents.find('document-uuid')
|
|
186
|
+
# puts doc.name
|
|
187
|
+
def find(id)
|
|
188
|
+
# implementation
|
|
189
|
+
end
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Project Structure
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
autentique-ruby/
|
|
196
|
+
├── lib/
|
|
197
|
+
│ ├── autentique/
|
|
198
|
+
│ │ ├── models/
|
|
199
|
+
│ │ │ └── document.rb
|
|
200
|
+
│ │ ├── resources/
|
|
201
|
+
│ │ │ ├── documents.rb
|
|
202
|
+
│ │ │ └── folders.rb
|
|
203
|
+
│ │ ├── client.rb
|
|
204
|
+
│ │ ├── errors.rb
|
|
205
|
+
│ │ └── version.rb
|
|
206
|
+
│ └── autentique.rb
|
|
207
|
+
├── spec/
|
|
208
|
+
│ ├── fixtures/
|
|
209
|
+
│ ├── models/
|
|
210
|
+
│ ├── resources/
|
|
211
|
+
│ ├── autentique_spec.rb
|
|
212
|
+
│ └── spec_helper.rb
|
|
213
|
+
├── examples/
|
|
214
|
+
├── README.md
|
|
215
|
+
├── CHANGELOG.md
|
|
216
|
+
└── autentique.gemspec
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Adding New Features
|
|
220
|
+
|
|
221
|
+
When adding a new feature:
|
|
222
|
+
|
|
223
|
+
1. **Create an issue** discussing the feature
|
|
224
|
+
2. **Get feedback** from maintainers
|
|
225
|
+
3. **Implement** the feature with tests
|
|
226
|
+
4. **Document** the feature
|
|
227
|
+
5. **Update** CHANGELOG.md
|
|
228
|
+
6. **Submit** a pull request
|
|
229
|
+
|
|
230
|
+
## Release Process
|
|
231
|
+
|
|
232
|
+
Maintainers will handle releases:
|
|
233
|
+
|
|
234
|
+
1. Update version in `lib/autentique/version.rb`
|
|
235
|
+
2. Update CHANGELOG.md
|
|
236
|
+
3. Commit changes
|
|
237
|
+
4. Create git tag
|
|
238
|
+
5. Push to GitHub
|
|
239
|
+
6. Build and publish gem
|
|
240
|
+
|
|
241
|
+
## Questions?
|
|
242
|
+
|
|
243
|
+
Feel free to:
|
|
244
|
+
- Open an issue for questions
|
|
245
|
+
- Start a discussion on GitHub
|
|
246
|
+
- Contact maintainers directly
|
|
247
|
+
|
|
248
|
+
## License
|
|
249
|
+
|
|
250
|
+
By contributing, you agree that your contributions will be licensed under the MIT License.
|
|
251
|
+
|
|
252
|
+
## Thank You!
|
|
253
|
+
|
|
254
|
+
Your contributions make this project better. We appreciate your time and effort! 🎉
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 [Your Name]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|