Skip to content

Commit 8ec41f6

Browse files
feat: release v1.0.1 with bug fixes and improvements
1 parent b8db139 commit 8ec41f6

19 files changed

+9085
-346
lines changed

.gitignore

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,33 @@
11
# Dependencies
22
node_modules/
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
73

84
# Build output
95
dist/
10-
lib/
11-
*.tgz
6+
*.tsbuildinfo
127

13-
# Environment files
14-
.env
15-
.env.*
16-
!.env.example
8+
# Testing
9+
coverage/
10+
*.log
1711

1812
# OS files
1913
.DS_Store
2014
Thumbs.db
2115

22-
# IDE
23-
.vscode/
16+
# IDE files
2417
.idea/
18+
.vscode/
2519
*.swp
2620
*.swo
2721

28-
# Coverage
29-
coverage/
30-
.nyc_output/
31-
32-
# Private keys or credentials
33-
*.pem
34-
*.key
35-
*.cert
36-
*credentials*
37-
*secrets*
38-
*.private
39-
40-
# Test artifacts
41-
*.test.js
42-
*.spec.js
22+
# Environment files
23+
.env
24+
.env.local
25+
.env.*.local
4326

4427
# Temporary files
4528
*.tmp
4629
*.temp
47-
.cache/
30+
.cache/
31+
32+
# Release-specific files
33+
RELEASE_INSTRUCTIONS.md

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Changelog
2+
3+
All notable changes to the ValidKit TypeScript SDK 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.1] - 2025-01-15
9+
10+
### Fixed
11+
- Client-side transformation for compact format responses (V1 API always returns full format)
12+
- Batch response parsing to handle actual API response structure
13+
- Test expectations to match real API behavior
14+
- Added trace_id and request_id to batch response types
15+
- Linting issues and trailing spaces
16+
17+
### Added
18+
- Comprehensive real API test suite
19+
- Response transformation logic for V1 API compatibility
20+
- processing_time_ms field mapping
21+
22+
## [1.0.0] - 2025-01-14
23+
24+
### Added
25+
- Initial release of ValidKit TypeScript SDK
26+
- Single email verification with `verifyEmail()`
27+
- Batch email verification with `verifyBatch()` (up to 10K emails)
28+
- Agent-optimized endpoint with `verifyBatchAgent()`
29+
- Async batch processing with `verifyBatchAsync()`
30+
- Full TypeScript support with comprehensive type definitions
31+
- Token-optimized compact response format (80% smaller)
32+
- Multi-agent tracing with trace_id/parent_id headers
33+
- Progress callbacks for batch processing
34+
- Automatic retry logic with exponential backoff
35+
- Rate limit handling
36+
- Both ESM and CommonJS builds
37+
- Comprehensive error handling with typed exceptions
38+
- AI agent integration examples (LangChain, AutoGPT, Vercel AI)
39+
40+
### Features
41+
- Agent-scale rate limits (1,000+ req/min)
42+
- Bulk processing support
43+
- Signal Pool integration for Pro+ tiers
44+
- Webhook support for async processing
45+
- Cross-platform compatibility (Node.js and browsers)
46+
47+
[1.0.1]: https://github.com/ValidKit/validkit-typescript-sdk/compare/v1.0.0...v1.0.1
48+
[1.0.0]: https://github.com/ValidKit/validkit-typescript-sdk/releases/tag/v1.0.0

CONTRIBUTING.md

Lines changed: 12 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,6 @@
22

33
Thank you for your interest in contributing to ValidKit! We welcome contributions from the community.
44

5-
## Commit Message Convention
6-
7-
We follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for clear and consistent commit history.
8-
9-
### Format
10-
```
11-
<type>[optional scope]: <description>
12-
13-
[optional body]
14-
15-
[optional footer(s)]
16-
```
17-
18-
### Types
19-
- `feat`: New feature
20-
- `fix`: Bug fix
21-
- `docs`: Documentation only changes
22-
- `style`: Code style changes (formatting, missing semicolons, etc)
23-
- `refactor`: Code change that neither fixes a bug nor adds a feature
24-
- `perf`: Performance improvements
25-
- `test`: Adding missing tests or correcting existing tests
26-
- `build`: Changes that affect the build system or external dependencies
27-
- `ci`: Changes to CI configuration files and scripts
28-
- `chore`: Other changes that don't modify src or test files
29-
30-
### Examples
31-
```
32-
feat: add support for custom timeout configuration
33-
34-
fix: handle network errors gracefully in batch processing
35-
36-
docs: improve TypeScript examples in README
37-
```
38-
395
## Code of Conduct
406

