wflow-api 0.1.0__py3-none-any.whl
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.
- wflow_api/__init__.py +20 -0
- wflow_api/auth.py +85 -0
- wflow_api/client.py +130 -0
- wflow_api/errors.py +13 -0
- wflow_api/guards.py +132 -0
- wflow_api/models/__init__.py +128 -0
- wflow_api/models/account.py +127 -0
- wflow_api/models/admin.py +98 -0
- wflow_api/models/common.py +117 -0
- wflow_api/models/documents.py +514 -0
- wflow_api/models/registers.py +165 -0
- wflow_api/models/requests.py +341 -0
- wflow_api/models/storage.py +38 -0
- wflow_api/operation.py +50 -0
- wflow_api/operations/__init__.py +21 -0
- wflow_api/operations/account.py +46 -0
- wflow_api/operations/admin.py +307 -0
- wflow_api/operations/approvals.py +235 -0
- wflow_api/operations/document_files.py +145 -0
- wflow_api/operations/document_properties.py +204 -0
- wflow_api/operations/document_tags.py +60 -0
- wflow_api/operations/documents.py +603 -0
- wflow_api/operations/integrations.py +63 -0
- wflow_api/operations/organization.py +51 -0
- wflow_api/operations/registers.py +2273 -0
- wflow_api/operations/storage_files.py +477 -0
- wflow_api/operations/storage_folders.py +132 -0
- wflow_api/operations/webhooks.py +67 -0
- wflow_api/py.typed +0 -0
- wflow_api-0.1.0.dist-info/METADATA +48 -0
- wflow_api-0.1.0.dist-info/RECORD +33 -0
- wflow_api-0.1.0.dist-info/WHEEL +4 -0
- wflow_api-0.1.0.dist-info/licenses/LICENSE +202 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Organization: the current workspace's own identity and settings."""
|
|
2
|
+
|
|
3
|
+
from wflow_api.client import WflowClient
|
|
4
|
+
from wflow_api.models import Organization, OrganizationSettings, OrgSlug
|
|
5
|
+
from wflow_api.operation import operation
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@operation
|
|
9
|
+
async def get_organization(client: WflowClient, organization: OrgSlug) -> Organization:
|
|
10
|
+
"""The workspace's own identity — who this organization is, not who the caller is.
|
|
11
|
+
|
|
12
|
+
Use `get_me` for the signed-in user's rights within the workspace, and this for the
|
|
13
|
+
workspace itself.
|
|
14
|
+
|
|
15
|
+
Fields:
|
|
16
|
+
|
|
17
|
+
- `name`, `id`, `created` — display name and identity
|
|
18
|
+
- `organizationUrlPart`, `customerUrlPart` — the slugs in the workspace's URLs
|
|
19
|
+
- `vatCountry`, `vatNonPayer` — which VAT regime documents are processed under
|
|
20
|
+
- `seriesOnDocument`, `acceptDateAsCreatedDate` — document numbering and dating behaviour
|
|
21
|
+
- `allowSupportAccess` — whether wflow support may enter this workspace
|
|
22
|
+
- `trialExpiration` — trial end date, or null when not on a trial
|
|
23
|
+
- `authenticationPolicy`, `biDashboardStatus`, `biDashboardTrialExpires`
|
|
24
|
+
"""
|
|
25
|
+
return Organization.model_validate(await client.request("GET", f"/api/{organization}/organization") or {})
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@operation
|
|
29
|
+
async def get_organization_settings(client: WflowClient, organization: OrgSlug) -> OrganizationSettings:
|
|
30
|
+
"""How this workspace processes documents — the toggles behind its automatic behaviour.
|
|
31
|
+
|
|
32
|
+
Read this before explaining why a document was linked, posted or numbered the way it
|
|
33
|
+
was: most of that behaviour is a setting here rather than a rule in the document.
|
|
34
|
+
|
|
35
|
+
Fields:
|
|
36
|
+
|
|
37
|
+
- `vatCountry`, `vatNonPayer`, `fiscalYearStart` — the accounting regime
|
|
38
|
+
- `defaultLanguage`, `name` — workspace defaults
|
|
39
|
+
- `processIsdoc`, `processIsdocLines`, `processIsdocDescription`,
|
|
40
|
+
`autoGenerateMissingPDFForISDOC` — how ISDOC e-invoices are ingested
|
|
41
|
+
- `processEKasa`, `processEKasaLines` — how eKasa receipts are ingested
|
|
42
|
+
- `autoLinkIISD`, `autoLinkIISDToleranceRate`, `autoLinkTakeLinesIISD`,
|
|
43
|
+
`autoLinkTakeAccountingIISD`, `numberOnlyIISD`, `shareApproveIISD`,
|
|
44
|
+
`shareApproveIISDTolerance` — automatic linking of invoices to delivery notes
|
|
45
|
+
- `autoLinkPartner`, `sortDocumentsByIc` — partner matching
|
|
46
|
+
- `enableLinesApproval`, `autoCloneLastDocumentAccounting`, `vatInclusiveBudgets`
|
|
47
|
+
- `allowSupportAccess`, `trialExpiration`
|
|
48
|
+
"""
|
|
49
|
+
return OrganizationSettings.model_validate(
|
|
50
|
+
await client.request("GET", f"/api/{organization}/organization/settings") or {}
|
|
51
|
+
)
|