dinie-sdk 1.0.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.
- dinie_sdk-1.0.0/.github/workflows/ci.yml +100 -0
- dinie_sdk-1.0.0/.github/workflows/publish.yml +68 -0
- dinie_sdk-1.0.0/.github/workflows/tag-release.yml +59 -0
- dinie_sdk-1.0.0/.gitignore +50 -0
- dinie_sdk-1.0.0/.tool-versions +1 -0
- dinie_sdk-1.0.0/CHANGELOG.md +39 -0
- dinie_sdk-1.0.0/CODEOWNERS +14 -0
- dinie_sdk-1.0.0/LICENSE +21 -0
- dinie_sdk-1.0.0/PKG-INFO +87 -0
- dinie_sdk-1.0.0/README.md +71 -0
- dinie_sdk-1.0.0/dinie/__init__.py +78 -0
- dinie_sdk-1.0.0/dinie/generated/.metadata.json +8 -0
- dinie_sdk-1.0.0/dinie/generated/__init__.py +20 -0
- dinie_sdk-1.0.0/dinie/generated/_api_version.py +2 -0
- dinie_sdk-1.0.0/dinie/generated/client.py +108 -0
- dinie_sdk-1.0.0/dinie/generated/errors/__init__.py +57 -0
- dinie_sdk-1.0.0/dinie/generated/errors/auth_error.py +10 -0
- dinie_sdk-1.0.0/dinie/generated/errors/bad_request_error.py +10 -0
- dinie_sdk-1.0.0/dinie/generated/errors/conflict_error.py +10 -0
- dinie_sdk-1.0.0/dinie/generated/errors/not_found_error.py +10 -0
- dinie_sdk-1.0.0/dinie/generated/errors/permission_denied_error.py +10 -0
- dinie_sdk-1.0.0/dinie/generated/errors/rate_limit_error.py +10 -0
- dinie_sdk-1.0.0/dinie/generated/errors/server_error.py +10 -0
- dinie_sdk-1.0.0/dinie/generated/errors/validation_error.py +10 -0
- dinie_sdk-1.0.0/dinie/generated/events/__init__.py +82 -0
- dinie_sdk-1.0.0/dinie/generated/events/credit_offer_available.py +57 -0
- dinie_sdk-1.0.0/dinie/generated/events/credit_offer_expired.py +57 -0
- dinie_sdk-1.0.0/dinie/generated/events/customer_active.py +43 -0
- dinie_sdk-1.0.0/dinie/generated/events/customer_created.py +57 -0
- dinie_sdk-1.0.0/dinie/generated/events/customer_denied.py +53 -0
- dinie_sdk-1.0.0/dinie/generated/events/customer_kyc_updated.py +45 -0
- dinie_sdk-1.0.0/dinie/generated/events/customer_under_review.py +43 -0
- dinie_sdk-1.0.0/dinie/generated/events/loan_active.py +45 -0
- dinie_sdk-1.0.0/dinie/generated/events/loan_cancelled.py +43 -0
- dinie_sdk-1.0.0/dinie/generated/events/loan_created.py +51 -0
- dinie_sdk-1.0.0/dinie/generated/events/loan_error.py +44 -0
- dinie_sdk-1.0.0/dinie/generated/events/loan_finished.py +43 -0
- dinie_sdk-1.0.0/dinie/generated/events/loan_payment_received.py +43 -0
- dinie_sdk-1.0.0/dinie/generated/events/loan_processing.py +49 -0
- dinie_sdk-1.0.0/dinie/generated/events/loan_signature_received.py +47 -0
- dinie_sdk-1.0.0/dinie/generated/resources/__init__.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/resources/banks.py +25 -0
- dinie_sdk-1.0.0/dinie/generated/resources/biometrics.py +32 -0
- dinie_sdk-1.0.0/dinie/generated/resources/credentials.py +64 -0
- dinie_sdk-1.0.0/dinie/generated/resources/credit_offers.py +67 -0
- dinie_sdk-1.0.0/dinie/generated/resources/customers.py +261 -0
- dinie_sdk-1.0.0/dinie/generated/resources/loans.py +80 -0
- dinie_sdk-1.0.0/dinie/generated/resources/webhook_endpoints.py +129 -0
- dinie_sdk-1.0.0/dinie/generated/types/__init__.py +171 -0
- dinie_sdk-1.0.0/dinie/generated/types/articles_of_association_attachment.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/articles_of_association_requirement.py +28 -0
- dinie_sdk-1.0.0/dinie/generated/types/articles_of_association_submitted.py +27 -0
- dinie_sdk-1.0.0/dinie/generated/types/bank.py +20 -0
- dinie_sdk-1.0.0/dinie/generated/types/biometrics_session.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/biometrics_session_exchange_response.py +22 -0
- dinie_sdk-1.0.0/dinie/generated/types/company_document_attachment.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/company_document_requirement.py +28 -0
- dinie_sdk-1.0.0/dinie/generated/types/company_document_submitted.py +25 -0
- dinie_sdk-1.0.0/dinie/generated/types/create_credential_request.py +25 -0
- dinie_sdk-1.0.0/dinie/generated/types/create_customer_request.py +40 -0
- dinie_sdk-1.0.0/dinie/generated/types/create_loan_request.py +36 -0
- dinie_sdk-1.0.0/dinie/generated/types/create_simulation_request.py +25 -0
- dinie_sdk-1.0.0/dinie/generated/types/create_webhook_endpoint_request.py +29 -0
- dinie_sdk-1.0.0/dinie/generated/types/credential.py +32 -0
- dinie_sdk-1.0.0/dinie/generated/types/credential_with_secret.py +27 -0
- dinie_sdk-1.0.0/dinie/generated/types/credentials_list_params.py +14 -0
- dinie_sdk-1.0.0/dinie/generated/types/credit_offer_base.py +38 -0
- dinie_sdk-1.0.0/dinie/generated/types/credit_offer_union.py +27 -0
- dinie_sdk-1.0.0/dinie/generated/types/credit_offers_list_params.py +24 -0
- dinie_sdk-1.0.0/dinie/generated/types/customer.py +41 -0
- dinie_sdk-1.0.0/dinie/generated/types/customer_bank_account.py +29 -0
- dinie_sdk-1.0.0/dinie/generated/types/customer_bank_account_request.py +36 -0
- dinie_sdk-1.0.0/dinie/generated/types/customer_credit_offers_list_params.py +20 -0
- dinie_sdk-1.0.0/dinie/generated/types/customers_list_params.py +28 -0
- dinie_sdk-1.0.0/dinie/generated/types/ei_mei_documents_attachment.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/ei_mei_documents_requirement.py +28 -0
- dinie_sdk-1.0.0/dinie/generated/types/ei_mei_documents_submitted.py +25 -0
- dinie_sdk-1.0.0/dinie/generated/types/eireli_incorporation_statement_attachment.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/eireli_incorporation_statement_requirement.py +28 -0
- dinie_sdk-1.0.0/dinie/generated/types/eireli_incorporation_statement_submitted.py +27 -0
- dinie_sdk-1.0.0/dinie/generated/types/email_attachment.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/email_requirement.py +29 -0
- dinie_sdk-1.0.0/dinie/generated/types/email_submitted.py +25 -0
- dinie_sdk-1.0.0/dinie/generated/types/enums.py +15 -0
- dinie_sdk-1.0.0/dinie/generated/types/fixed_installment_credit_offer.py +30 -0
- dinie_sdk-1.0.0/dinie/generated/types/identity_cnh_attachment.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/identity_cnh_submitted.py +25 -0
- dinie_sdk-1.0.0/dinie/generated/types/identity_requirement.py +31 -0
- dinie_sdk-1.0.0/dinie/generated/types/identity_rg_attachment.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/identity_rg_submitted.py +25 -0
- dinie_sdk-1.0.0/dinie/generated/types/identity_submitted_union.py +25 -0
- dinie_sdk-1.0.0/dinie/generated/types/ids.py +59 -0
- dinie_sdk-1.0.0/dinie/generated/types/income_statement_attachment.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/income_statement_requirement.py +28 -0
- dinie_sdk-1.0.0/dinie/generated/types/income_statement_submitted.py +25 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_attachment_response.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_requirement_union.py +56 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_subject.py +20 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_upload_articles_of_association.py +22 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_upload_ccmei.py +22 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_upload_cnh.py +22 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_upload_ei_mei.py +22 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_upload_eireli_incorporation.py +22 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_upload_email.py +22 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_upload_income_statement.py +22 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_upload_proof_of_address.py +22 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_upload_rg.py +22 -0
- dinie_sdk-1.0.0/dinie/generated/types/kyc_upload_selfie.py +22 -0
- dinie_sdk-1.0.0/dinie/generated/types/loan.py +58 -0
- dinie_sdk-1.0.0/dinie/generated/types/loan_error.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/loan_payment.py +20 -0
- dinie_sdk-1.0.0/dinie/generated/types/loan_signer.py +20 -0
- dinie_sdk-1.0.0/dinie/generated/types/loan_transactions_list_params.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/proof_of_address_attachment.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/proof_of_address_requirement.py +31 -0
- dinie_sdk-1.0.0/dinie/generated/types/proof_of_address_submitted.py +25 -0
- dinie_sdk-1.0.0/dinie/generated/types/range_installment_credit_offer.py +32 -0
- dinie_sdk-1.0.0/dinie/generated/types/selfie_attachment.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/selfie_requirement.py +29 -0
- dinie_sdk-1.0.0/dinie/generated/types/selfie_submitted.py +25 -0
- dinie_sdk-1.0.0/dinie/generated/types/simulation.py +48 -0
- dinie_sdk-1.0.0/dinie/generated/types/token_response.py +20 -0
- dinie_sdk-1.0.0/dinie/generated/types/transaction.py +46 -0
- dinie_sdk-1.0.0/dinie/generated/types/update_customer_request.py +27 -0
- dinie_sdk-1.0.0/dinie/generated/types/update_webhook_endpoint_request.py +35 -0
- dinie_sdk-1.0.0/dinie/generated/types/webhook_delivery.py +32 -0
- dinie_sdk-1.0.0/dinie/generated/types/webhook_endpoint.py +30 -0
- dinie_sdk-1.0.0/dinie/generated/types/webhook_endpoint_with_secret.py +26 -0
- dinie_sdk-1.0.0/dinie/generated/types/webhook_endpoints_list_params.py +18 -0
- dinie_sdk-1.0.0/dinie/generated/types/webhook_event_base.py +28 -0
- dinie_sdk-1.0.0/dinie/generated/types/webhook_secret_rotation.py +22 -0
- dinie_sdk-1.0.0/dinie/py.typed +0 -0
- dinie_sdk-1.0.0/dinie/runtime/__init__.py +202 -0
- dinie_sdk-1.0.0/dinie/runtime/errors.py +246 -0
- dinie_sdk-1.0.0/dinie/runtime/http.py +424 -0
- dinie_sdk-1.0.0/dinie/runtime/idempotency.py +26 -0
- dinie_sdk-1.0.0/dinie/runtime/logger.py +248 -0
- dinie_sdk-1.0.0/dinie/runtime/models.py +70 -0
- dinie_sdk-1.0.0/dinie/runtime/multipart.py +69 -0
- dinie_sdk-1.0.0/dinie/runtime/paginator.py +116 -0
- dinie_sdk-1.0.0/dinie/runtime/rate_limit.py +119 -0
- dinie_sdk-1.0.0/dinie/runtime/request_options.py +43 -0
- dinie_sdk-1.0.0/dinie/runtime/retry.py +129 -0
- dinie_sdk-1.0.0/dinie/runtime/token_manager.py +337 -0
- dinie_sdk-1.0.0/dinie/runtime/webhooks.py +275 -0
- dinie_sdk-1.0.0/dinie/webhooks.py +17 -0
- dinie_sdk-1.0.0/mypy.ini +6 -0
- dinie_sdk-1.0.0/pyproject.toml +53 -0
- dinie_sdk-1.0.0/tests/__init__.py +0 -0
- dinie_sdk-1.0.0/tests/generated/__init__.py +0 -0
- dinie_sdk-1.0.0/tests/generated/test_019_conformance.py +792 -0
- dinie_sdk-1.0.0/tests/generated/test_r1_roundtrip.py +345 -0
- dinie_sdk-1.0.0/tests/generated/test_r6_type_safety.py +144 -0
- dinie_sdk-1.0.0/tests/runtime/__init__.py +0 -0
- dinie_sdk-1.0.0/tests/runtime/test_errors.py +161 -0
- dinie_sdk-1.0.0/tests/runtime/test_http.py +657 -0
- dinie_sdk-1.0.0/tests/runtime/test_idempotency.py +26 -0
- dinie_sdk-1.0.0/tests/runtime/test_logger.py +264 -0
- dinie_sdk-1.0.0/tests/runtime/test_models.py +83 -0
- dinie_sdk-1.0.0/tests/runtime/test_multipart.py +279 -0
- dinie_sdk-1.0.0/tests/runtime/test_paginator.py +180 -0
- dinie_sdk-1.0.0/tests/runtime/test_rate_limit.py +87 -0
- dinie_sdk-1.0.0/tests/runtime/test_request_options.py +49 -0
- dinie_sdk-1.0.0/tests/runtime/test_retry.py +127 -0
- dinie_sdk-1.0.0/tests/runtime/test_session_mode.py +529 -0
- dinie_sdk-1.0.0/tests/runtime/test_token_manager.py +161 -0
- dinie_sdk-1.0.0/tests/runtime/test_webhooks.py +454 -0
- dinie_sdk-1.0.0/tests/test_smoke.py +13 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: ruff · mypy · pytest (Python ${{ matrix.python-version }})
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: pip install -e ".[dev]"
|
|
27
|
+
|
|
28
|
+
- name: ruff lint
|
|
29
|
+
run: ruff check dinie/ tests/
|
|
30
|
+
|
|
31
|
+
- name: ruff format check
|
|
32
|
+
run: ruff format --check dinie/ tests/
|
|
33
|
+
|
|
34
|
+
- name: mypy strict
|
|
35
|
+
run: mypy --strict dinie/
|
|
36
|
+
|
|
37
|
+
- name: pytest
|
|
38
|
+
run: pytest tests/
|
|
39
|
+
|
|
40
|
+
# Non-gate: live smoke against staging (credentials not yet provisioned).
|
|
41
|
+
# Skips gracefully when DINIE_CLIENT_ID is absent.
|
|
42
|
+
- name: smoke (informative)
|
|
43
|
+
run: python -c "import os; exit(0 if not os.getenv('DINIE_CLIENT_ID') else 0)"
|
|
44
|
+
continue-on-error: true
|
|
45
|
+
env:
|
|
46
|
+
DINIE_CLIENT_ID: ${{ secrets.DINIE_CLIENT_ID }}
|
|
47
|
+
DINIE_CLIENT_SECRET: ${{ secrets.DINIE_CLIENT_SECRET }}
|
|
48
|
+
DINIE_BASE_URL: ${{ secrets.DINIE_BASE_URL }}
|
|
49
|
+
|
|
50
|
+
drift:
|
|
51
|
+
# D7: hermetic drift gate — verifies committed dinie/generated/ matches what
|
|
52
|
+
# sdk-generator emits from its vendored golden spec (no oasdiff, no api-docs
|
|
53
|
+
# checkout). A hand-edit to generated/ makes this job red; reverting makes it green.
|
|
54
|
+
#
|
|
55
|
+
# Requires (user-created):
|
|
56
|
+
# - vars.GH_APP_ID
|
|
57
|
+
# - secrets.GH_APP_PRIVATE_KEY
|
|
58
|
+
name: Drift gate (sdk-generator check)
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
|
|
61
|
+
steps:
|
|
62
|
+
- name: Checkout sdk-python
|
|
63
|
+
uses: actions/checkout@v4
|
|
64
|
+
|
|
65
|
+
- name: Mint GitHub App token (org-scoped — generator access)
|
|
66
|
+
id: app
|
|
67
|
+
uses: actions/create-github-app-token@v1
|
|
68
|
+
with:
|
|
69
|
+
app-id: ${{ vars.GH_APP_ID }}
|
|
70
|
+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
|
71
|
+
owner: dinie-tech
|
|
72
|
+
|
|
73
|
+
- name: Checkout sdk-generator (vendored golden)
|
|
74
|
+
uses: actions/checkout@v4
|
|
75
|
+
with:
|
|
76
|
+
repository: dinie-tech/sdk-generator
|
|
77
|
+
path: .gen
|
|
78
|
+
token: ${{ steps.app.outputs.token }}
|
|
79
|
+
|
|
80
|
+
- name: Set up Bun
|
|
81
|
+
uses: oven-sh/setup-bun@v2
|
|
82
|
+
|
|
83
|
+
# Python + ruff — the generator's `check --target python` runs `ruff format` to
|
|
84
|
+
# normalize generated code before diff. Without ruff, the drift check fails with
|
|
85
|
+
# "Executable not found in $PATH: ruff".
|
|
86
|
+
- name: Setup Python 3.12 + ruff (drift gate dependency)
|
|
87
|
+
uses: actions/setup-python@v5
|
|
88
|
+
with:
|
|
89
|
+
python-version: '3.12'
|
|
90
|
+
|
|
91
|
+
- name: Install ruff (pinned — matches generator CI)
|
|
92
|
+
run: pip install ruff==0.15.5
|
|
93
|
+
|
|
94
|
+
- name: Install generator dependencies
|
|
95
|
+
run: cd .gen && bun install
|
|
96
|
+
|
|
97
|
+
- name: Run drift check (hermetic — no oasdiff, no api-docs)
|
|
98
|
+
# Emits from the generator's vendored golden spec and diffs vs committed
|
|
99
|
+
# dinie/generated/. Exit 1 if any file differs → CI red (D7).
|
|
100
|
+
run: cd .gen && bun src/cli.ts check --target python --output "$GITHUB_WORKSPACE"
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
# Publishes dinie-sdk to PyPI via OIDC Trusted Publishing (keyless — no token).
|
|
4
|
+
#
|
|
5
|
+
# D1: No PYPI_API_TOKEN here, in the job, or anywhere in this repo — authentication
|
|
6
|
+
# is solely via the OIDC id-token (GitHub → PyPI federation, pypa/gh-action-pypi-publish).
|
|
7
|
+
#
|
|
8
|
+
# D8: Triggered by a tag push (v*). The tag is auto-created by tag-release.yml on a
|
|
9
|
+
# generator-bump PR merge.
|
|
10
|
+
#
|
|
11
|
+
# D9: tag-release.yml pushes the tag with the GitHub App token (not GITHUB_TOKEN) so
|
|
12
|
+
# that this workflow actually fires — GITHUB_TOKEN-pushed tags do NOT trigger other
|
|
13
|
+
# workflows (GitHub anti-recursion guard).
|
|
14
|
+
#
|
|
15
|
+
# Requires (user-created):
|
|
16
|
+
# - PyPI pending publisher registered: project=dinie-sdk, owner=dinie-tech,
|
|
17
|
+
# repo=sdk-python, workflow=publish.yml, environment=pypi
|
|
18
|
+
# - GitHub Environment 'pypi' created on this repo
|
|
19
|
+
|
|
20
|
+
on:
|
|
21
|
+
push:
|
|
22
|
+
tags:
|
|
23
|
+
- 'v*'
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
publish:
|
|
27
|
+
name: Publish to PyPI + create GitHub Release
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
environment: pypi
|
|
30
|
+
|
|
31
|
+
permissions:
|
|
32
|
+
id-token: write # MANDATORY for OIDC Trusted Publishing (D1)
|
|
33
|
+
contents: write # required to create the GitHub Release
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
|
|
38
|
+
- name: Set up Python 3.12
|
|
39
|
+
uses: actions/setup-python@v5
|
|
40
|
+
with:
|
|
41
|
+
python-version: '3.12'
|
|
42
|
+
|
|
43
|
+
- name: Build distribution
|
|
44
|
+
run: pip install build && python -m build
|
|
45
|
+
|
|
46
|
+
- name: Publish to PyPI (OIDC — no token)
|
|
47
|
+
# Keyless: no password or PYPI_API_TOKEN — the OIDC id-token is the credential.
|
|
48
|
+
# On first publish the PyPI pending publisher becomes a normal trusted publisher.
|
|
49
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
50
|
+
|
|
51
|
+
- name: Extract release notes from CHANGELOG
|
|
52
|
+
# DoD #7: extracts the [X.Y.Z] section verbatim so the GitHub Release body
|
|
53
|
+
# equals the CHANGELOG section byte-for-byte (modulo surrounding whitespace).
|
|
54
|
+
run: |
|
|
55
|
+
VERSION="${GITHUB_REF_NAME#v}"
|
|
56
|
+
awk -v ver="[${VERSION}]" \
|
|
57
|
+
'index($0, "## " ver) == 1 { found=1; next } found && /^## \[/ { exit } found { print }' \
|
|
58
|
+
CHANGELOG.md > /tmp/release_body.md
|
|
59
|
+
echo "--- Release body ---"
|
|
60
|
+
cat /tmp/release_body.md
|
|
61
|
+
echo "--- End release body ---"
|
|
62
|
+
|
|
63
|
+
- name: Create GitHub Release
|
|
64
|
+
# DoD #7: body_path references the file produced in the step above,
|
|
65
|
+
# making the Release body == CHANGELOG [X.Y.Z] section (assertable equality).
|
|
66
|
+
uses: softprops/action-gh-release@v2
|
|
67
|
+
with:
|
|
68
|
+
body_path: /tmp/release_body.md
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: Tag Release
|
|
2
|
+
|
|
3
|
+
# Creates the vX.Y.Z tag on merge of a generator-bump PR, using the GitHub App token.
|
|
4
|
+
#
|
|
5
|
+
# D8: Triggers on PR close; the guard fires only when the PR was merged AND carries
|
|
6
|
+
# the 'generator-bump' label (the label that auto-PR opens with, §8.2).
|
|
7
|
+
#
|
|
8
|
+
# D9 (LOAD-BEARING): The tag MUST be pushed with the App token, NOT with the default
|
|
9
|
+
# GITHUB_TOKEN. GitHub's anti-recursion guard prevents a GITHUB_TOKEN-pushed tag from
|
|
10
|
+
# triggering publish.yml (on: push: tags). Pushing with the App token bypasses this
|
|
11
|
+
# guard and lets publish.yml fire automatically.
|
|
12
|
+
#
|
|
13
|
+
# Requires (user-created):
|
|
14
|
+
# - vars.GH_APP_ID — GitHub App ID (integer, not a secret)
|
|
15
|
+
# - secrets.GH_APP_PRIVATE_KEY — the App private key (IS a secret)
|
|
16
|
+
|
|
17
|
+
on:
|
|
18
|
+
pull_request:
|
|
19
|
+
types: [closed]
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read # GITHUB_TOKEN is minimised; all push work uses the App token below.
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
tag:
|
|
26
|
+
name: Tag vX.Y.Z with App token (D9)
|
|
27
|
+
# Only fire when the PR was actually merged AND carries the 'generator-bump' label.
|
|
28
|
+
if: |
|
|
29
|
+
github.event.pull_request.merged == true &&
|
|
30
|
+
contains(github.event.pull_request.labels.*.name, 'generator-bump')
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
|
|
33
|
+
steps:
|
|
34
|
+
# D9: Mint the App token FIRST. This token is used for the checkout and tag push
|
|
35
|
+
# so the resulting push is attributed to the App, not GITHUB_TOKEN.
|
|
36
|
+
- name: Mint GitHub App token (D9)
|
|
37
|
+
id: app
|
|
38
|
+
uses: actions/create-github-app-token@v1
|
|
39
|
+
with:
|
|
40
|
+
app-id: ${{ vars.GH_APP_ID }}
|
|
41
|
+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
|
42
|
+
|
|
43
|
+
# Checkout with the App token so the remote is configured to use it for push.
|
|
44
|
+
- uses: actions/checkout@v4
|
|
45
|
+
with:
|
|
46
|
+
token: ${{ steps.app.outputs.token }}
|
|
47
|
+
|
|
48
|
+
- name: Read version from pyproject.toml and push tag
|
|
49
|
+
# Reads [project] version from pyproject.toml, creates a lightweight tag,
|
|
50
|
+
# and pushes it with the App token (D9) so publish.yml fires.
|
|
51
|
+
run: |
|
|
52
|
+
V=$(grep '^version = ' pyproject.toml | sed 's/^version = "\(.*\)"$/\1/')
|
|
53
|
+
if [ -z "$V" ]; then
|
|
54
|
+
echo "ERROR: could not read version from pyproject.toml" >&2
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
echo "Tagging v${V}"
|
|
58
|
+
git tag "v${V}"
|
|
59
|
+
git push origin "v${V}"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.pyd
|
|
7
|
+
|
|
8
|
+
# Build / distribution
|
|
9
|
+
build/
|
|
10
|
+
dist/
|
|
11
|
+
*.egg-info/
|
|
12
|
+
.eggs/
|
|
13
|
+
*.egg
|
|
14
|
+
MANIFEST
|
|
15
|
+
|
|
16
|
+
# Virtual environments
|
|
17
|
+
.venv/
|
|
18
|
+
venv/
|
|
19
|
+
ENV/
|
|
20
|
+
env/
|
|
21
|
+
|
|
22
|
+
# Environment files (credentials — never commit)
|
|
23
|
+
.env
|
|
24
|
+
.env.*
|
|
25
|
+
!.env.example
|
|
26
|
+
|
|
27
|
+
# Test / coverage artefacts
|
|
28
|
+
.pytest_cache/
|
|
29
|
+
.coverage
|
|
30
|
+
.coverage.*
|
|
31
|
+
htmlcov/
|
|
32
|
+
*.cover
|
|
33
|
+
*.coveragerc
|
|
34
|
+
|
|
35
|
+
# Type checking
|
|
36
|
+
.mypy_cache/
|
|
37
|
+
.dmypy.json
|
|
38
|
+
dmypy.json
|
|
39
|
+
|
|
40
|
+
# Linting
|
|
41
|
+
.ruff_cache/
|
|
42
|
+
|
|
43
|
+
# IDE
|
|
44
|
+
.idea/
|
|
45
|
+
.vscode/
|
|
46
|
+
*.swp
|
|
47
|
+
*.swo
|
|
48
|
+
|
|
49
|
+
# macOS
|
|
50
|
+
.DS_Store
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
python 3.12.0
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `dinie-sdk` Python SDK are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.0.0] - 2026-06-12
|
|
11
|
+
|
|
12
|
+
Initial public release.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **Distribution name:** `dinie-sdk` on PyPI (`from dinie import Dinie` unchanged).
|
|
17
|
+
- **OIDC Trusted Publishing:** `publish.yml` — keyless PyPI publish via
|
|
18
|
+
`pypa/gh-action-pypi-publish` (no `PYPI_API_TOKEN`). Triggered on `v*` tag push.
|
|
19
|
+
- **Tag automation:** `tag-release.yml` — pushes `vX.Y.Z` tag (via GitHub App token, D9)
|
|
20
|
+
on merge of a `generator-bump`-labelled PR so `publish.yml` fires automatically.
|
|
21
|
+
- **Drift gate:** `ci.yml` drift job — hermetic check against `sdk-generator` vendored
|
|
22
|
+
golden; fails CI on any hand-edit to `dinie/generated/`.
|
|
23
|
+
- **User-Agent header:** `Dinie-SDK-Python/<version> (api-version=<api_version>;
|
|
24
|
+
python/<rt>)` injected on every request. `sdk_version` from
|
|
25
|
+
`importlib.metadata.version("dinie-sdk")`; `api_version` from the generated
|
|
26
|
+
`_API_VERSION` constant — neither is hardcoded.
|
|
27
|
+
- **`__version__`** derived from installed package metadata via
|
|
28
|
+
`importlib.metadata.version("dinie-sdk")`.
|
|
29
|
+
- Full runtime layer: token management (client credentials + session exchange),
|
|
30
|
+
multipart/form-data transport, pagination, webhook extraction, structured errors
|
|
31
|
+
(`ApiError`, `APIConnectionError`, `APITimeoutError`, `SessionTokenExpiredError`).
|
|
32
|
+
- Generated surface: `dinie/generated/` — all six resource classes (`credentials`,
|
|
33
|
+
`customers`, `kyc_attachments`, `loans`, `offers`, `biometrics`), webhook event
|
|
34
|
+
types, `_api_version.py`, `.metadata.json` provenance. Regenerated from real
|
|
35
|
+
`dinie-tech/api-docs` spec (PR #21 — biometrics surface, pruned demo fields).
|
|
36
|
+
- `py.typed` marker (PEP 561).
|
|
37
|
+
- MIT license.
|
|
38
|
+
- CI: `ruff check`, `ruff format --check`, `mypy --strict`, `pytest` on Python 3.10,
|
|
39
|
+
3.11, 3.12.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# CODEOWNERS — runtime/ <-> generated/ directory boundary (architecture §4.2).
|
|
2
|
+
#
|
|
3
|
+
# /dinie/runtime/ -> hand-written runtime. Human owners — real enforcement.
|
|
4
|
+
# Authors: stories 003 (runtime spine) and 004 (domain types).
|
|
5
|
+
# /dinie/generated/ -> EMITTED by sdk-generator (story 007 onwards). Owned by the
|
|
6
|
+
# generator bot (@dinie-sdk-bot). CI will run `sdk-generator
|
|
7
|
+
# --check` here from V1.1 to ensure humans don't edit the
|
|
8
|
+
# generated layer without regenerating.
|
|
9
|
+
#
|
|
10
|
+
# The unidirectional import boundary (generated/ -> runtime/, never the reverse)
|
|
11
|
+
# is the load-bearing invariant; CODEOWNERS makes the ownership split explicit.
|
|
12
|
+
|
|
13
|
+
/dinie/runtime/ @jaisonerick @dinie-tech/sdk-runtime-owners
|
|
14
|
+
/dinie/generated/ @dinie-sdk-bot
|
dinie_sdk-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dinie
|
|
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.
|
dinie_sdk-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dinie-sdk
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Official Python SDK for the Dinie V3 API
|
|
5
|
+
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Requires-Dist: httpx>=0.27
|
|
9
|
+
Provides-Extra: dev
|
|
10
|
+
Requires-Dist: build; extra == 'dev'
|
|
11
|
+
Requires-Dist: mypy; extra == 'dev'
|
|
12
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
13
|
+
Requires-Dist: pytest-httpx; extra == 'dev'
|
|
14
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# dinie
|
|
18
|
+
|
|
19
|
+
Official Python SDK for the [Dinie](https://dinie.com.br) V3 API (backend-only).
|
|
20
|
+
|
|
21
|
+
A synchronous Python client for the Dinie credit-as-a-service platform: OAuth2
|
|
22
|
+
client-credentials auth (handled for you), automatic retries with idempotency, cursor
|
|
23
|
+
pagination, typed errors, and webhook verification. Snake_case throughout — the wire and
|
|
24
|
+
the Python surface match, so there is no casing to translate.
|
|
25
|
+
|
|
26
|
+
> **Status — pre-release (`0.5.0`).** The public surface is being generated from the Dinie
|
|
27
|
+
> V3 contract. PyPI publishing is planned for V1.0; until then install directly from the
|
|
28
|
+
> repository.
|
|
29
|
+
|
|
30
|
+
## Requirements
|
|
31
|
+
|
|
32
|
+
- Python >= 3.10
|
|
33
|
+
- A Dinie API credential (`client_id` + `client_secret`)
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install -e ".[dev]"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Quickstart
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
import dinie
|
|
45
|
+
|
|
46
|
+
client = dinie.Dinie(client_id="dinie_ci_…", client_secret="…")
|
|
47
|
+
|
|
48
|
+
customer = client.customers.create(
|
|
49
|
+
email="ana@example.com",
|
|
50
|
+
phone="+5511999999999",
|
|
51
|
+
cpf="123.456.789-09",
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
customer.id # "cust_…"
|
|
55
|
+
customer.status # "pending_kyc"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
> **Note:** the `Dinie` client and generated resource methods are populated in story 007.
|
|
59
|
+
> This scaffold ships a typed skeleton that keeps CI green.
|
|
60
|
+
|
|
61
|
+
The client owns an in-memory OAuth2 token cache, so **construct it once and reuse it**.
|
|
62
|
+
Tokens are fetched and refreshed transparently.
|
|
63
|
+
|
|
64
|
+
## Development
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install -e ".[dev]"
|
|
68
|
+
pytest tests/
|
|
69
|
+
ruff check dinie/ tests/
|
|
70
|
+
mypy --strict dinie/
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Architecture
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
dinie/
|
|
77
|
+
runtime/ # hand-written: HTTP, auth, retries, pagination, errors, webhooks
|
|
78
|
+
generated/ # spec-driven: client, resources, types, events (emitted by sdk-generator)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The `runtime/` layer is hand-written and owned by humans. The `generated/` layer is
|
|
82
|
+
emitted by `sdk-generator --target python` from the OpenAPI spec + `sdk-config.yml`.
|
|
83
|
+
Never hand-edit `generated/` — regenerate instead.
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# dinie
|
|
2
|
+
|
|
3
|
+
Official Python SDK for the [Dinie](https://dinie.com.br) V3 API (backend-only).
|
|
4
|
+
|
|
5
|
+
A synchronous Python client for the Dinie credit-as-a-service platform: OAuth2
|
|
6
|
+
client-credentials auth (handled for you), automatic retries with idempotency, cursor
|
|
7
|
+
pagination, typed errors, and webhook verification. Snake_case throughout — the wire and
|
|
8
|
+
the Python surface match, so there is no casing to translate.
|
|
9
|
+
|
|
10
|
+
> **Status — pre-release (`0.5.0`).** The public surface is being generated from the Dinie
|
|
11
|
+
> V3 contract. PyPI publishing is planned for V1.0; until then install directly from the
|
|
12
|
+
> repository.
|
|
13
|
+
|
|
14
|
+
## Requirements
|
|
15
|
+
|
|
16
|
+
- Python >= 3.10
|
|
17
|
+
- A Dinie API credential (`client_id` + `client_secret`)
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install -e ".[dev]"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quickstart
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
import dinie
|
|
29
|
+
|
|
30
|
+
client = dinie.Dinie(client_id="dinie_ci_…", client_secret="…")
|
|
31
|
+
|
|
32
|
+
customer = client.customers.create(
|
|
33
|
+
email="ana@example.com",
|
|
34
|
+
phone="+5511999999999",
|
|
35
|
+
cpf="123.456.789-09",
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
customer.id # "cust_…"
|
|
39
|
+
customer.status # "pending_kyc"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
> **Note:** the `Dinie` client and generated resource methods are populated in story 007.
|
|
43
|
+
> This scaffold ships a typed skeleton that keeps CI green.
|
|
44
|
+
|
|
45
|
+
The client owns an in-memory OAuth2 token cache, so **construct it once and reuse it**.
|
|
46
|
+
Tokens are fetched and refreshed transparently.
|
|
47
|
+
|
|
48
|
+
## Development
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pip install -e ".[dev]"
|
|
52
|
+
pytest tests/
|
|
53
|
+
ruff check dinie/ tests/
|
|
54
|
+
mypy --strict dinie/
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Architecture
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
dinie/
|
|
61
|
+
runtime/ # hand-written: HTTP, auth, retries, pagination, errors, webhooks
|
|
62
|
+
generated/ # spec-driven: client, resources, types, events (emitted by sdk-generator)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The `runtime/` layer is hand-written and owned by humans. The `generated/` layer is
|
|
66
|
+
emitted by `sdk-generator --target python` from the OpenAPI spec + `sdk-config.yml`.
|
|
67
|
+
Never hand-edit `generated/` — regenerate instead.
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""Dinie Python SDK.
|
|
2
|
+
|
|
3
|
+
Official SDK for the Dinie V3 API. Import the client and call it:
|
|
4
|
+
|
|
5
|
+
import dinie
|
|
6
|
+
client = dinie.Dinie(client_id="...", client_secret="...")
|
|
7
|
+
|
|
8
|
+
Webhook events:
|
|
9
|
+
|
|
10
|
+
from dinie.webhooks import extract
|
|
11
|
+
event = extract(payload, headers)
|
|
12
|
+
match event:
|
|
13
|
+
case dinie.CustomerCreatedEvent(): ...
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import importlib.metadata
|
|
19
|
+
|
|
20
|
+
from dinie.generated.client import Dinie
|
|
21
|
+
from dinie.generated.events import WebhookEvent
|
|
22
|
+
from dinie.generated.events.credit_offer_available import CreditOfferAvailable
|
|
23
|
+
from dinie.generated.events.credit_offer_expired import CreditOfferExpired
|
|
24
|
+
from dinie.generated.events.customer_active import CustomerActive
|
|
25
|
+
from dinie.generated.events.customer_created import CustomerCreated
|
|
26
|
+
from dinie.generated.events.customer_denied import CustomerDenied
|
|
27
|
+
from dinie.generated.events.customer_kyc_updated import CustomerKycUpdated
|
|
28
|
+
from dinie.generated.events.customer_under_review import CustomerUnderReview
|
|
29
|
+
from dinie.generated.events.loan_active import LoanActive
|
|
30
|
+
from dinie.generated.events.loan_cancelled import LoanCancelled
|
|
31
|
+
from dinie.generated.events.loan_created import LoanCreated
|
|
32
|
+
from dinie.generated.events.loan_error import LoanError
|
|
33
|
+
from dinie.generated.events.loan_finished import LoanFinished
|
|
34
|
+
from dinie.generated.events.loan_payment_received import LoanPaymentReceived
|
|
35
|
+
from dinie.generated.events.loan_processing import LoanProcessing
|
|
36
|
+
from dinie.generated.events.loan_signature_received import LoanSignatureReceived
|
|
37
|
+
from dinie.runtime.errors import (
|
|
38
|
+
APIConnectionError,
|
|
39
|
+
ApiError,
|
|
40
|
+
APITimeoutError,
|
|
41
|
+
SessionTokenExpiredError,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
try:
|
|
45
|
+
__version__: str = importlib.metadata.version("dinie-sdk")
|
|
46
|
+
except importlib.metadata.PackageNotFoundError:
|
|
47
|
+
__version__ = "0.0.0+dev"
|
|
48
|
+
|
|
49
|
+
# C-COLO-2: __version__ is derived from the installed package metadata (PEP 566).
|
|
50
|
+
# sdk_version in the User-Agent (runtime/http.py) reads from the same source via
|
|
51
|
+
# importlib.metadata.version("dinie-sdk") so both track the manifest, not a second literal.
|
|
52
|
+
|
|
53
|
+
__all__ = [
|
|
54
|
+
"__version__",
|
|
55
|
+
"Dinie",
|
|
56
|
+
"WebhookEvent",
|
|
57
|
+
# Event types (for match/case and isinstance checks)
|
|
58
|
+
"CreditOfferAvailable",
|
|
59
|
+
"CreditOfferExpired",
|
|
60
|
+
"CustomerActive",
|
|
61
|
+
"CustomerCreated",
|
|
62
|
+
"CustomerDenied",
|
|
63
|
+
"CustomerKycUpdated",
|
|
64
|
+
"CustomerUnderReview",
|
|
65
|
+
"LoanActive",
|
|
66
|
+
"LoanCancelled",
|
|
67
|
+
"LoanCreated",
|
|
68
|
+
"LoanError",
|
|
69
|
+
"LoanFinished",
|
|
70
|
+
"LoanPaymentReceived",
|
|
71
|
+
"LoanProcessing",
|
|
72
|
+
"LoanSignatureReceived",
|
|
73
|
+
# Errors
|
|
74
|
+
"ApiError",
|
|
75
|
+
"APIConnectionError",
|
|
76
|
+
"APITimeoutError",
|
|
77
|
+
"SessionTokenExpiredError",
|
|
78
|
+
]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# generated — do not edit
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from .client import Dinie
|
|
5
|
+
from .errors import (
|
|
6
|
+
ERROR_REGISTRY_BY_STATUS,
|
|
7
|
+
ERROR_REGISTRY_BY_TYPE,
|
|
8
|
+
SERVER_ERROR_CLASS,
|
|
9
|
+
)
|
|
10
|
+
from .events import EVENT_DESERIALIZERS, WebhookEvent
|
|
11
|
+
from .types import * # noqa: F401, F403
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"Dinie",
|
|
15
|
+
"ERROR_REGISTRY_BY_TYPE",
|
|
16
|
+
"ERROR_REGISTRY_BY_STATUS",
|
|
17
|
+
"SERVER_ERROR_CLASS",
|
|
18
|
+
"EVENT_DESERIALIZERS",
|
|
19
|
+
"WebhookEvent",
|
|
20
|
+
]
|