Skip to content
Merged

V3 #10

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
012b6cc
Initial project structure and core files for SDK v3
andrekutianski Nov 12, 2025
a2b9378
feat: Add comprehensive JSDoc documentation and extensibility guides
andrekutianski Nov 12, 2025
a0c25ff
refactor: Replace .eslintrc.js with .eslintrc.cjs for improved config…
andrekutianski Nov 12, 2025
b5911c3
refactor: simplify NfeClient creation and remove version parameter
andrekutianski Nov 12, 2025
3fdf4db
chore: update version to 3.0.0 and refine script commands in package.…
andrekutianski Nov 12, 2025
825452b
Add unit tests for HTTP client and resources
andrekutianski Nov 12, 2025
f765477
feat: Add unit tests for WebhooksResource including list, retrieve, c…
andrekutianski Nov 12, 2025
0a59d63
feat: Add configuration files for EditorConfig, Git attributes, and N…
andrekutianski Nov 12, 2025
206d314
feat: Add MIGRATION.md to files in package.json for better documentation
andrekutianski Nov 12, 2025
0bcd9fd
Refactor README files for NFE.io SDK: Introduce v3 with TypeScript su…
andrekutianski Nov 12, 2025
8b2249a
feat: Add OpenAPI Compliance Validator script to validate SDK impleme…
andrekutianski Nov 12, 2025
827ea45
feat: Add CI and Publish workflows for automated testing and NPM publ…
andrekutianski Nov 12, 2025
2f6fd75
Refactor code structure for improved readability and maintainability
andrekutianski Nov 12, 2025
04c2184
chore(package): change package name to nfe-io to preserve npm history
andrekutianski Nov 28, 2025
01d3924
feat: Add OpenSpec prompts for applying, archiving, and proposing cha…
andrekutianski Nov 28, 2025
4ea8f4c
style: Format code for consistency and readability
andrekutianski Nov 28, 2025
7ed6f98
feat: Add interactive and automated release scripts for NFE.io SDK v3…
andrekutianski Nov 28, 2025
4ae3fb0
test: add high-priority tests for polling and certificate upload
andrekutianski Nov 30, 2025
8e6238c
refactor: change environment from 'sandbox' to 'development'
andrekutianski Nov 30, 2025
7bdbfb7
docs: update all documentation to use 'development' instead of 'sandbox'
andrekutianski Nov 30, 2025
07d847d
refactor: update all examples to use 'development' environment
andrekutianski Nov 30, 2025
23cc211
test: update integration tests to use 'development' environment
andrekutianski Nov 30, 2025
99bf43b
fix: correct Basic Auth header format for NFE.io API
andrekutianski Nov 30, 2025
63771dc
chore: add debug/test scripts to gitignore
andrekutianski Nov 30, 2025
47f24ca
chore: add test:unit and test:integration scripts to package.json
andrekutianski Nov 30, 2025
4690725
docs: add FILE_CONFIGURATION.md explaining project file management
andrekutianski Nov 30, 2025
6434f4f
feat: add OpenAPI spec validation and type generation scripts
andrekutianski Jan 10, 2026
05466cb
feat: add OpenAPI spec validation and type generation scripts
andrekutianski Jan 10, 2026
0fe4edd
feat: add npm scripts for OpenAPI generation workflow
andrekutianski Jan 10, 2026
902ecc3
feat: migrate resources to use OpenAPI-generated types
andrekutianski Jan 10, 2026
ab464cd
test: update test mocks to match OpenAPI-generated types
andrekutianski Jan 10, 2026
0b8c704
ci: integrate OpenAPI validation and generation into CI/CD
andrekutianski Jan 10, 2026
4936c3c
docs: add OpenAPI generation workflow documentation
andrekutianski Jan 10, 2026
5991bfc
docs: add comprehensive migration guide for generated types
andrekutianski Jan 10, 2026
8c7840b
test: add comprehensive tests for OpenAPI generation
andrekutianski Jan 10, 2026
341bf01
feat: add OpenAPI generator configuration file
andrekutianski Jan 10, 2026
012e6c8
feat: add script to download OpenAPI specs from API
andrekutianski Jan 10, 2026
01a695c
docs: add OpenSpec change proposal and task tracking
andrekutianski Jan 10, 2026
542642c
fix: resolve TypeScript compilation errors and fix generated types
andrekutianski Jan 11, 2026
d089137
fix(ci): correct ESM filename check and remove unused parameter
andrekutianski Jan 11, 2026
d93d6ce
refactor: remove implementation roadmap and MCP/n8n examples document…
andrekutianski Jan 11, 2026
bdfee49
fix(auth): add base64 encoding to Basic Auth and validate empty apiKey
andrekutianski Jan 11, 2026
428dd68
fix: add additional test files for Node.js versions 18.x, 20.x, and 22.x
andrekutianski Jan 11, 2026
a771f03
fix: update last generated timestamps in generated files
andrekutianski Jan 11, 2026
df15452
fix(tests): add forEach to createMockHeaders and createMockErrorRespo…
andrekutianski Jan 11, 2026
0dca22f
Refactor code structure for improved readability and maintainability
andrekutianski Jan 11, 2026
bff5a65
fix(tests): add forEach to mocks in core.test.ts and fix test expecta…
andrekutianski Jan 11, 2026
626e2d9
fix(tests): prevent unhandled Promise rejection in polling fake timer…
andrekutianski Jan 11, 2026
2e22edd
fix: remove duplicate entries in .gitignore for build and test files
andrekutianski Jan 11, 2026
cf99c74
fix: update last generated timestamps in generated files
andrekutianski Jan 11, 2026
6c2dd39
chore: remove duplicate and obsolete configuration files
andrekutianski Jan 11, 2026
9efd156
docs: translate README.md to Portuguese (pt-BR)
andrekutianski Jan 11, 2026
3885b57
fix: correct package name from @nfe-io/sdk to nfe-io
andrekutianski Jan 11, 2026
2521124
fix: update package name in docs/ and examples/ from @nfe-io/sdk to n…
andrekutianski Jan 11, 2026
30adeaf
feat: add real-world examples for managing invoices, people, and webh…
andrekutianski Jan 12, 2026
4cf5ccd
feat: add quick setup and practical examples to README.md and example…
andrekutianski Jan 12, 2026
4987564
feat(companies): implement complete Companies resource with certifica…
andrekutianski Jan 14, 2026
42ab53e
test(companies): add comprehensive unit tests for Companies resource
andrekutianski Jan 14, 2026
2934bd7
docs(companies): add comprehensive documentation for Companies resource
andrekutianski Jan 14, 2026
70e9754
chore: update generated types and dependencies
andrekutianski Jan 14, 2026
9bcb040
test(companies): mock CertificateValidator and remove createBatch tests
andrekutianski Jan 14, 2026
231552b
fix(companies): change federalTaxNumber to a number type in create co…
andrekutianski Jan 14, 2026
a6781d2
chore: update last generated timestamps in generated files
andrekutianski Jan 14, 2026
cb79986
fix(http): update Authorization header to use raw API key instead of …
andrekutianski Jan 14, 2026
48333de
fix(tests): update response structure in companies and legal people t…
andrekutianski Jan 14, 2026
5c54744
fix(tests): update mock response structure for companies in search tests
andrekutianski Jan 14, 2026
5c21306
fix(http): handle 204 No Content response in HttpClient
andrekutianski Jan 14, 2026
38f328e
fix(validations): enhance CNPJ and CPF validation with full check dig…
andrekutianski Jan 14, 2026
40bdb91
fix(api): adjust response handling for legal people endpoints to matc…
andrekutianski Jan 14, 2026
6d48d9c
fix(api): update natural people resource to handle API response struc…
andrekutianski Jan 14, 2026
f82ba84
fix(generation): update last generated timestamps for multiple genera…
andrekutianski Jan 14, 2026
4c47b41
fix(generation): update last generated timestamp in nfeio.ts
andrekutianski Jan 14, 2026
70fd1cf
fix(examples): retrieve company ID from environment variables in mult…
andrekutianski Jan 14, 2026
62934c2
fix(tests): update mock HTTP responses to match new API structure for…
andrekutianski Jan 14, 2026
81ff0ad
fix(generation): update last generated timestamps for multiple genera…
andrekutianski Jan 14, 2026
3ef149e
fix(generation): update last generated timestamps for multiple genera…
andrekutianski Jan 14, 2026
9de4335
feat: Implement Companies Resource with Certificate Management
andrekutianski Jan 14, 2026
121af02
feat: remove outdated release checklist and migration guide; restruct…
andrekutianski Jan 14, 2026
d383956
fix(tasks): standardize task completion indicators in documentation
andrekutianski Jan 16, 2026
e6ed144
fix(http): update authorization header to use 'X-NFE-APIKEY' instead …
andrekutianski Jan 16, 2026
337ec6f
feat(polling): implement generic polling utility with exponential bac…
andrekutianski Jan 16, 2026
16707cb
chore: update last generated timestamps for generated TypeScript files
andrekutianski Jan 16, 2026
ec7fc07
chore: update last generated timestamp in nfeio.ts
andrekutianski Jan 16, 2026
9bf0ff3
feat(service-invoices): enhance invoice creation and retrieval with a…
andrekutianski Jan 18, 2026
c141026
feat(http): add support for custom headers in GET and request methods
andrekutianski Jan 18, 2026
e068202
chore: update last generated timestamps for multiple TypeScript files
andrekutianski Jan 18, 2026
5434afd
fix(service-invoices): correct invoice completion status logic and up…
andrekutianski Jan 18, 2026
b285a57
test(service-invoices): add comprehensive unit tests for ServiceInvoi…
andrekutianski Jan 18, 2026
c3674d8
feat(service-invoices): implement complete Service Invoices resource …
andrekutianski Jan 18, 2026
999a258
feat(service-invoice-complete): add complete example for Service Invo…
andrekutianski Jan 18, 2026
d141bc5
chore: update last generated timestamps for multiple TypeScript files
andrekutianski Jan 18, 2026
246e8cf
feat(service-invoices): enhance service invoice operations with detai…
andrekutianski Jan 18, 2026
df4c2b8
feat(service-invoices): enhance examples and add advanced features fo…
andrekutianski Jan 18, 2026
616f1b3
feat: Implement Service Invoices Resource with CRUD operations, async…
andrekutianski Jan 18, 2026
a67b291
fix(polling): add eslint directive to suppress constant condition war…
andrekutianski Jan 18, 2026
7b47b77
feat(service-invoices): update create method to return structured res…
andrekutianski Jan 18, 2026
0a2ab9f
chore: update last generated timestamps in generated files
andrekutianski Jan 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# ============================================================================
# NFE.io SDK v3 - Editor Configuration
# ============================================================================
# EditorConfig helps maintain consistent coding styles across different editors
# More info: https://editorconfig.org