417
By participating in this project, you agree to abide by our Code of Conduct:
@@ -48,7 +14,7 @@ By participating in this project, you agree to abide by our Code of Conduct:
4814

4915
### Reporting Bugs
5016

51-
1. Check if the bug has already been reported in [Issues](https://github.com/validkit/typescript-sdk/issues)
17+
1. Check if the bug has already been reported in [Issues](https://github.com/ValidKit/validkit-typescript-sdk/issues)
5218
2. If not, create a new issue with:
5319
- Clear title and description
5420
- Steps to reproduce
@@ -64,90 +30,23 @@ By participating in this project, you agree to abide by our Code of Conduct:
6430
- Proposed API design
6531
- Benefits to users
6632

67-
### Pull Request Guidelines
68-
69-
#### Before Creating a PR
70-
71-
1. Fork the repository and clone locally
72-
2. Create a feature branch from `main`:
73-
```bash
74-
git checkout -b feat/your-feature-name
75-
# or
76-
git checkout -b fix/your-bug-fix
77-
```
78-
79-
3. Make your changes following TypeScript best practices
80-
4. Write/update tests to maintain coverage
81-
5. Run all checks:
82-
```bash
83-
npm run typecheck
84-
npm run lint
85-
npm test
86-
npm run build
87-
```
88-
89-
#### Commit Your Changes
90-
91-
Follow our commit convention:
92-
```bash
93-
# Single line commit
94-
git commit -m "feat: add retry configuration options"
95-
96-
# Multi-line commit with details
97-
git commit -m "feat: add custom headers support" -m "- Allow setting custom headers via options
98-
- Add X-Trace-ID header for request tracking
99-
- Update TypeScript definitions
100-
- Add examples to documentation"
101-
```
102-
103-
#### PR Title and Description
104-
105-
Your PR title should follow the same convention as commits:
106-
- `feat: add WebSocket support for real-time validation`
107-
- `fix: handle network timeouts gracefully`
108-
- `docs: improve TypeScript examples`
109-
- `perf: optimize batch processing memory usage`
110-
111-
In your PR description, include:
112-
113-
```markdown
114-
## What
115-
Brief description of what this PR does
116-
117-
## Why
118-
The problem it solves or feature it adds
119-
Closes #[issue number]
120-
121-
## How
122-
- Technical approach taken
123-
- Any design decisions made
124-
- Breaking changes (if any)
125-
126-
## Testing
127-
- Unit tests added/updated
128-
- Manual testing performed
129-
- Performance impact (if relevant)
130-
131-
## Checklist
132-
- [ ] Tests pass locally
133-
- [ ] TypeScript types are correct
134-
- [ ] Documentation updated
135-
- [ ] No breaking changes (or documented)
136-
```
137-
138-
#### After Creating Your PR
33+
### Pull Requests
13934

140-
1. Ensure all GitHub Actions checks pass
141-
2. Respond to code review feedback promptly
142-
3. Keep your branch up to date with `main`
143-
4. Be prepared to make changes based on feedback
35+
1. Fork the repository
36+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
37+
3. Make your changes
38+
4. Add/update tests
39+
5. Update documentation
40+
6. Commit with clear messages (`git commit -m 'feat: add amazing feature'`)
41+
7. Push to your fork (`git push origin feature/amazing-feature`)
42+
8. Open a Pull Request
14443

14544
### Development Setup
14645

14746
```bash
14847
# Clone your fork
149-
git clone https://github.com/YOUR_USERNAME/typescript-sdk.git
150-
cd typescript-sdk
48+
git clone https://github.com/YOUR_USERNAME/validkit-typescript-sdk.git
49+
cd validkit-typescript-sdk
15150

15251
# Install dependencies
15352
npm install

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ console.log(result.valid) // true/false
4444
// Batch verification with progress tracking
4545
const emails = ['email1@test.com', 'email2@test.com', /* ... up to 10K emails */]
4646
const results = await client.verifyBatch(emails, {
47-
format: 'compact', // 80% smaller responses
47+
format: 'compact', // 80% smaller responses (SDK transforms V1 API response)
4848
progress_callback: (processed, total) => {
4949
console.log(`Progress: ${processed}/${total}`)
5050
}
@@ -192,6 +192,8 @@ await client.verifyEmail(email: string, options?: {
192192
}
193193
```
194194

195+
> **Note:** The V1 API always returns full format responses. When compact format is requested, the SDK automatically transforms the response client-side to provide the expected compact format. The SDK also extracts the verification data from the API response wrapper for ease of use.
196+
195197
### Batch Email Verification
196198

197199
```typescript
@@ -310,7 +312,7 @@ const result: EmailVerificationResult = await client.verifyEmail(
310312
Comprehensive error handling with typed exceptions:
311313

312314
```typescript
313-
import { ValidKit, ValidationError, RateLimitError } from '@validkit/sdk';
315+
import { ValidKit, ValidationError, RateLimitError, BatchSizeError } from '@validkit/sdk';
314316

315317
try {
316318
const result = await client.verifyEmail('invalid@email');
@@ -319,6 +321,8 @@ try {
319321
console.log(`Rate limited. Retry after ${error.retryAfter}s`);
320322
} else if (error instanceof ValidationError) {
321323
console.log(`Validation error: ${error.message}`);
324+
} else if (error instanceof BatchSizeError) {
325+
console.log(`Batch too large: ${error.message}`);
322326
}
323327
}
324328
```
@@ -343,7 +347,7 @@ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
343347

344348
```bash
345349
# Clone the repository
346-
git clone https://github.com/validkit/typescript-sdk.git
350+
git clone https://github.com/ValidKit/validkit-typescript-sdk.git
347351
cd typescript-sdk
348352

349353
# Install dependencies
@@ -363,7 +367,7 @@ npm run dev
363367

364368
- 📖 **Documentation**: https://docs.validkit.com
365369
- 🔧 **API Reference**: https://api.validkit.com/docs/openapi.json
366-
- 🐛 **Issues**: https://github.com/validkit/typescript-sdk/issues
370+
- 🐛 **Issues**: https://github.com/ValidKit/validkit-typescript-sdk/issues
367371
- 📧 **Email**: support@validkit.com
368372
- 💬 **Discord**: [Join our community](https://discord.gg/validkit)
369373

eslint.config.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import js from '@eslint/js';
2+
import typescript from '@typescript-eslint/eslint-plugin';
3+
import parser from '@typescript-eslint/parser';
4+
5+
export default [
6+
js.configs.recommended,
7+
{
8+
files: ['src/**/*.ts'],
9+
languageOptions: {
10+
ecmaVersion: 'latest',
11+
sourceType: 'module',
12+
parser: parser,
13+
parserOptions: {
14+
project: './tsconfig.json'
15+
}
16+
},
17+
plugins: {
18+
'@typescript-eslint': typescript
19+
},
20+
rules: {
21+
...typescript.configs.recommended.rules,
22+
'no-trailing-spaces': 'error',
23+
'semi': ['error', 'always'],
24+
'eol-last': ['error', 'always'],
25+
'quotes': ['error', 'single'],
26+
'comma-dangle': ['error', 'never'],
27+
'@typescript-eslint/no-explicit-any': 'warn',
28+
'@typescript-eslint/no-unused-vars': 'warn',
29+
'no-undef': 'off' // TypeScript handles this
30+
}
31+
}
32+
];

jest.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: 'node',
4+
roots: ['<rootDir>/tests'],
5+
testMatch: ['**/*.test.ts'],
6+
collectCoverageFrom: [
7+
'src/**/*.ts',
8+
'!src/**/*.d.ts',
9+
'!src/index.ts'
10+
],
11+
coverageThreshold: {
12+
global: {
13+
branches: 80,
14+
functions: 80,
15+
lines: 80,
16+
statements: 80
17+
}
18+
},
19+
moduleNameMapper: {
20+
'^@/(.*)$': '<rootDir>/src/$1'
21+
}
22+
}

0 commit comments

Comments
 (0)