Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.create_manual_closing_entry_request import (
CreateManualClosingEntryRequest,
)
from ...models.create_agent_request import CreateAgentRequest
from ...models.http_validation_error import HTTPValidationError
from ...models.operation_envelope import OperationEnvelope
from ...models.operation_error import OperationError
Expand All @@ -18,7 +16,7 @@
def _get_kwargs(
graph_id: str,
*,
body: CreateManualClosingEntryRequest,
body: CreateAgentRequest,
idempotency_key: None | str | Unset = UNSET,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
Expand All @@ -27,7 +25,7 @@ def _get_kwargs(

_kwargs: dict[str, Any] = {
"method": "post",
"url": "/extensions/roboledger/{graph_id}/operations/create-manual-closing-entry".format(
"url": "/extensions/roboledger/{graph_id}/operations/create-agent".format(
graph_id=quote(str(graph_id), safe=""),
),
}
Expand Down Expand Up @@ -105,22 +103,21 @@ def sync_detailed(
graph_id: str,
*,
client: AuthenticatedClient,
body: CreateManualClosingEntryRequest,
body: CreateAgentRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
"""Create Manual Closing Entry
"""Create Agent

Create a draft closing entry with manually specified line items — not tied to a schedule. Use for
one-off business events (asset disposal, correcting entry, impairment). Total debits must equal
total credits.
Create a counterparty record (customer, vendor, employee, etc.). The (source, external_id) pair is a
dedup key — a second insert with the same pair returns 409. Use update-agent to patch fields.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateManualClosingEntryRequest):
body (CreateAgentRequest):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -147,22 +144,21 @@ def sync(
graph_id: str,
*,
client: AuthenticatedClient,
body: CreateManualClosingEntryRequest,
body: CreateAgentRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None:
"""Create Manual Closing Entry
"""Create Agent

Create a draft closing entry with manually specified line items — not tied to a schedule. Use for
one-off business events (asset disposal, correcting entry, impairment). Total debits must equal
total credits.
Create a counterparty record (customer, vendor, employee, etc.). The (source, external_id) pair is a
dedup key — a second insert with the same pair returns 409. Use update-agent to patch fields.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateManualClosingEntryRequest):
body (CreateAgentRequest):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -184,22 +180,21 @@ async def asyncio_detailed(
graph_id: str,
*,
client: AuthenticatedClient,
body: CreateManualClosingEntryRequest,
body: CreateAgentRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
"""Create Manual Closing Entry
"""Create Agent

Create a draft closing entry with manually specified line items — not tied to a schedule. Use for
one-off business events (asset disposal, correcting entry, impairment). Total debits must equal
total credits.
Create a counterparty record (customer, vendor, employee, etc.). The (source, external_id) pair is a
dedup key — a second insert with the same pair returns 409. Use update-agent to patch fields.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateManualClosingEntryRequest):
body (CreateAgentRequest):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -224,22 +219,21 @@ async def asyncio(
graph_id: str,
*,
client: AuthenticatedClient,
body: CreateManualClosingEntryRequest,
body: CreateAgentRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None:
"""Create Manual Closing Entry
"""Create Agent

Create a draft closing entry with manually specified line items — not tied to a schedule. Use for
one-off business events (asset disposal, correcting entry, impairment). Total debits must equal
total credits.
Create a counterparty record (customer, vendor, employee, etc.). The (source, external_id) pair is a
dedup key — a second insert with the same pair returns 409. Use update-agent to patch fields.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateManualClosingEntryRequest):
body (CreateAgentRequest):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.create_closing_entry_operation import CreateClosingEntryOperation
from ...models.create_event_block_request import CreateEventBlockRequest
from ...models.http_validation_error import HTTPValidationError
from ...models.operation_envelope import OperationEnvelope
from ...models.operation_error import OperationError
Expand All @@ -16,7 +16,7 @@
def _get_kwargs(
graph_id: str,
*,
body: CreateClosingEntryOperation,
body: CreateEventBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
Expand All @@ -25,7 +25,7 @@ def _get_kwargs(

_kwargs: dict[str, Any] = {
"method": "post",
"url": "/extensions/roboledger/{graph_id}/operations/create-closing-entry".format(
"url": "/extensions/roboledger/{graph_id}/operations/create-event-block".format(
graph_id=quote(str(graph_id), safe=""),
),
}
Expand Down Expand Up @@ -103,26 +103,22 @@ def sync_detailed(
graph_id: str,
*,
client: AuthenticatedClient,
body: CreateClosingEntryOperation,
body: CreateEventBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
"""Create Closing Entry
"""Create Event Block

Create a draft closing entry pre-populated from a schedule's facts for the given period. Idempotent
— safe to call repeatedly; the `outcome` field describes what happened (`created`, `unchanged`,
`regenerated`, `removed`, `skipped`).
Persist a real-world business event. apply_handlers=False (default): capture-only,
status='captured'. apply_handlers=True: resolves an event_handler, fires the template, creates GL
entries atomically, status='classified'. Use preview-event-block to dry-run before committing.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateClosingEntryOperation): CQRS-shaped body for `POST /operations/create-closing-
entry`.

`structure_id` moves into the body so REST + MCP share a single body
type via the registrar.
body (CreateEventBlockRequest): Write surface for a single business event.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -149,26 +145,22 @@ def sync(
graph_id: str,
*,
client: AuthenticatedClient,
body: CreateClosingEntryOperation,
body: CreateEventBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None:
"""Create Closing Entry
"""Create Event Block

Create a draft closing entry pre-populated from a schedule's facts for the given period. Idempotent
— safe to call repeatedly; the `outcome` field describes what happened (`created`, `unchanged`,
`regenerated`, `removed`, `skipped`).
Persist a real-world business event. apply_handlers=False (default): capture-only,
status='captured'. apply_handlers=True: resolves an event_handler, fires the template, creates GL
entries atomically, status='classified'. Use preview-event-block to dry-run before committing.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateClosingEntryOperation): CQRS-shaped body for `POST /operations/create-closing-
entry`.

`structure_id` moves into the body so REST + MCP share a single body
type via the registrar.
body (CreateEventBlockRequest): Write surface for a single business event.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -190,26 +182,22 @@ async def asyncio_detailed(
graph_id: str,
*,
client: AuthenticatedClient,
body: CreateClosingEntryOperation,
body: CreateEventBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
"""Create Closing Entry
"""Create Event Block

Create a draft closing entry pre-populated from a schedule's facts for the given period. Idempotent
— safe to call repeatedly; the `outcome` field describes what happened (`created`, `unchanged`,
`regenerated`, `removed`, `skipped`).
Persist a real-world business event. apply_handlers=False (default): capture-only,
status='captured'. apply_handlers=True: resolves an event_handler, fires the template, creates GL
entries atomically, status='classified'. Use preview-event-block to dry-run before committing.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateClosingEntryOperation): CQRS-shaped body for `POST /operations/create-closing-
entry`.

`structure_id` moves into the body so REST + MCP share a single body
type via the registrar.
body (CreateEventBlockRequest): Write surface for a single business event.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -234,26 +222,22 @@ async def asyncio(
graph_id: str,
*,
client: AuthenticatedClient,
body: CreateClosingEntryOperation,
body: CreateEventBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None:
"""Create Closing Entry
"""Create Event Block

Create a draft closing entry pre-populated from a schedule's facts for the given period. Idempotent
— safe to call repeatedly; the `outcome` field describes what happened (`created`, `unchanged`,
`regenerated`, `removed`, `skipped`).
Persist a real-world business event. apply_handlers=False (default): capture-only,
status='captured'. apply_handlers=True: resolves an event_handler, fires the template, creates GL
entries atomically, status='classified'. Use preview-event-block to dry-run before committing.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateClosingEntryOperation): CQRS-shaped body for `POST /operations/create-closing-
entry`.

`structure_id` moves into the body so REST + MCP share a single body
type via the registrar.
body (CreateEventBlockRequest): Write surface for a single business event.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand Down
Loading
Loading