root = true

# ----------------------------------------------------------------------------
# Default Settings (all files)
# ----------------------------------------------------------------------------
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

# ----------------------------------------------------------------------------
# TypeScript & JavaScript
# ----------------------------------------------------------------------------
[*.{ts,tsx,js,jsx,mjs,cjs}]
indent_size = 2
max_line_length = 100

# ----------------------------------------------------------------------------
# JSON & YAML
# ----------------------------------------------------------------------------
[*.json]
indent_size = 2

[*.{yml,yaml}]
indent_size = 2

# ----------------------------------------------------------------------------
# Markdown
# ----------------------------------------------------------------------------
[*.md]
trim_trailing_whitespace = false
max_line_length = off

# ----------------------------------------------------------------------------
# Shell Scripts
# ----------------------------------------------------------------------------
[*.sh]
indent_size = 4
end_of_line = lf

# ----------------------------------------------------------------------------
# PowerShell Scripts
# ----------------------------------------------------------------------------
[*.{ps1,psm1,psd1}]
indent_size = 4
end_of_line = crlf

# ----------------------------------------------------------------------------
# Batch Files (Windows)
# ----------------------------------------------------------------------------
[*.{bat,cmd}]
end_of_line = crlf

# ----------------------------------------------------------------------------
# Makefile
# ----------------------------------------------------------------------------
[Makefile]
indent_style = tab

