[0.2.0] - 2026-07-21
Breaking
Cnpja.Company.officesis now[Cnpja.CompanyOffice.t()](API subset without address)Cnpja.Office.suframais now[Cnpja.OfficeSuframa.t()](embedded summary, not fullCnpja.Suframa)Cnpja.Rfbno longer hasregistrations,links,suframa, orcompanyfields (not returned by/rfb)get_company/2no longer documents or sends non-existent:simples/:simples_historyquery options
Added
- Lists API (saved CNPJ collections + async export):
create_list/2,search_lists/1,get_list/2,update_list/3,delete_list/2create_list_export/3,search_list_exports/2,get_list_export/3- Structs:
Cnpja.CnpjList,Cnpja.CnpjListSummary,Cnpja.CnpjListPage,Cnpja.CnpjListExport,Cnpja.CnpjListExportPage,Cnpja.CnpjListExportId
Cnpja.CompanyOfficeandCnpja.OfficeSuframaresponse structsCnpja.Error.codefrom API error payloadssearch_persons/1filter:person_country_nin(country.id.nin)- Client support for
POST,PATCH,DELETE(required by Lists API) - Configurable
:receive_timeout(config and per-call option; default 30s) - Query params that are lists are joined as comma-separated values
Fixed
get_simples/2now sendshistory=(API param);:simples_historyremains as a documented alias- Nested company offices and office-embedded SUFRAMA parse correctly against real OpenAPI DTOs
Improved
- README covers lists/export and updated dependency version
- Expanded test coverage for lists, history param, error codes, and nested DTOs
[0.1.3] - 2026-05-19
Fixed
Office.suframaandRfb.suframatype corrected fromSuframa.t() | nilto[Suframa.t()]— the API returns an arrayOffice.linksandRfb.linkstype corrected fromOfficeLinks.t() | nilto[Link.t()]— the API returns an array of{type, url}objects;Cnpja.OfficeLinksreplaced byCnpja.LinkCompany.idandCompanyRef.idtype corrected frominteger()toString.t()— the API returns a string (e.g."37335118")- RFB, Simples, CCC, and SUFRAMA endpoints corrected to use
taxIdas a query param instead of a path segment (e.g./rfb?taxId=...not/rfb/37335118000180) - All search query param names corrected from camelCase (
simplesOptant,stateIn) to API dot-notation (company.simples.optant.eq,address.state.in) get_ccc/3statesargument now sent asstates=query param instead of a path segment- Removed unreachable
parse_error_body/1fallback clause from the HTTP client
Added
Cnpja.Linkstruct — public document link withtypeandurlfields, replacingCnpja.OfficeLinks- Extended
search_offices/1with full set of filter params:founded_gte/lte,status_date_gte/lte,special_date_gte/lte, street/district/number/details filters, phone/email field-level filters,activity_in/nin,simples_since_gte/lte,simei_since_gte/lte, and more
Improved
- Test suite expanded to 76 tests with 100% line coverage
[0.1.2] - 2026-05-19
Fixed
- API paths corrected from plural to singular:
/offices→/office,/companies→/company,/persons→/person. All previous versions returned 404 on these endpoints when called against the real CNPJá API.
[0.1.1] - 2026-05-19
Added
Cnpja.CompanyRef— lightweight company reference embedded inOfficeandRfbto avoid circular parsingCnpja.SizeLabel— company size struct withid,acronym, andtextfields (distinct fromLabel)Cnpja.PersonMembershipandCnpja.PersonMembershipCompany— typed person membership recordsstatus_date,reason,special_date,specialfields onCnpja.OfficeandCnpja.Rfbname,equity,nature,size,jurisdictionfields onCnpja.Rfbjurisdictionfield onCnpja.Companyperformedfield onCnpja.Activity- Full
Cnpja.Suframarewrite:since,head,approved(boolean),approval_date,address,phones,emails,incentives - Address parsing accepts both
"zip"and"code"field names - Extended
@camel_mapcovering all search, image, and certificate query parameters
Improved
- Test suite expanded to 74 tests with 98.3% line coverage
- Network error path and plain-text error body now tested
[0.1.0] - 2026-05-19
Added
- Full coverage of all 17 CNPJá API endpoints
- Typed structs for all API responses (
Cnpja.Office,Cnpja.Company,Cnpja.Zip, etc.) - Tagged tuple error handling —
{:ok, struct}/{:error, %Cnpja.Error{}} - Support for configuration via
config.exsand per-callapi_key:option - Bypass-based integration tests for all endpoints
- ExDoc documentation published on HexDocs