aronline-sdk 0.3.0__tar.gz

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.
Files changed (71) hide show
  1. aronline_sdk-0.3.0/.codespellrc +14 -0
  2. aronline_sdk-0.3.0/.editorconfig +15 -0
  3. aronline_sdk-0.3.0/.gitattributes +2 -0
  4. aronline_sdk-0.3.0/.github/workflows/ci.yml +108 -0
  5. aronline_sdk-0.3.0/.github/workflows/release.yml +93 -0
  6. aronline_sdk-0.3.0/.gitignore +21 -0
  7. aronline_sdk-0.3.0/CHANGELOG.md +115 -0
  8. aronline_sdk-0.3.0/LICENSE +201 -0
  9. aronline_sdk-0.3.0/PKG-INFO +430 -0
  10. aronline_sdk-0.3.0/PUBLICANDO.md +52 -0
  11. aronline_sdk-0.3.0/README.md +410 -0
  12. aronline_sdk-0.3.0/pyproject.toml +71 -0
  13. aronline_sdk-0.3.0/src/aronline/__init__.py +119 -0
  14. aronline_sdk-0.3.0/src/aronline/client.py +75 -0
  15. aronline_sdk-0.3.0/src/aronline/errors.py +60 -0
  16. aronline_sdk-0.3.0/src/aronline/http/__init__.py +5 -0
  17. aronline_sdk-0.3.0/src/aronline/http/error_envelope.py +61 -0
  18. aronline_sdk-0.3.0/src/aronline/http/json_body.py +30 -0
  19. aronline_sdk-0.3.0/src/aronline/http/transport.py +158 -0
  20. aronline_sdk-0.3.0/src/aronline/legacy/__init__.py +32 -0
  21. aronline_sdk-0.3.0/src/aronline/legacy/area.py +127 -0
  22. aronline_sdk-0.3.0/src/aronline/legacy/errors.py +53 -0
  23. aronline_sdk-0.3.0/src/aronline/legacy/models/__init__.py +91 -0
  24. aronline_sdk-0.3.0/src/aronline/legacy/models/envio.py +127 -0
  25. aronline_sdk-0.3.0/src/aronline/legacy/models/full.py +64 -0
  26. aronline_sdk-0.3.0/src/aronline/legacy/models/gw_template.py +65 -0
  27. aronline_sdk-0.3.0/src/aronline/legacy/models/regua.py +13 -0
  28. aronline_sdk-0.3.0/src/aronline/legacy/models/sending_proof.py +27 -0
  29. aronline_sdk-0.3.0/src/aronline/legacy/models/status.py +149 -0
  30. aronline_sdk-0.3.0/src/aronline/legacy/models/webhook.py +77 -0
  31. aronline_sdk-0.3.0/src/aronline/legacy/resources/__init__.py +7 -0
  32. aronline_sdk-0.3.0/src/aronline/legacy/resources/base.py +14 -0
  33. aronline_sdk-0.3.0/src/aronline/legacy/resources/status.py +68 -0
  34. aronline_sdk-0.3.0/src/aronline/legacy/resources/templates.py +79 -0
  35. aronline_sdk-0.3.0/src/aronline/legacy/transport.py +229 -0
  36. aronline_sdk-0.3.0/src/aronline/models/__init__.py +25 -0
  37. aronline_sdk-0.3.0/src/aronline/models/allowlist_entry.py +15 -0
  38. aronline_sdk-0.3.0/src/aronline/models/channel.py +17 -0
  39. aronline_sdk-0.3.0/src/aronline/models/freshness.py +25 -0
  40. aronline_sdk-0.3.0/src/aronline/models/tag.py +16 -0
  41. aronline_sdk-0.3.0/src/aronline/models/template.py +35 -0
  42. aronline_sdk-0.3.0/src/aronline/models/version.py +15 -0
  43. aronline_sdk-0.3.0/src/aronline/py.typed +0 -0
  44. aronline_sdk-0.3.0/src/aronline/resources/__init__.py +17 -0
  45. aronline_sdk-0.3.0/src/aronline/resources/allowlist.py +24 -0
  46. aronline_sdk-0.3.0/src/aronline/resources/base.py +14 -0
  47. aronline_sdk-0.3.0/src/aronline/resources/freshness.py +24 -0
  48. aronline_sdk-0.3.0/src/aronline/resources/tags.py +29 -0
  49. aronline_sdk-0.3.0/src/aronline/resources/templates.py +37 -0
  50. aronline_sdk-0.3.0/src/aronline/resources/version.py +23 -0
  51. aronline_sdk-0.3.0/tests/__init__.py +0 -0
  52. aronline_sdk-0.3.0/tests/conftest.py +38 -0
  53. aronline_sdk-0.3.0/tests/http/__init__.py +0 -0
  54. aronline_sdk-0.3.0/tests/http/test_transport.py +203 -0
  55. aronline_sdk-0.3.0/tests/legacy/__init__.py +0 -0
  56. aronline_sdk-0.3.0/tests/legacy/test_proofs.py +94 -0
  57. aronline_sdk-0.3.0/tests/legacy/test_send.py +83 -0
  58. aronline_sdk-0.3.0/tests/legacy/test_status.py +190 -0
  59. aronline_sdk-0.3.0/tests/legacy/test_templates.py +189 -0
  60. aronline_sdk-0.3.0/tests/legacy/test_transport.py +113 -0
  61. aronline_sdk-0.3.0/tests/resources/__init__.py +0 -0
  62. aronline_sdk-0.3.0/tests/resources/test_allowlist.py +36 -0
  63. aronline_sdk-0.3.0/tests/resources/test_freshness.py +48 -0
  64. aronline_sdk-0.3.0/tests/resources/test_tags.py +56 -0
  65. aronline_sdk-0.3.0/tests/resources/test_templates.py +74 -0
  66. aronline_sdk-0.3.0/tests/resources/test_version.py +30 -0
  67. aronline_sdk-0.3.0/tests/support/__init__.py +0 -0
  68. aronline_sdk-0.3.0/tests/support/fake_api.py +155 -0
  69. aronline_sdk-0.3.0/tests/test_channels.py +15 -0
  70. aronline_sdk-0.3.0/tests/test_version_manifest.py +37 -0
  71. aronline_sdk-0.3.0/uv.lock +1118 -0