# ----------------------------------------------------------------------------
# Package Manager Lock Files (read-only, don't format)
# ----------------------------------------------------------------------------
[{package-lock.json,yarn.lock,pnpm-lock.yaml}]
insert_final_newline = false
indent_size = unset

# ----------------------------------------------------------------------------
# Configuration Files
# ----------------------------------------------------------------------------
[.eslintrc*]
indent_size = 2

[.prettierrc*]
indent_size = 2

[tsconfig*.json]
indent_size = 2
34 changes: 34 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended'
],
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module'
},
env: {
node: true,
es2022: true,
browser: true
},
rules: {
// TypeScript specific rules
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',

// General rules
'no-console': 'off', // Allow console for SDK
'prefer-const': 'error',
'no-var': 'error'
},
ignorePatterns: [
'dist/',
'node_modules/',
'*.js',
'*.cjs',
'src/generated/**/*' // Don't lint auto-generated code
]
};
158 changes: 158 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# ============================================================================
# NFE.io SDK v3 - Git Attributes Configuration
# ============================================================================
# Ensures consistent line endings and proper diff handling across platforms

# ----------------------------------------------------------------------------
# Auto-detect text files and normalize line endings
# ----------------------------------------------------------------------------
* text=auto eol=lf

# ----------------------------------------------------------------------------
# Source Code
# ----------------------------------------------------------------------------
*.ts text eol=lf
*.js text eol=lf
*.mjs text eol=lf
*.cjs text eol=lf
*.json text eol=lf
*.jsx text eol=lf
*.tsx text eol=lf

