fragment-python 0.5.0__tar.gz → 0.5.1__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.
- {fragment_python-0.5.0 → fragment_python-0.5.1}/PKG-INFO +1 -1
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/__init__.py +14 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/client.py +37 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/enums.py +11 -0
- fragment_python-0.5.1/fragment/sdk/get_ledger_account_balance_with_child_rollup.py +23 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/input_types.py +15 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/std_queries/queries.graphql +19 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/__init__.py +14 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/client.py +37 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/enums.py +11 -0
- fragment_python-0.5.1/fragment/sync_sdk/get_ledger_account_balance_with_child_rollup.py +23 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/input_types.py +15 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/pyproject.toml +1 -1
- {fragment_python-0.5.0 → fragment_python-0.5.1}/LICENSE +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/README.md +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/__init__.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/client/__init__.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/client/async_client.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/client/sync_client.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/codegen/__init__.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/codegen/helpers.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/codegen/main.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/codegen/plugins/__init__.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/codegen/plugins/generate_client_method.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/codegen/plugins/get_file_comment.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/exceptions.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/logger.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/add_ledger_entry.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/add_ledger_entry_runtime.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/async_client.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/base_model.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/create_custom_currency.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/create_custom_link.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/create_ledger.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/delete_custom_txs.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/delete_ledger.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/delete_schema.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/get_ledger.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/get_ledger_account_balance.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/get_ledger_account_lines.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/get_ledger_entry.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/get_schema.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/get_workspace.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/list_ledger_account_balances.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/list_ledger_accounts.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/list_ledger_entries.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/list_ledger_entry_group_balances.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/list_multi_currency_ledger_account_balances.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/migrate_ledger_entry.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/reconcile_tx.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/reconcile_tx_runtime.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/reverse_ledger_entry.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/store_schema.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/sync_custom_accounts.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/sync_custom_txs.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/update_ledger.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/update_ledger_entry.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/add_ledger_entry.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/add_ledger_entry_runtime.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/async_client.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/base_model.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/create_custom_currency.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/create_custom_link.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/create_ledger.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/delete_custom_txs.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/delete_ledger.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/delete_schema.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/get_ledger.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/get_ledger_account_balance.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/get_ledger_account_lines.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/get_ledger_entry.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/get_schema.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/get_workspace.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/list_ledger_account_balances.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/list_ledger_accounts.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/list_ledger_entries.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/list_ledger_entry_group_balances.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/list_multi_currency_ledger_account_balances.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/migrate_ledger_entry.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/reconcile_tx.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/reconcile_tx_runtime.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/reverse_ledger_entry.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/store_schema.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/sync_client.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/sync_custom_accounts.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/sync_custom_txs.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/update_ledger.py +0 -0
- {fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/update_ledger_entry.py +0 -0
|
@@ -72,6 +72,7 @@ from .enums import (
|
|
|
72
72
|
Granularity,
|
|
73
73
|
IncreaseEnv,
|
|
74
74
|
LedgerAccountTypes,
|
|
75
|
+
LedgerDataMigrationStatus,
|
|
75
76
|
LedgerLinesConsistencyMode,
|
|
76
77
|
LedgerMigrationStatus,
|
|
77
78
|
LedgerTypes,
|
|
@@ -79,6 +80,7 @@ from .enums import (
|
|
|
79
80
|
ReadBalanceConsistencyMode,
|
|
80
81
|
SceneEventType,
|
|
81
82
|
SchemaConsistencyMode,
|
|
83
|
+
SchemaLedgerAccountStatus,
|
|
82
84
|
SchemaLedgerEntryStatus,
|
|
83
85
|
StripeEnv,
|
|
84
86
|
TxType,
|
|
@@ -89,6 +91,10 @@ from .get_ledger_account_balance import (
|
|
|
89
91
|
GetLedgerAccountBalance,
|
|
90
92
|
GetLedgerAccountBalanceLedgerAccount,
|
|
91
93
|
)
|
|
94
|
+
from .get_ledger_account_balance_with_child_rollup import (
|
|
95
|
+
GetLedgerAccountBalanceWithChildRollup,
|
|
96
|
+
GetLedgerAccountBalanceWithChildRollupLedgerAccount,
|
|
97
|
+
)
|
|
92
98
|
from .get_ledger_account_lines import (
|
|
93
99
|
GetLedgerAccountLines,
|
|
94
100
|
GetLedgerAccountLinesLedgerAccount,
|
|
@@ -128,6 +134,7 @@ from .input_types import (
|
|
|
128
134
|
Int96Filter,
|
|
129
135
|
LedgerAccountConditionInput,
|
|
130
136
|
LedgerAccountConsistencyConfigInput,
|
|
137
|
+
LedgerAccountDataMigrationsFilterSet,
|
|
131
138
|
LedgerAccountFilter,
|
|
132
139
|
LedgerAccountGroupConsistencyConfigInput,
|
|
133
140
|
LedgerAccountMatchInput,
|
|
@@ -135,6 +142,7 @@ from .input_types import (
|
|
|
135
142
|
LedgerAccountTypeFilter,
|
|
136
143
|
LedgerEntriesFilterSet,
|
|
137
144
|
LedgerEntryConditionInput,
|
|
145
|
+
LedgerEntryDataMigrationsFilterSet,
|
|
138
146
|
LedgerEntryFilter,
|
|
139
147
|
LedgerEntryGroupBalanceFilter,
|
|
140
148
|
LedgerEntryGroupBalanceFilterSet,
|
|
@@ -393,6 +401,8 @@ __all__ = [
|
|
|
393
401
|
"GetLedger",
|
|
394
402
|
"GetLedgerAccountBalance",
|
|
395
403
|
"GetLedgerAccountBalanceLedgerAccount",
|
|
404
|
+
"GetLedgerAccountBalanceWithChildRollup",
|
|
405
|
+
"GetLedgerAccountBalanceWithChildRollupLedgerAccount",
|
|
396
406
|
"GetLedgerAccountLines",
|
|
397
407
|
"GetLedgerAccountLinesLedgerAccount",
|
|
398
408
|
"GetLedgerAccountLinesLedgerAccountLines",
|
|
@@ -419,14 +429,17 @@ __all__ = [
|
|
|
419
429
|
"Int96Filter",
|
|
420
430
|
"LedgerAccountConditionInput",
|
|
421
431
|
"LedgerAccountConsistencyConfigInput",
|
|
432
|
+
"LedgerAccountDataMigrationsFilterSet",
|
|
422
433
|
"LedgerAccountFilter",
|
|
423
434
|
"LedgerAccountGroupConsistencyConfigInput",
|
|
424
435
|
"LedgerAccountMatchInput",
|
|
425
436
|
"LedgerAccountTypeFilter",
|
|
426
437
|
"LedgerAccountTypes",
|
|
427
438
|
"LedgerAccountsFilterSet",
|
|
439
|
+
"LedgerDataMigrationStatus",
|
|
428
440
|
"LedgerEntriesFilterSet",
|
|
429
441
|
"LedgerEntryConditionInput",
|
|
442
|
+
"LedgerEntryDataMigrationsFilterSet",
|
|
430
443
|
"LedgerEntryFilter",
|
|
431
444
|
"LedgerEntryGroupBalanceFilter",
|
|
432
445
|
"LedgerEntryGroupBalanceFilterSet",
|
|
@@ -543,6 +556,7 @@ __all__ = [
|
|
|
543
556
|
"SchemaInt96ConditionInput",
|
|
544
557
|
"SchemaLedgerAccountInput",
|
|
545
558
|
"SchemaLedgerAccountMatchInput",
|
|
559
|
+
"SchemaLedgerAccountStatus",
|
|
546
560
|
"SchemaLedgerEntriesInput",
|
|
547
561
|
"SchemaLedgerEntryConditionInput",
|
|
548
562
|
"SchemaLedgerEntryGroupInput",
|
|
@@ -15,6 +15,9 @@ from .delete_schema import DeleteSchema
|
|
|
15
15
|
from .enums import ReadBalanceConsistencyMode
|
|
16
16
|
from .get_ledger import GetLedger
|
|
17
17
|
from .get_ledger_account_balance import GetLedgerAccountBalance
|
|
18
|
+
from .get_ledger_account_balance_with_child_rollup import (
|
|
19
|
+
GetLedgerAccountBalanceWithChildRollup,
|
|
20
|
+
)
|
|
18
21
|
from .get_ledger_account_lines import GetLedgerAccountLines
|
|
19
22
|
from .get_ledger_entry import GetLedgerEntry
|
|
20
23
|
from .get_schema import GetSchema
|
|
@@ -1242,6 +1245,40 @@ class Client(AsyncFragmentClient):
|
|
|
1242
1245
|
data = self.get_data(response)
|
|
1243
1246
|
return GetLedgerAccountBalance.model_validate(data)
|
|
1244
1247
|
|
|
1248
|
+
async def get_ledger_account_balance_with_child_rollup(
|
|
1249
|
+
self,
|
|
1250
|
+
path: str,
|
|
1251
|
+
ledger_ik: Any,
|
|
1252
|
+
balance_currency: Optional[CurrencyMatchInput] = None,
|
|
1253
|
+
balance_at: Optional[Any] = None,
|
|
1254
|
+
**kwargs: Any
|
|
1255
|
+
) -> GetLedgerAccountBalanceWithChildRollup:
|
|
1256
|
+
query = gql(
|
|
1257
|
+
"""
|
|
1258
|
+
query GetLedgerAccountBalanceWithChildRollup($path: String!, $ledgerIk: SafeString!, $balanceCurrency: CurrencyMatchInput, $balanceAt: LastMoment) {
|
|
1259
|
+
ledgerAccount(ledgerAccount: {ledger: {ik: $ledgerIk}, path: $path}) {
|
|
1260
|
+
id
|
|
1261
|
+
path
|
|
1262
|
+
balance(currency: $balanceCurrency, at: $balanceAt)
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
"""
|
|
1266
|
+
)
|
|
1267
|
+
variables: Dict[str, object] = {
|
|
1268
|
+
"path": path,
|
|
1269
|
+
"ledgerIk": ledger_ik,
|
|
1270
|
+
"balanceCurrency": balance_currency,
|
|
1271
|
+
"balanceAt": balance_at,
|
|
1272
|
+
}
|
|
1273
|
+
response = await self.execute(
|
|
1274
|
+
query=query,
|
|
1275
|
+
operation_name="GetLedgerAccountBalanceWithChildRollup",
|
|
1276
|
+
variables=variables,
|
|
1277
|
+
**kwargs
|
|
1278
|
+
)
|
|
1279
|
+
data = self.get_data(response)
|
|
1280
|
+
return GetLedgerAccountBalanceWithChildRollup.model_validate(data)
|
|
1281
|
+
|
|
1245
1282
|
async def get_schema(
|
|
1246
1283
|
self, key: Any, version: Optional[int] = None, **kwargs: Any
|
|
1247
1284
|
) -> GetSchema:
|
|
@@ -222,6 +222,11 @@ class LedgerAccountTypes(str, Enum):
|
|
|
222
222
|
liability = "liability"
|
|
223
223
|
|
|
224
224
|
|
|
225
|
+
class LedgerDataMigrationStatus(str, Enum):
|
|
226
|
+
active = "active"
|
|
227
|
+
inactive = "inactive"
|
|
228
|
+
|
|
229
|
+
|
|
225
230
|
class LedgerLinesConsistencyMode(str, Enum):
|
|
226
231
|
eventual = "eventual"
|
|
227
232
|
strong = "strong"
|
|
@@ -261,6 +266,12 @@ class SchemaConsistencyMode(str, Enum):
|
|
|
261
266
|
strong = "strong"
|
|
262
267
|
|
|
263
268
|
|
|
269
|
+
class SchemaLedgerAccountStatus(str, Enum):
|
|
270
|
+
active = "active"
|
|
271
|
+
archived = "archived"
|
|
272
|
+
disabled = "disabled"
|
|
273
|
+
|
|
274
|
+
|
|
264
275
|
class SchemaLedgerEntryStatus(str, Enum):
|
|
265
276
|
active = "active"
|
|
266
277
|
archived = "archived"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Generated by fragment (with the help of ariadne-codegen)
|
|
2
|
+
# Source: queries/
|
|
3
|
+
|
|
4
|
+
from typing import Any, Optional
|
|
5
|
+
|
|
6
|
+
from pydantic import Field
|
|
7
|
+
|
|
8
|
+
from .base_model import BaseModel
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GetLedgerAccountBalanceWithChildRollup(BaseModel):
|
|
12
|
+
ledger_account: Optional["GetLedgerAccountBalanceWithChildRollupLedgerAccount"] = (
|
|
13
|
+
Field(alias="ledgerAccount")
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class GetLedgerAccountBalanceWithChildRollupLedgerAccount(BaseModel):
|
|
18
|
+
id: str
|
|
19
|
+
path: str
|
|
20
|
+
balance: Any
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
GetLedgerAccountBalanceWithChildRollup.model_rebuild()
|
|
@@ -11,11 +11,13 @@ from .enums import (
|
|
|
11
11
|
CurrencyCode,
|
|
12
12
|
CurrencyMode,
|
|
13
13
|
LedgerAccountTypes,
|
|
14
|
+
LedgerDataMigrationStatus,
|
|
14
15
|
LedgerLinesConsistencyMode,
|
|
15
16
|
LedgerTypes,
|
|
16
17
|
LinkType,
|
|
17
18
|
SceneEventType,
|
|
18
19
|
SchemaConsistencyMode,
|
|
20
|
+
SchemaLedgerAccountStatus,
|
|
19
21
|
SchemaLedgerEntryStatus,
|
|
20
22
|
TxType,
|
|
21
23
|
)
|
|
@@ -184,6 +186,11 @@ class LedgerAccountConsistencyConfigInput(BaseModel):
|
|
|
184
186
|
)
|
|
185
187
|
|
|
186
188
|
|
|
189
|
+
class LedgerAccountDataMigrationsFilterSet(BaseModel):
|
|
190
|
+
account_path: Optional[Any] = Field(alias="accountPath", default=None)
|
|
191
|
+
status: Optional[LedgerDataMigrationStatus] = None
|
|
192
|
+
|
|
193
|
+
|
|
187
194
|
class LedgerAccountFilter(BaseModel):
|
|
188
195
|
equal_to: Optional["LedgerAccountMatchInput"] = Field(alias="equalTo", default=None)
|
|
189
196
|
in_: Optional[List["LedgerAccountMatchInput"]] = Field(alias="in", default=None)
|
|
@@ -245,6 +252,12 @@ class LedgerEntryConditionInput(BaseModel):
|
|
|
245
252
|
precondition: Optional["LedgerAccountConditionInput"] = None
|
|
246
253
|
|
|
247
254
|
|
|
255
|
+
class LedgerEntryDataMigrationsFilterSet(BaseModel):
|
|
256
|
+
entry_type: Optional[Any] = Field(alias="entryType", default=None)
|
|
257
|
+
status: Optional[LedgerDataMigrationStatus] = None
|
|
258
|
+
type_version: Optional[int] = Field(alias="typeVersion", default=None)
|
|
259
|
+
|
|
260
|
+
|
|
248
261
|
class LedgerEntryFilter(BaseModel):
|
|
249
262
|
equal_to: Optional["LedgerEntryMatchInput"] = Field(alias="equalTo", default=None)
|
|
250
263
|
in_: Optional[List["LedgerEntryMatchInput"]] = Field(alias="in", default=None)
|
|
@@ -319,6 +332,7 @@ class LedgerLineMatchInput(BaseModel):
|
|
|
319
332
|
|
|
320
333
|
class LedgerLinesFilterSet(BaseModel):
|
|
321
334
|
created: Optional["DateTimeFilter"] = None
|
|
335
|
+
currency: Optional["CurrencyFilter"] = None
|
|
322
336
|
date: Optional["DateFilter"] = None
|
|
323
337
|
is_reversal: Optional[bool] = Field(alias="isReversal", default=None)
|
|
324
338
|
is_reversed: Optional[bool] = Field(alias="isReversed", default=None)
|
|
@@ -421,6 +435,7 @@ class SchemaLedgerAccountInput(BaseModel):
|
|
|
421
435
|
alias="linkedAccount", default=None
|
|
422
436
|
)
|
|
423
437
|
name: Optional[Any] = None
|
|
438
|
+
status: Optional[SchemaLedgerAccountStatus] = None
|
|
424
439
|
template: Optional[bool] = None
|
|
425
440
|
type: Optional[LedgerAccountTypes] = None
|
|
426
441
|
|
|
@@ -155,6 +155,7 @@ mutation reverseLedgerEntry(
|
|
|
155
155
|
$id: ID!
|
|
156
156
|
) {
|
|
157
157
|
reverseLedgerEntry(id: $id) {
|
|
158
|
+
__typename
|
|
158
159
|
... on ReverseLedgerEntryResult {
|
|
159
160
|
reversingLedgerEntry {
|
|
160
161
|
ik
|
|
@@ -215,6 +216,7 @@ mutation migrateLedgerEntry(
|
|
|
215
216
|
id: $id
|
|
216
217
|
newLedgerEntry: $newLedgerEntry
|
|
217
218
|
}) {
|
|
219
|
+
__typename
|
|
218
220
|
... on MigrateLedgerEntryResult {
|
|
219
221
|
reversingLedgerEntry {
|
|
220
222
|
ik
|
|
@@ -826,6 +828,23 @@ query getLedgerAccountBalance(
|
|
|
826
828
|
}
|
|
827
829
|
}
|
|
828
830
|
|
|
831
|
+
query GetLedgerAccountBalanceWithChildRollup(
|
|
832
|
+
$path: String!
|
|
833
|
+
$ledgerIk: SafeString!
|
|
834
|
+
$balanceCurrency: CurrencyMatchInput
|
|
835
|
+
$balanceAt: LastMoment
|
|
836
|
+
) {
|
|
837
|
+
ledgerAccount(ledgerAccount: { ledger: { ik: $ledgerIk }, path: $path }) {
|
|
838
|
+
id
|
|
839
|
+
path
|
|
840
|
+
balance(
|
|
841
|
+
currency: $balanceCurrency
|
|
842
|
+
at: $balanceAt
|
|
843
|
+
)
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
|
|
829
848
|
query getSchema($key: SafeString!, $version: Int) {
|
|
830
849
|
schema(schema: { key: $key, version: $version }) {
|
|
831
850
|
key
|
|
@@ -71,6 +71,7 @@ from .enums import (
|
|
|
71
71
|
Granularity,
|
|
72
72
|
IncreaseEnv,
|
|
73
73
|
LedgerAccountTypes,
|
|
74
|
+
LedgerDataMigrationStatus,
|
|
74
75
|
LedgerLinesConsistencyMode,
|
|
75
76
|
LedgerMigrationStatus,
|
|
76
77
|
LedgerTypes,
|
|
@@ -78,6 +79,7 @@ from .enums import (
|
|
|
78
79
|
ReadBalanceConsistencyMode,
|
|
79
80
|
SceneEventType,
|
|
80
81
|
SchemaConsistencyMode,
|
|
82
|
+
SchemaLedgerAccountStatus,
|
|
81
83
|
SchemaLedgerEntryStatus,
|
|
82
84
|
StripeEnv,
|
|
83
85
|
TxType,
|
|
@@ -88,6 +90,10 @@ from .get_ledger_account_balance import (
|
|
|
88
90
|
GetLedgerAccountBalance,
|
|
89
91
|
GetLedgerAccountBalanceLedgerAccount,
|
|
90
92
|
)
|
|
93
|
+
from .get_ledger_account_balance_with_child_rollup import (
|
|
94
|
+
GetLedgerAccountBalanceWithChildRollup,
|
|
95
|
+
GetLedgerAccountBalanceWithChildRollupLedgerAccount,
|
|
96
|
+
)
|
|
91
97
|
from .get_ledger_account_lines import (
|
|
92
98
|
GetLedgerAccountLines,
|
|
93
99
|
GetLedgerAccountLinesLedgerAccount,
|
|
@@ -127,6 +133,7 @@ from .input_types import (
|
|
|
127
133
|
Int96Filter,
|
|
128
134
|
LedgerAccountConditionInput,
|
|
129
135
|
LedgerAccountConsistencyConfigInput,
|
|
136
|
+
LedgerAccountDataMigrationsFilterSet,
|
|
130
137
|
LedgerAccountFilter,
|
|
131
138
|
LedgerAccountGroupConsistencyConfigInput,
|
|
132
139
|
LedgerAccountMatchInput,
|
|
@@ -134,6 +141,7 @@ from .input_types import (
|
|
|
134
141
|
LedgerAccountTypeFilter,
|
|
135
142
|
LedgerEntriesFilterSet,
|
|
136
143
|
LedgerEntryConditionInput,
|
|
144
|
+
LedgerEntryDataMigrationsFilterSet,
|
|
137
145
|
LedgerEntryFilter,
|
|
138
146
|
LedgerEntryGroupBalanceFilter,
|
|
139
147
|
LedgerEntryGroupBalanceFilterSet,
|
|
@@ -392,6 +400,8 @@ __all__ = [
|
|
|
392
400
|
"GetLedger",
|
|
393
401
|
"GetLedgerAccountBalance",
|
|
394
402
|
"GetLedgerAccountBalanceLedgerAccount",
|
|
403
|
+
"GetLedgerAccountBalanceWithChildRollup",
|
|
404
|
+
"GetLedgerAccountBalanceWithChildRollupLedgerAccount",
|
|
395
405
|
"GetLedgerAccountLines",
|
|
396
406
|
"GetLedgerAccountLinesLedgerAccount",
|
|
397
407
|
"GetLedgerAccountLinesLedgerAccountLines",
|
|
@@ -418,14 +428,17 @@ __all__ = [
|
|
|
418
428
|
"Int96Filter",
|
|
419
429
|
"LedgerAccountConditionInput",
|
|
420
430
|
"LedgerAccountConsistencyConfigInput",
|
|
431
|
+
"LedgerAccountDataMigrationsFilterSet",
|
|
421
432
|
"LedgerAccountFilter",
|
|
422
433
|
"LedgerAccountGroupConsistencyConfigInput",
|
|
423
434
|
"LedgerAccountMatchInput",
|
|
424
435
|
"LedgerAccountTypeFilter",
|
|
425
436
|
"LedgerAccountTypes",
|
|
426
437
|
"LedgerAccountsFilterSet",
|
|
438
|
+
"LedgerDataMigrationStatus",
|
|
427
439
|
"LedgerEntriesFilterSet",
|
|
428
440
|
"LedgerEntryConditionInput",
|
|
441
|
+
"LedgerEntryDataMigrationsFilterSet",
|
|
429
442
|
"LedgerEntryFilter",
|
|
430
443
|
"LedgerEntryGroupBalanceFilter",
|
|
431
444
|
"LedgerEntryGroupBalanceFilterSet",
|
|
@@ -542,6 +555,7 @@ __all__ = [
|
|
|
542
555
|
"SchemaInt96ConditionInput",
|
|
543
556
|
"SchemaLedgerAccountInput",
|
|
544
557
|
"SchemaLedgerAccountMatchInput",
|
|
558
|
+
"SchemaLedgerAccountStatus",
|
|
545
559
|
"SchemaLedgerEntriesInput",
|
|
546
560
|
"SchemaLedgerEntryConditionInput",
|
|
547
561
|
"SchemaLedgerEntryGroupInput",
|
|
@@ -14,6 +14,9 @@ from .delete_schema import DeleteSchema
|
|
|
14
14
|
from .enums import ReadBalanceConsistencyMode
|
|
15
15
|
from .get_ledger import GetLedger
|
|
16
16
|
from .get_ledger_account_balance import GetLedgerAccountBalance
|
|
17
|
+
from .get_ledger_account_balance_with_child_rollup import (
|
|
18
|
+
GetLedgerAccountBalanceWithChildRollup,
|
|
19
|
+
)
|
|
17
20
|
from .get_ledger_account_lines import GetLedgerAccountLines
|
|
18
21
|
from .get_ledger_entry import GetLedgerEntry
|
|
19
22
|
from .get_schema import GetSchema
|
|
@@ -1236,6 +1239,40 @@ class Client(SyncFragmentClient):
|
|
|
1236
1239
|
data = self.get_data(response)
|
|
1237
1240
|
return GetLedgerAccountBalance.model_validate(data)
|
|
1238
1241
|
|
|
1242
|
+
def get_ledger_account_balance_with_child_rollup(
|
|
1243
|
+
self,
|
|
1244
|
+
path: str,
|
|
1245
|
+
ledger_ik: Any,
|
|
1246
|
+
balance_currency: Optional[CurrencyMatchInput] = None,
|
|
1247
|
+
balance_at: Optional[Any] = None,
|
|
1248
|
+
**kwargs: Any
|
|
1249
|
+
) -> GetLedgerAccountBalanceWithChildRollup:
|
|
1250
|
+
query = gql(
|
|
1251
|
+
"""
|
|
1252
|
+
query GetLedgerAccountBalanceWithChildRollup($path: String!, $ledgerIk: SafeString!, $balanceCurrency: CurrencyMatchInput, $balanceAt: LastMoment) {
|
|
1253
|
+
ledgerAccount(ledgerAccount: {ledger: {ik: $ledgerIk}, path: $path}) {
|
|
1254
|
+
id
|
|
1255
|
+
path
|
|
1256
|
+
balance(currency: $balanceCurrency, at: $balanceAt)
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
"""
|
|
1260
|
+
)
|
|
1261
|
+
variables: Dict[str, object] = {
|
|
1262
|
+
"path": path,
|
|
1263
|
+
"ledgerIk": ledger_ik,
|
|
1264
|
+
"balanceCurrency": balance_currency,
|
|
1265
|
+
"balanceAt": balance_at,
|
|
1266
|
+
}
|
|
1267
|
+
response = self.execute(
|
|
1268
|
+
query=query,
|
|
1269
|
+
operation_name="GetLedgerAccountBalanceWithChildRollup",
|
|
1270
|
+
variables=variables,
|
|
1271
|
+
**kwargs
|
|
1272
|
+
)
|
|
1273
|
+
data = self.get_data(response)
|
|
1274
|
+
return GetLedgerAccountBalanceWithChildRollup.model_validate(data)
|
|
1275
|
+
|
|
1239
1276
|
def get_schema(
|
|
1240
1277
|
self, key: Any, version: Optional[int] = None, **kwargs: Any
|
|
1241
1278
|
) -> GetSchema:
|
|
@@ -222,6 +222,11 @@ class LedgerAccountTypes(str, Enum):
|
|
|
222
222
|
liability = "liability"
|
|
223
223
|
|
|
224
224
|
|
|
225
|
+
class LedgerDataMigrationStatus(str, Enum):
|
|
226
|
+
active = "active"
|
|
227
|
+
inactive = "inactive"
|
|
228
|
+
|
|
229
|
+
|
|
225
230
|
class LedgerLinesConsistencyMode(str, Enum):
|
|
226
231
|
eventual = "eventual"
|
|
227
232
|
strong = "strong"
|
|
@@ -261,6 +266,12 @@ class SchemaConsistencyMode(str, Enum):
|
|
|
261
266
|
strong = "strong"
|
|
262
267
|
|
|
263
268
|
|
|
269
|
+
class SchemaLedgerAccountStatus(str, Enum):
|
|
270
|
+
active = "active"
|
|
271
|
+
archived = "archived"
|
|
272
|
+
disabled = "disabled"
|
|
273
|
+
|
|
274
|
+
|
|
264
275
|
class SchemaLedgerEntryStatus(str, Enum):
|
|
265
276
|
active = "active"
|
|
266
277
|
archived = "archived"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Generated by fragment (with the help of ariadne-codegen)
|
|
2
|
+
# Source: queries/
|
|
3
|
+
|
|
4
|
+
from typing import Any, Optional
|
|
5
|
+
|
|
6
|
+
from pydantic import Field
|
|
7
|
+
|
|
8
|
+
from .base_model import BaseModel
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GetLedgerAccountBalanceWithChildRollup(BaseModel):
|
|
12
|
+
ledger_account: Optional["GetLedgerAccountBalanceWithChildRollupLedgerAccount"] = (
|
|
13
|
+
Field(alias="ledgerAccount")
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class GetLedgerAccountBalanceWithChildRollupLedgerAccount(BaseModel):
|
|
18
|
+
id: str
|
|
19
|
+
path: str
|
|
20
|
+
balance: Any
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
GetLedgerAccountBalanceWithChildRollup.model_rebuild()
|
|
@@ -11,11 +11,13 @@ from .enums import (
|
|
|
11
11
|
CurrencyCode,
|
|
12
12
|
CurrencyMode,
|
|
13
13
|
LedgerAccountTypes,
|
|
14
|
+
LedgerDataMigrationStatus,
|
|
14
15
|
LedgerLinesConsistencyMode,
|
|
15
16
|
LedgerTypes,
|
|
16
17
|
LinkType,
|
|
17
18
|
SceneEventType,
|
|
18
19
|
SchemaConsistencyMode,
|
|
20
|
+
SchemaLedgerAccountStatus,
|
|
19
21
|
SchemaLedgerEntryStatus,
|
|
20
22
|
TxType,
|
|
21
23
|
)
|
|
@@ -184,6 +186,11 @@ class LedgerAccountConsistencyConfigInput(BaseModel):
|
|
|
184
186
|
)
|
|
185
187
|
|
|
186
188
|
|
|
189
|
+
class LedgerAccountDataMigrationsFilterSet(BaseModel):
|
|
190
|
+
account_path: Optional[Any] = Field(alias="accountPath", default=None)
|
|
191
|
+
status: Optional[LedgerDataMigrationStatus] = None
|
|
192
|
+
|
|
193
|
+
|
|
187
194
|
class LedgerAccountFilter(BaseModel):
|
|
188
195
|
equal_to: Optional["LedgerAccountMatchInput"] = Field(alias="equalTo", default=None)
|
|
189
196
|
in_: Optional[List["LedgerAccountMatchInput"]] = Field(alias="in", default=None)
|
|
@@ -245,6 +252,12 @@ class LedgerEntryConditionInput(BaseModel):
|
|
|
245
252
|
precondition: Optional["LedgerAccountConditionInput"] = None
|
|
246
253
|
|
|
247
254
|
|
|
255
|
+
class LedgerEntryDataMigrationsFilterSet(BaseModel):
|
|
256
|
+
entry_type: Optional[Any] = Field(alias="entryType", default=None)
|
|
257
|
+
status: Optional[LedgerDataMigrationStatus] = None
|
|
258
|
+
type_version: Optional[int] = Field(alias="typeVersion", default=None)
|
|
259
|
+
|
|
260
|
+
|
|
248
261
|
class LedgerEntryFilter(BaseModel):
|
|
249
262
|
equal_to: Optional["LedgerEntryMatchInput"] = Field(alias="equalTo", default=None)
|
|
250
263
|
in_: Optional[List["LedgerEntryMatchInput"]] = Field(alias="in", default=None)
|
|
@@ -319,6 +332,7 @@ class LedgerLineMatchInput(BaseModel):
|
|
|
319
332
|
|
|
320
333
|
class LedgerLinesFilterSet(BaseModel):
|
|
321
334
|
created: Optional["DateTimeFilter"] = None
|
|
335
|
+
currency: Optional["CurrencyFilter"] = None
|
|
322
336
|
date: Optional["DateFilter"] = None
|
|
323
337
|
is_reversal: Optional[bool] = Field(alias="isReversal", default=None)
|
|
324
338
|
is_reversed: Optional[bool] = Field(alias="isReversed", default=None)
|
|
@@ -421,6 +435,7 @@ class SchemaLedgerAccountInput(BaseModel):
|
|
|
421
435
|
alias="linkedAccount", default=None
|
|
422
436
|
)
|
|
423
437
|
name: Optional[Any] = None
|
|
438
|
+
status: Optional[SchemaLedgerAccountStatus] = None
|
|
424
439
|
template: Optional[bool] = None
|
|
425
440
|
type: Optional[LedgerAccountTypes] = None
|
|
426
441
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/codegen/plugins/generate_client_method.py
RENAMED
|
File without changes
|
{fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/codegen/plugins/get_file_comment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/list_ledger_account_balances.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sdk/list_ledger_entry_group_balances.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/add_ledger_entry_runtime.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/get_ledger_account_balance.py
RENAMED
|
File without changes
|
{fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/get_ledger_account_lines.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fragment_python-0.5.0 → fragment_python-0.5.1}/fragment/sync_sdk/list_ledger_account_balances.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|