@@ -0,0 +1,14 @@
1
+ # Corretor ortográfico.
2
+ #
3
+ # A lista de exceções é quase toda pt-BR, e não é desleixo: o codespell procura
4
+ # erro de INGLÊS, e a documentação daqui é em português. `erro`, `cliente` e
5
+ # `responde` são palavras certas — não `error`, `client` e `respond` escritos
6
+ # errado. É a mesma constatação que o scripts/check-language.mjs do repositório
7
+ # da API registra: rodado contra prosa em português, o corretor reporta o
8
+ # idioma inteiro.
9
+ #
10
+ # `afterall` é API do vitest, não palavra.
11
+ [codespell]
12
+ skip = *.lock,*.json,*.map,*.phar,*.min.js,.git,node_modules,vendor,dist,target,coverage,build,.venv,venv,__pycache__,.phpunit.cache,.ruff_cache,.mypy_cache,.pytest_cache
13
+ ignore-words-list = afterall,atual,autorize,caractere,classe,cliente,colateral,comando,comandos,construtor,controle,copie,crate,datas,deser,eles,erro,erros,fale,gere,limite,mede,momento,nome,nomes,oficial,repete,responde,ser,vai,validade
14
+ quiet-level = 2
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 4
10
+
11
+ [*.{md,markdown}]
12
+ trim_trailing_whitespace = false
13
+
14
+ [*.{yml,yaml,toml}]
15
+ indent_size = 2
@@ -0,0 +1,2 @@
1
+ # LF em tudo, em qualquer sistema — o mesmo que o EditorConfig promete no editor.
2
+ * text=auto eol=lf
@@ -0,0 +1,108 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: ['**']
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: ci-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+ quality:
18
+ name: Lint, formato, tipos e ortografia
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - uses: actions/checkout@v5
23
+
24
+ - uses: astral-sh/setup-uv@v6
25
+ with:
26
+ enable-cache: true
27
+
28
+ - run: uv sync --all-extras --dev
29
+
30
+ - run: uv run ruff check .
31
+ - run: uv run ruff format --check .
32
+ - run: uv run mypy
33
+
34
+ - name: Ortografia
35
+ uses: codespell-project/actions-codespell@v2
36
+
37
+ test:
38
+ name: Testes (Python ${{ matrix.python }} · ${{ matrix.os }})
39
+ runs-on: ${{ matrix.os }}
40
+ strategy:
41
+ # Ver o resultado de todas mesmo quando uma reprova: o servidor de
42
+ # mentira abre socket numa thread, e é aí que sistema operacional difere.
43
+ fail-fast: false
44
+ matrix:
45
+ os: [ubuntu-latest, windows-latest, macos-latest]
46
+ # A mínima que o pyproject promete, e as seguintes. Sem a primeira, o
47
+ # `requires-python` é promessa que ninguém confere.
48
+ python: ['3.10', '3.11', '3.12', '3.13']
49
+
50
+ steps:
51
+ - uses: actions/checkout@v5
52
+
53
+ - uses: astral-sh/setup-uv@v6
54
+ with:
55
+ enable-cache: true
56
+
57
+ - run: uv sync --all-extras --dev
58
+ env:
59
+ UV_PYTHON: ${{ matrix.python }}
60
+
61
+ # O corte de 95% mora no pyproject (`--cov-fail-under`); aqui basta rodar.
62
+ - run: uv run pytest
63
+
64
+ audit:
65
+ name: Auditoria de dependências
66
+ runs-on: ubuntu-latest
67
+
68
+ steps:
69
+ - uses: actions/checkout@v5
70
+
71
+ - uses: astral-sh/setup-uv@v6
72
+ with:
73
+ enable-cache: true
74
+
75
+ - run: uv sync --all-extras --dev
76
+
77
+ # Sem allow_failure: vulnerabilidade conhecida reprova. É a mesma regra
78
+ # do portão da API — um aviso que não reprova é um aviso que ninguém lê.
79
+ #
80
+ # Roda DENTRO do venv do projeto: `pip-audit` solto audita o ambiente da
81
+ # máquina, e aí ele reclama de pacote que não é nosso.
82
+ #
83
+ # `--skip-editable` deixa de fora o PRÓPRIO pacote, que o `uv sync`
84
+ # instala em modo editável e não existe no PyPI.
85
+ #
86
+ # E `--strict` NÃO entra junto: ele reprova quando a coleta falha em
87
+ # qualquer dependência, e "pulado" conta como coleta falha — os dois se
88
+ # anulam, e o SDK reprovava a si mesmo. Sem `--strict` o portão continua
89
+ # fazendo o que importa: vulnerabilidade encontrada reprova o job. O que
90
+ # se perde é o aviso de dependência inauditável, e aqui existe
91
+ # exatamente uma instalação editável — a nossa.
92
+ - run: uv run pip-audit --skip-editable
93
+
94
+ build:
95
+ name: Empacotamento
96
+ runs-on: ubuntu-latest
97
+
98
+ steps:
99
+ - uses: actions/checkout@v5
100
+
101
+ - uses: astral-sh/setup-uv@v6
102
+ with:
103
+ enable-cache: true
104
+
105
+ # Um wheel que não constrói é um wheel que ninguém instala, e isso só
106
+ # aparece na hora de publicar se não for conferido aqui.
107
+ - run: uv build
108
+ - run: uvx twine check dist/*
@@ -0,0 +1,93 @@
1
+ name: Publicar
2
+
3
+ # Dispara na tag. A tag é a decisão de publicar — não o merge, não o horário.
4
+ on:
5
+ push:
6
+ tags: ['v*']
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ gate:
13
+ name: O portão, antes de publicar
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - uses: actions/checkout@v5
18
+
19
+ - uses: astral-sh/setup-uv@v6
20
+ with:
21
+ enable-cache: true
22
+
23
+ - run: uv sync --all-extras --dev
24
+
25
+ # Publicar sem passar pelo portão é publicar no escuro. O CI já roda
26
+ # isto em push e PR; aqui roda de novo porque a tag pode apontar para um
27
+ # commit que ninguém abriu em PR.
28
+ - run: uv run ruff check .
29
+ - run: uv run ruff format --check .
30
+ - run: uv run mypy
31
+ - run: uv run pytest
32
+ - run: uv run pip-audit --skip-editable
33
+
34
+ build:
35
+ name: Construir o pacote
36
+ needs: gate
37
+ runs-on: ubuntu-latest
38
+
39
+ steps:
40
+ - uses: actions/checkout@v5
41
+
42
+ - uses: astral-sh/setup-uv@v6
43
+ with:
44
+ enable-cache: true
45
+
46
+ - run: uv build
47
+
48
+ # A versão do pacote tem de ser a da tag. Sem esta conferência, `v0.2.0`
49
+ # publicaria 0.1.0 e o registro passaria a mentir sobre o que é cada
50
+ # versão — coisa que não se desfaz depois.
51
+ - name: A versão do pacote é a da tag
52
+ run: |
53
+ tag="${GITHUB_REF_NAME#v}"
54
+ wheel=$(ls dist/*.whl | head -1)
55
+ version=$(basename "$wheel" | cut -d- -f2)
56
+
57
+ echo "tag=$tag wheel=$version"
58
+
59
+ if [ "$tag" != "$version" ]; then
60
+ echo "a tag diz $tag e o pacote diz $version"
61
+ exit 1
62
+ fi
63
+
64
+ - uses: actions/upload-artifact@v4
65
+ with:
66
+ name: dist
67
+ path: dist/
68
+
69
+ publish:
70
+ name: PyPI (Trusted Publishing)
71
+ needs: build
72
+ runs-on: ubuntu-latest
73
+
74
+ # O ambiente é onde se prende a regra no PyPI: o publisher confiável é
75
+ # declarado como "este repositório, este workflow, este ambiente". Sem
76
+ # ele, qualquer workflow do repositório poderia publicar.
77
+ environment:
78
+ name: pypi
79
+ url: https://pypi.org/p/aronline-sdk
80
+
81
+ permissions:
82
+ # O token OIDC que substitui a senha. Não existe segredo de API aqui:
83
+ # é isso que Trusted Publishing significa — o PyPI confia na identidade
84
+ # do runner, não numa chave que alguém colou no repositório e esqueceu.
85
+ id-token: write
86
+
87
+ steps:
88
+ - uses: actions/download-artifact@v4
89
+ with:
90
+ name: dist
91
+ path: dist/
92
+
93
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,21 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ build/
5
+ dist/
6
+ .venv/
7
+ venv/
8
+
9
+ .mypy_cache/
10
+ .pytest_cache/
11
+ .ruff_cache/
12
+ .coverage
13
+ htmlcov/
14
+
15
+ *.log
16
+ .DS_Store
17
+ Thumbs.db
18
+ .idea/
19
+ .vscode/
20
+ .env
21
+ .env.local
@@ -0,0 +1,115 @@
1
+ # Changelog
2
+
3
+ Todas as mudanças notáveis deste SDK são documentadas aqui.
4
+
5
+ Formato baseado em [Keep a Changelog](https://keepachangelog.com/pt-BR/1.1.0/)
6
+ e versionamento [SemVer](https://semver.org/lang/pt-BR/).
7
+
8
+ O SDK acompanha a superfície `/v3` da API: rota nova na API vira função nova
9
+ aqui, na mesma leva. A área de legado (`client.legacy`) acompanha o contrato
10
+ antigo do gateway: quando a `/v3` ganha o equivalente de uma rota, a função
11
+ troca o transporte **sem mudar de assinatura**, e a troca é registrada aqui,
12
+ rota a rota.
13
+
14
+ ---
15
+
16
+ ## [Unreleased]
17
+
18
+ Nada ainda.
19
+
20
+ ## [0.3.0] — 2026-08-20
21
+
22
+ ### Changed
23
+
24
+ - **As cinco linguagens passam a andar na mesma versão.** Até aqui cada SDK
25
+ numerava por conta própria — o TypeScript na 0.2.1, os outros na 0.1.0 — e
26
+ perguntar "qual versão tem a área de legado?" dava quatro respostas
27
+ diferentes. A partir da 0.3.0 o número é o mesmo nas cinco, e a mesma
28
+ superfície sai no mesmo dia.
29
+
30
+ ### Added
31
+
32
+ - **O cliente da `/v3`**, com os cinco recursos que a API responde hoje:
33
+ modelos (listar com filtro de canal, buscar por id), etiquetas (listar,
34
+ buscar), lista de permitidos (listar), frescor da carga e versão. Quem
35
+ instala não escreve HTTP: não monta URL, não põe cabeçalho, não desembrulha
36
+ envelope e não lê status para saber se deu certo.
37
+ - **O envelope resolvido por rota.** `templates`, `tags` e `allowlist`
38
+ respondem `{"data": …}`; `freshness` e `version` respondem o objeto direto.
39
+ Desembrulhar tudo, ou nada, quebra metade das chamadas — a escolha é do SDK,
40
+ e quem chama nem sabe que existe envelope.
41
+ - **Um tipo de falha só.** Recusa do catálogo, proxy respondendo HTML no lugar
42
+ da API e rede fora do ar chegam todos como `ApiError`. Não há erro de parser
43
+ cru vazando para quem chamou.
44
+ - **`request_id` como campo de primeira classe**, e não detalhe enterrado: é
45
+ o primeiro dado que o suporte pede, e um SDK que o engolisse obrigaria quem
46
+ bateu na falha a reproduzir tudo no `curl` só para achar o número.
47
+ - **A rota aberta funciona sem credencial.** `version.get()` é pública; um
48
+ cliente construído sem token chama ela, o que serve para conferir a
49
+ instalação antes de ter credencial. Exigir token no construtor tornaria
50
+ inalcançável justamente a rota que o suporte pede primeiro.
51
+ - **`Retry-After` já lido em segundos**, com `retryable` dizendo se vale
52
+ repetir. **Repetir é decisão de quem chama** — o SDK não repete sozinho,
53
+ porque só quem chamou sabe se a operação pode acontecer duas vezes.
54
+ - **Tipado de verdade:** `py.typed`, `mypy --strict` limpo, e `channel` é
55
+ `Literal` — valor fora da lista o verificador recusa antes da chamada.
56
+ - **Zero dependência.** Só a biblioteca padrão (`urllib`), então o SDK nunca
57
+ briga com o que a aplicação de quem instala já fixou.
58
+ - Os objetos são `TypedDict`, não dataclass: o que volta é o JSON já tipado,
59
+ sem camada de conversão que possa divergir do servidor sem ninguém perceber
60
+ — e campo novo na API continua passando em vez de estourar aqui.
61
+ - **A área de legado** (`client.legacy`): tudo o que a documentação pública do
62
+ gateway documenta, como função tipada apontando para `api.ar-online.com.br`
63
+ — envio multicanal (`send`), status por canal e consolidado
64
+ (`status.email/sms/whatsapp/voz/carta/full`), comprovante com o PDF já
65
+ decodificado do base64 (`sending_proof`), laudo pericial binário (`laudo`),
66
+ finalizar régua (`finalizar_regua`) e os modelos do gateway
67
+ (`templates.list/get/update/deactivate/set_status`). Endereço próprio, com
68
+ padrão de produção, independente do endereço da `/v3`.
69
+ - **A credencial do legado é outra**, e o SDK trata as duas no mesmo cliente:
70
+ o JWT do gateway vai **cru** no cabeçalho `authorization`, sem `Bearer` — o
71
+ oposto da `/v3`. Nenhuma das duas vaza para a área da outra, e chamada de
72
+ legado sem `legacy_token` falha **antes do socket**, dizendo qual token
73
+ falta.
74
+ - **O envelope do gateway resolvido.** A família de modelos responde
75
+ `{"data": …, "statusCode": …}` com **HTTP 200 até em erro**; o SDK lê o
76
+ código de dentro e levanta `LegacyApiError`, que carrega `status` (o que
77
+ vale), `http_status` (o que o fio disse) e `body` (o corpo cru). É o defeito
78
+ nº 1 de quem integra na mão, e é exatamente o que a área abstrai.
79
+ - **Fidelidade ao contrato antigo, de propósito.** As quatro convenções de
80
+ ausência ficam nos tipos como vêm no fio, e as duas que se pareceriam em
81
+ Python ficam distinguíveis: chave que vem `null` é `| None`, chave que
82
+ **some** da resposta é chave não obrigatória de um bloco `total=False`. A
83
+ voz responde 200 com frase para uuid sem registro, e isso não é erro;
84
+ `finalizar_regua` é GET com efeito colateral e o SDK não "conserta" para
85
+ POST; data do legado fica `str`, porque `"18/07/2026 01:01:32"` não
86
+ identifica um instante sem ambiguidade. Normalizar qualquer uma delas
87
+ quebraria quem já integrou.
88
+ - **Tipos dos webhooks** (`WebhookPayloadV1`, `WebhookPayloadV2`) exportados
89
+ para quem recebe as chamadas — o contrato pronto, sem digitar à mão.
90
+ - As rotas de versões de modelo do gateway (`/versions` e `/versions/{v}`)
91
+ ficaram **de fora**: produção responde vazio ou 404 sempre, e função que
92
+ nunca acha nada só convida integração contra recurso morto.
93
+
94
+ ### Quality
95
+
96
+ - Portão com lint, formato, ortografia (codespell), **cobertura mínima de
97
+ 95%** e auditoria de dependência. Nada com `allow_failure`, que é a mesma
98
+ regra do portão da API.
99
+ - Os testes falam com um **servidor de verdade numa porta livre**, não com um
100
+ dublê de HTTP: o que um SDK precisa acertar é justamente o fio — qual rota
101
+ embrulha, como a recusa volta, o que acontece quando algo que não é a API
102
+ responde. Dublê provaria só que o código chama o dublê.
103
+ - CI em três sistemas operacionais × Python 3.10, 3.11, 3.12 e 3.13.
104
+ - Publicação por **Trusted Publishing** no PyPI (OIDC, sem token). O PyPI
105
+ aceita *publisher pendente*, então até a primeira versão sai sem credencial.
106
+
107
+ - Os testes da área de legado cobrem as esquisitices uma a uma: 200-com-erro
108
+ dos modelos, voz sem registro, as quatro convenções de ausência, base64 e
109
+ binário, 401 cru do gateway, o token indo sem `Bearer` e as duas
110
+ credenciais sem uma vazar na área da outra.
111
+
112
+ Hoje o portão mede: **86 testes, 100% de cobertura**.
113
+
114
+ [Unreleased]: https://github.com/AR-Online/ar-online-python/compare/v0.3.0...HEAD
115
+ [0.3.0]: https://github.com/AR-Online/ar-online-python/releases/tag/v0.3.0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 AR ONLINE TECNOLOGIA LTDA
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.