# ----------------------------------------------------------------------------
# Configuration Files
# ----------------------------------------------------------------------------
*.yml text eol=lf
*.yaml text eol=lf
*.toml text eol=lf
*.ini text eol=lf
*.cfg text eol=lf
*.conf text eol=lf
.editorconfig text eol=lf
.gitignore text eol=lf
.gitattributes text eol=lf
.npmignore text eol=lf
.npmrc text eol=lf
.eslintrc* text eol=lf
.prettierrc* text eol=lf
tsconfig*.json text eol=lf
package*.json text eol=lf

# ----------------------------------------------------------------------------
# Documentation
# ----------------------------------------------------------------------------
*.md text eol=lf
*.txt text eol=lf
LICENSE text eol=lf
AUTHORS text eol=lf
CHANGELOG* text eol=lf
CONTRIBUTING* text eol=lf
README* text eol=lf

# ----------------------------------------------------------------------------
# Shell Scripts
# ----------------------------------------------------------------------------
*.sh text eol=lf
*.bash text eol=lf
*.zsh text eol=lf

# PowerShell Scripts (Windows)
*.ps1 text eol=crlf
*.psm1 text eol=crlf
*.psd1 text eol=crlf

# Batch files (Windows)
*.bat text eol=crlf
*.cmd text eol=crlf

# ----------------------------------------------------------------------------
# Web Files
# ----------------------------------------------------------------------------
*.html text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.sass text eol=lf
*.less text eol=lf
*.xml text eol=lf
*.svg text eol=lf

# ----------------------------------------------------------------------------
# Binary Files (explicitly mark as binary)
# ----------------------------------------------------------------------------
# Images
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.webp binary
*.avif binary

# Fonts
*.woff binary
*.woff2 binary
*.ttf binary
*.eot binary
*.otf binary

# Archives
*.zip binary
*.tar binary
*.gz binary
*.tgz binary
*.bz2 binary
*.7z binary
*.rar binary

# Executables
*.exe binary
*.dll binary
*.so binary
*.dylib binary

# Other binary formats
*.pdf binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.ogg binary

# ----------------------------------------------------------------------------
# Git LFS (Large File Storage) - if needed in future
# ----------------------------------------------------------------------------
# *.psd filter=lfs diff=lfs merge=lfs -text
# *.ai filter=lfs diff=lfs merge=lfs -text

# ----------------------------------------------------------------------------
# Language-specific diff patterns
# ----------------------------------------------------------------------------
*.ts diff=typescript
*.js diff=javascript
*.json diff=json
*.md diff=markdown

# ----------------------------------------------------------------------------
# Export-ignore (files not included in archives)
# ----------------------------------------------------------------------------
.gitattributes export-ignore
.gitignore export-ignore
.github/ export-ignore
tests/ export-ignore
examples/ export-ignore
docs/ export-ignore
*.test.* export-ignore
*.spec.* export-ignore
.travis.yml export-ignore
.eslintrc* export-ignore
.prettierrc* export-ignore
tsconfig*.json export-ignore
vitest.config.ts export-ignore
tsup.config.ts export-ignore

# ----------------------------------------------------------------------------
# Merge strategies
# ----------------------------------------------------------------------------
package-lock.json merge=ours
yarn.lock merge=ours
pnpm-lock.yaml merge=ours
CHANGELOG.md merge=union
Loading
Loading