fragment-python 0.1.1__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.
Files changed (45) hide show
  1. fragment/__init__.py +0 -0
  2. fragment/client/__init__.py +1 -0
  3. fragment/client/async_client.py +67 -0
  4. fragment/codegen/__init__.py +0 -0
  5. fragment/codegen/helpers.py +51 -0
  6. fragment/codegen/main.py +64 -0
  7. fragment/codegen/plugins/__init__.py +0 -0
  8. fragment/codegen/plugins/generate_client_method.py +62 -0
  9. fragment/codegen/plugins/get_file_comment.py +18 -0
  10. fragment/exceptions.py +12 -0
  11. fragment/logger.py +6 -0
  12. fragment/sdk/__init__.py +478 -0
  13. fragment/sdk/add_ledger_entry.py +54 -0
  14. fragment/sdk/add_ledger_entry_runtime.py +54 -0
  15. fragment/sdk/async_client.py +69 -0
  16. fragment/sdk/base_model.py +29 -0
  17. fragment/sdk/client.py +1071 -0
  18. fragment/sdk/create_custom_link.py +40 -0
  19. fragment/sdk/create_ledger.py +49 -0
  20. fragment/sdk/enums.py +263 -0
  21. fragment/sdk/get_ledger.py +23 -0
  22. fragment/sdk/get_ledger_account_balance.py +23 -0
  23. fragment/sdk/get_ledger_account_lines.py +47 -0
  24. fragment/sdk/get_ledger_entry.py +41 -0
  25. fragment/sdk/get_schema.py +28 -0
  26. fragment/sdk/get_workspace.py +16 -0
  27. fragment/sdk/input_types.py +482 -0
  28. fragment/sdk/list_ledger_account_balances.py +53 -0
  29. fragment/sdk/list_ledger_accounts.py +50 -0
  30. fragment/sdk/list_ledger_entries.py +58 -0
  31. fragment/sdk/list_ledger_entry_group_balances.py +57 -0
  32. fragment/sdk/list_multi_currency_ledger_account_balances.py +130 -0
  33. fragment/sdk/reconcile_tx.py +55 -0
  34. fragment/sdk/reconcile_tx_runtime.py +55 -0
  35. fragment/sdk/store_schema.py +45 -0
  36. fragment/sdk/sync_custom_accounts.py +53 -0
  37. fragment/sdk/sync_custom_txs.py +44 -0
  38. fragment/sdk/update_ledger.py +39 -0
  39. fragment/sdk/update_ledger_entry.py +77 -0
  40. fragment/std_queries/queries.graphql +656 -0
  41. fragment_python-0.1.1.dist-info/LICENSE +201 -0
  42. fragment_python-0.1.1.dist-info/METADATA +142 -0
  43. fragment_python-0.1.1.dist-info/RECORD +45 -0
  44. fragment_python-0.1.1.dist-info/WHEEL +4 -0
  45. fragment_python-0.1.1.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,482 @@
1
+ # Generated by fragment (with the help of ariadne-codegen)
2
+ # Source: schema.graphql
3
+
4
+ from typing import Any, List, Optional
5
+
6
+ from pydantic import Field
7
+
8
+ from .base_model import BaseModel
9
+ from .enums import (
10
+ BalanceUpdateConsistencyMode,
11
+ CurrencyCode,
12
+ CurrencyMode,
13
+ LedgerAccountTypes,
14
+ LedgerLinesConsistencyMode,
15
+ LedgerTypes,
16
+ SceneEventType,
17
+ SchemaConsistencyMode,
18
+ TxType,
19
+ )
20
+
21
+
22
+ class ChartOfAccountsInput(BaseModel):
23
+ accounts: List["SchemaLedgerAccountInput"]
24
+ default_consistency_config: Optional["LedgerAccountConsistencyConfigInput"] = Field(
25
+ alias="defaultConsistencyConfig", default=None
26
+ )
27
+ default_currency: Optional["CurrencyMatchInput"] = Field(
28
+ alias="defaultCurrency", default=None
29
+ )
30
+ default_currency_mode: Optional[CurrencyMode] = Field(
31
+ alias="defaultCurrencyMode", default=None
32
+ )
33
+
34
+
35
+ class CreateCustomCurrencyInput(BaseModel):
36
+ custom_code: str = Field(alias="customCode")
37
+ custom_currency_id: Any = Field(alias="customCurrencyId")
38
+ name: str
39
+ precision: int
40
+
41
+
42
+ class CreateLedgerAccountInput(BaseModel):
43
+ consistency_config: Optional["LedgerAccountConsistencyConfigInput"] = Field(
44
+ alias="consistencyConfig", default=None
45
+ )
46
+ currency: Optional["CurrencyMatchInput"] = None
47
+ currency_mode: Optional[CurrencyMode] = Field(alias="currencyMode", default=None)
48
+ linked_account: Optional["ExternalAccountMatchInput"] = Field(
49
+ alias="linkedAccount", default=None
50
+ )
51
+ name: str
52
+ parent: Optional["LedgerAccountMatchInput"] = None
53
+ type: Optional[LedgerAccountTypes] = None
54
+
55
+
56
+ class CreateLedgerAccountsInput(BaseModel):
57
+ child_ledger_accounts: Optional[List["CreateLedgerAccountsInput"]] = Field(
58
+ alias="childLedgerAccounts", default=None
59
+ )
60
+ consistency_config: Optional["LedgerAccountConsistencyConfigInput"] = Field(
61
+ alias="consistencyConfig", default=None
62
+ )
63
+ currency: Optional["CurrencyMatchInput"] = None
64
+ currency_mode: Optional[CurrencyMode] = Field(alias="currencyMode", default=None)
65
+ ik: Any
66
+ linked_account: Optional["ExternalAccountMatchInput"] = Field(
67
+ alias="linkedAccount", default=None
68
+ )
69
+ name: str
70
+ parent: Optional["LedgerAccountMatchInput"] = None
71
+ type: Optional[LedgerAccountTypes] = None
72
+
73
+
74
+ class CreateLedgerInput(BaseModel):
75
+ balance_utc_offset: Optional[Any] = Field(alias="balanceUTCOffset", default=None)
76
+ name: str
77
+ type: Optional[LedgerTypes] = None
78
+
79
+
80
+ class CurrencyFilter(BaseModel):
81
+ equal_to: Optional["CurrencyMatchInput"] = Field(alias="equalTo", default=None)
82
+ in_: Optional[List["CurrencyMatchInput"]] = Field(alias="in", default=None)
83
+
84
+
85
+ class CurrencyMatchInput(BaseModel):
86
+ code: CurrencyCode
87
+ custom_currency_id: Optional[Any] = Field(alias="customCurrencyId", default=None)
88
+
89
+
90
+ class CustomAccountInput(BaseModel):
91
+ currency: Optional["CurrencyMatchInput"] = None
92
+ currency_mode: Optional[CurrencyMode] = Field(alias="currencyMode", default=None)
93
+ external_id: Any = Field(alias="externalId")
94
+ name: str
95
+
96
+
97
+ class CustomTxInput(BaseModel):
98
+ account: "ExternalAccountMatchInput"
99
+ amount: Any
100
+ currency: Optional["CurrencyMatchInput"] = None
101
+ description: str
102
+ external_id: Any = Field(alias="externalId")
103
+ posted: Any
104
+
105
+
106
+ class DateFilter(BaseModel):
107
+ equal_to: Optional[Any] = Field(alias="equalTo", default=None)
108
+ in_: Optional[List[Any]] = Field(alias="in", default=None)
109
+
110
+
111
+ class DateTimeFilter(BaseModel):
112
+ after: Optional[Any] = None
113
+ before: Optional[Any] = None
114
+
115
+
116
+ class EntryGroupMatchInput(BaseModel):
117
+ key: Any
118
+ value: Any
119
+
120
+
121
+ class ExternalAccountFilter(BaseModel):
122
+ equal_to: Optional["ExternalAccountMatchInput"] = Field(
123
+ alias="equalTo", default=None
124
+ )
125
+ in_: Optional[List["ExternalAccountMatchInput"]] = Field(alias="in", default=None)
126
+
127
+
128
+ class ExternalAccountMatchInput(BaseModel):
129
+ external_id: Optional[str] = Field(alias="externalId", default=None)
130
+ id: Optional[str] = None
131
+ link_id: Optional[str] = Field(alias="linkId", default=None)
132
+
133
+
134
+ class GroupBalanceAccountFilter(BaseModel):
135
+ id: Optional["StringFilter"] = None
136
+ path: Optional["StringMatchFilter"] = None
137
+
138
+
139
+ class Int96ConditionInput(BaseModel):
140
+ eq: Optional[Any] = None
141
+ gte: Optional[Any] = None
142
+ lte: Optional[Any] = None
143
+
144
+
145
+ class Int96Filter(BaseModel):
146
+ eq: Optional[Any] = None
147
+ gte: Optional[Any] = None
148
+ lte: Optional[Any] = None
149
+ ne: Optional[Any] = None
150
+
151
+
152
+ class LedgerAccountConditionInput(BaseModel):
153
+ own_balance: "Int96ConditionInput" = Field(alias="ownBalance")
154
+
155
+
156
+ class LedgerAccountConsistencyConfigInput(BaseModel):
157
+ groups: Optional[List["LedgerAccountGroupConsistencyConfigInput"]] = None
158
+ lines: Optional[LedgerLinesConsistencyMode] = None
159
+ own_balance_updates: Optional[BalanceUpdateConsistencyMode] = Field(
160
+ alias="ownBalanceUpdates", default=None
161
+ )
162
+
163
+
164
+ class LedgerAccountFilter(BaseModel):
165
+ equal_to: Optional["LedgerAccountMatchInput"] = Field(alias="equalTo", default=None)
166
+ in_: Optional[List["LedgerAccountMatchInput"]] = Field(alias="in", default=None)
167
+
168
+
169
+ class LedgerAccountGroupConsistencyConfigInput(BaseModel):
170
+ key: str
171
+ own_balance_updates: BalanceUpdateConsistencyMode = Field(alias="ownBalanceUpdates")
172
+
173
+
174
+ class LedgerAccountMatchInput(BaseModel):
175
+ id: Optional[str] = None
176
+ ledger: Optional["LedgerMatchInput"] = None
177
+ path: Optional[str] = None
178
+
179
+
180
+ class LedgerAccountTypeFilter(BaseModel):
181
+ equal_to: Optional[LedgerAccountTypes] = Field(alias="equalTo", default=None)
182
+ in_: Optional[List[LedgerAccountTypes]] = Field(alias="in", default=None)
183
+
184
+
185
+ class LedgerAccountsFilterSet(BaseModel):
186
+ has_parent_ledger_account: Optional[bool] = Field(
187
+ alias="hasParentLedgerAccount", default=None
188
+ )
189
+ is_linked_account: Optional[bool] = Field(alias="isLinkedAccount", default=None)
190
+ ledger_account: Optional["LedgerAccountFilter"] = Field(
191
+ alias="ledgerAccount", default=None
192
+ )
193
+ linked_account: Optional["ExternalAccountFilter"] = Field(
194
+ alias="linkedAccount", default=None
195
+ )
196
+ parent_ledger_account: Optional["LedgerAccountFilter"] = Field(
197
+ alias="parentLedgerAccount", default=None
198
+ )
199
+ path: Optional["StringMatchFilter"] = None
200
+ type: Optional["LedgerAccountTypeFilter"] = None
201
+
202
+
203
+ class LedgerEntriesFilterSet(BaseModel):
204
+ date: Optional["DateFilter"] = None
205
+ ledger_entry: Optional["LedgerEntryFilter"] = Field(
206
+ alias="ledgerEntry", default=None
207
+ )
208
+ posted: Optional["DateTimeFilter"] = None
209
+ tag: Optional["TagFilter"] = None
210
+ type: Optional["StringFilter"] = None
211
+
212
+
213
+ class LedgerEntryConditionInput(BaseModel):
214
+ account: "LedgerAccountMatchInput"
215
+ currency: Optional["CurrencyMatchInput"] = None
216
+ postcondition: Optional["LedgerAccountConditionInput"] = None
217
+ precondition: Optional["LedgerAccountConditionInput"] = None
218
+
219
+
220
+ class LedgerEntryFilter(BaseModel):
221
+ equal_to: Optional["LedgerEntryMatchInput"] = Field(alias="equalTo", default=None)
222
+ in_: Optional[List["LedgerEntryMatchInput"]] = Field(alias="in", default=None)
223
+
224
+
225
+ class LedgerEntryGroupBalanceFilterSet(BaseModel):
226
+ account: Optional["GroupBalanceAccountFilter"] = None
227
+ currency: Optional["CurrencyFilter"] = None
228
+ own_balance: Optional["Int96Filter"] = Field(alias="ownBalance", default=None)
229
+
230
+
231
+ class LedgerEntryGroupInput(BaseModel):
232
+ key: Any
233
+ value: Any
234
+
235
+
236
+ class LedgerEntryGroupMatchInput(BaseModel):
237
+ key: Any
238
+ ledger: "LedgerMatchInput"
239
+ value: Any
240
+
241
+
242
+ class LedgerEntryGroupsFilterSet(BaseModel):
243
+ created: Optional["DateTimeFilter"] = None
244
+ key: Optional["StringFilter"] = None
245
+
246
+
247
+ class LedgerEntryInput(BaseModel):
248
+ conditions: Optional[List["LedgerEntryConditionInput"]] = None
249
+ description: Optional[str] = None
250
+ groups: Optional[List["LedgerEntryGroupInput"]] = None
251
+ ledger: Optional["LedgerMatchInput"] = None
252
+ lines: Optional[List["LedgerLineInput"]] = None
253
+ parameters: Optional[Any] = None
254
+ posted: Optional[Any] = None
255
+ tags: Optional[List["LedgerEntryTagInput"]] = None
256
+ type: Optional[str] = None
257
+
258
+
259
+ class LedgerEntryMatchInput(BaseModel):
260
+ id: Optional[str] = None
261
+ ik: Optional[Any] = None
262
+ ledger: Optional["LedgerMatchInput"] = None
263
+
264
+
265
+ class LedgerEntryTagInput(BaseModel):
266
+ key: Any
267
+ value: Any
268
+
269
+
270
+ class LedgerLineInput(BaseModel):
271
+ account: "LedgerAccountMatchInput"
272
+ amount: Optional[Any] = None
273
+ currency: Optional["CurrencyMatchInput"] = None
274
+ description: Optional[str] = None
275
+ key: Optional[str] = None
276
+ tx: Optional["TxMatchInput"] = None
277
+
278
+
279
+ class LedgerLineMatchInput(BaseModel):
280
+ id: str
281
+
282
+
283
+ class LedgerLinesFilterSet(BaseModel):
284
+ created: Optional["DateTimeFilter"] = None
285
+ date: Optional["DateFilter"] = None
286
+ key: Optional["StringFilter"] = None
287
+ posted: Optional["DateTimeFilter"] = None
288
+ type: Optional["TxTypeFilter"] = None
289
+
290
+
291
+ class LedgerMatchInput(BaseModel):
292
+ id: Optional[str] = None
293
+ ik: Optional[Any] = None
294
+
295
+
296
+ class LedgerTypeFilter(BaseModel):
297
+ equal_to: Optional[LedgerTypes] = Field(alias="equalTo", default=None)
298
+ in_: Optional[List[LedgerTypes]] = Field(alias="in", default=None)
299
+
300
+
301
+ class LedgersFilterSet(BaseModel):
302
+ has_schema: Optional[bool] = Field(alias="hasSchema", default=None)
303
+ type: Optional["LedgerTypeFilter"] = None
304
+
305
+
306
+ class LinkMatchInput(BaseModel):
307
+ id: str
308
+
309
+
310
+ class SceneEntryInput(BaseModel):
311
+ parameters: Optional[Any] = None
312
+ type: Any
313
+
314
+
315
+ class SceneEventInput(BaseModel):
316
+ entry: "SceneEntryInput"
317
+ event_type: SceneEventType = Field(alias="eventType")
318
+
319
+
320
+ class SceneInput(BaseModel):
321
+ events: List["SceneEventInput"]
322
+ name: str
323
+
324
+
325
+ class SchemaConditionInput(BaseModel):
326
+ own_balance: Optional["SchemaInt96ConditionInput"] = Field(
327
+ alias="ownBalance", default=None
328
+ )
329
+
330
+
331
+ class SchemaConsistencyConfigInput(BaseModel):
332
+ entries: Optional[SchemaConsistencyMode] = None
333
+
334
+
335
+ class SchemaCurrencyMatchInput(BaseModel):
336
+ code: Any
337
+ custom_currency_id: Optional[Any] = Field(alias="customCurrencyId", default=None)
338
+
339
+
340
+ class SchemaExternalAccountMatchInput(BaseModel):
341
+ external_id: Optional[Any] = Field(alias="externalId", default=None)
342
+ id: Optional[Any] = None
343
+ link_id: Optional[Any] = Field(alias="linkId", default=None)
344
+
345
+
346
+ class SchemaInput(BaseModel):
347
+ chart_of_accounts: "ChartOfAccountsInput" = Field(alias="chartOfAccounts")
348
+ consistency_config: Optional["SchemaConsistencyConfigInput"] = Field(
349
+ alias="consistencyConfig", default=None
350
+ )
351
+ key: Any
352
+ ledger_entries: Optional["SchemaLedgerEntriesInput"] = Field(
353
+ alias="ledgerEntries", default=None
354
+ )
355
+ name: Optional[Any] = None
356
+ scenes: Optional[List["SceneInput"]] = None
357
+
358
+
359
+ class SchemaInt96ConditionInput(BaseModel):
360
+ eq: Optional[Any] = None
361
+ gte: Optional[Any] = None
362
+ lte: Optional[Any] = None
363
+
364
+
365
+ class SchemaLedgerAccountInput(BaseModel):
366
+ children: Optional[List["SchemaLedgerAccountInput"]] = None
367
+ consistency_config: Optional["LedgerAccountConsistencyConfigInput"] = Field(
368
+ alias="consistencyConfig", default=None
369
+ )
370
+ currency: Optional["SchemaCurrencyMatchInput"] = None
371
+ currency_mode: Optional[CurrencyMode] = Field(alias="currencyMode", default=None)
372
+ key: Any
373
+ linked_account: Optional["SchemaExternalAccountMatchInput"] = Field(
374
+ alias="linkedAccount", default=None
375
+ )
376
+ name: Optional[Any] = None
377
+ template: Optional[bool] = None
378
+ type: Optional[LedgerAccountTypes] = None
379
+
380
+
381
+ class SchemaLedgerAccountMatchInput(BaseModel):
382
+ path: Any
383
+
384
+
385
+ class SchemaLedgerEntriesInput(BaseModel):
386
+ types: List["SchemaLedgerEntryInput"]
387
+
388
+
389
+ class SchemaLedgerEntryConditionInput(BaseModel):
390
+ account: "SchemaLedgerAccountMatchInput"
391
+ currency: Optional["SchemaCurrencyMatchInput"] = None
392
+ postcondition: Optional["SchemaConditionInput"] = None
393
+ precondition: Optional["SchemaConditionInput"] = None
394
+
395
+
396
+ class SchemaLedgerEntryGroupInput(BaseModel):
397
+ key: Any
398
+ value: Any
399
+
400
+
401
+ class SchemaLedgerEntryInput(BaseModel):
402
+ conditions: Optional[List["SchemaLedgerEntryConditionInput"]] = None
403
+ description: Optional[Any] = None
404
+ groups: Optional[List["SchemaLedgerEntryGroupInput"]] = None
405
+ lines: Optional[List["SchemaLedgerLineInput"]] = None
406
+ parameters: Optional[Any] = None
407
+ tags: Optional[List["SchemaLedgerEntryTagInput"]] = None
408
+ type: Any
409
+
410
+
411
+ class SchemaLedgerEntryTagInput(BaseModel):
412
+ key: Any
413
+ value: Any
414
+
415
+
416
+ class SchemaLedgerLineInput(BaseModel):
417
+ account: "SchemaLedgerAccountMatchInput"
418
+ amount: Optional[Any] = None
419
+ currency: Optional["SchemaCurrencyMatchInput"] = None
420
+ description: Optional[Any] = None
421
+ key: Any
422
+ tx: Optional["SchemaTxMatchInput"] = None
423
+
424
+
425
+ class SchemaMatchInput(BaseModel):
426
+ key: Any
427
+ version: Optional[int] = None
428
+
429
+
430
+ class SchemaTxMatchInput(BaseModel):
431
+ external_id: Optional[Any] = Field(alias="externalId", default=None)
432
+ id: Optional[Any] = None
433
+
434
+
435
+ class StringFilter(BaseModel):
436
+ equal_to: Optional[str] = Field(alias="equalTo", default=None)
437
+ in_: Optional[List[str]] = Field(alias="in", default=None)
438
+
439
+
440
+ class StringMatchFilter(BaseModel):
441
+ equal_to: Optional[str] = Field(alias="equalTo", default=None)
442
+ in_: Optional[List[str]] = Field(alias="in", default=None)
443
+ matches: Optional[str] = None
444
+
445
+
446
+ class TagFilter(BaseModel):
447
+ equal_to: Optional["TagMatchInput"] = Field(alias="equalTo", default=None)
448
+ in_: Optional[List["TagMatchInput"]] = Field(alias="in", default=None)
449
+
450
+
451
+ class TagMatchInput(BaseModel):
452
+ key: Any
453
+ value: Any
454
+
455
+
456
+ class TxMatchInput(BaseModel):
457
+ account_id: Optional[str] = Field(alias="accountId", default=None)
458
+ external_account_id: Optional[str] = Field(alias="externalAccountId", default=None)
459
+ external_id: Optional[str] = Field(alias="externalId", default=None)
460
+ id: Optional[str] = None
461
+ link_id: Optional[str] = Field(alias="linkId", default=None)
462
+
463
+
464
+ class TxTypeFilter(BaseModel):
465
+ equal_to: Optional[TxType] = Field(alias="equalTo", default=None)
466
+ in_: Optional[List[TxType]] = Field(alias="in", default=None)
467
+
468
+
469
+ class UpdateLedgerAccountInput(BaseModel):
470
+ consistency_config: Optional["LedgerAccountConsistencyConfigInput"] = Field(
471
+ alias="consistencyConfig", default=None
472
+ )
473
+ name: Optional[str] = None
474
+
475
+
476
+ class UpdateLedgerEntryInput(BaseModel):
477
+ groups: Optional[List["LedgerEntryGroupInput"]] = None
478
+ tags: Optional[List["LedgerEntryTagInput"]] = None
479
+
480
+
481
+ class UpdateLedgerInput(BaseModel):
482
+ name: Optional[str] = None
@@ -0,0 +1,53 @@
1
+ # Generated by fragment (with the help of ariadne-codegen)
2
+ # Source: queries/
3
+
4
+ from typing import Any, List, Optional
5
+
6
+ from pydantic import Field
7
+
8
+ from .base_model import BaseModel
9
+ from .enums import LedgerAccountTypes
10
+
11
+
12
+ class ListLedgerAccountBalances(BaseModel):
13
+ ledger: Optional["ListLedgerAccountBalancesLedger"]
14
+
15
+
16
+ class ListLedgerAccountBalancesLedger(BaseModel):
17
+ id: str
18
+ ik: Any
19
+ name: str
20
+ created: Any
21
+ ledger_accounts: "ListLedgerAccountBalancesLedgerLedgerAccounts" = Field(
22
+ alias="ledgerAccounts"
23
+ )
24
+
25
+
26
+ class ListLedgerAccountBalancesLedgerLedgerAccounts(BaseModel):
27
+ nodes: List["ListLedgerAccountBalancesLedgerLedgerAccountsNodes"]
28
+ page_info: "ListLedgerAccountBalancesLedgerLedgerAccountsPageInfo" = Field(
29
+ alias="pageInfo"
30
+ )
31
+
32
+
33
+ class ListLedgerAccountBalancesLedgerLedgerAccountsNodes(BaseModel):
34
+ id: str
35
+ path: str
36
+ name: Optional[str]
37
+ type: LedgerAccountTypes
38
+ created: Any
39
+ own_balance: Any = Field(alias="ownBalance")
40
+ child_balance: Any = Field(alias="childBalance")
41
+ balance: Any
42
+
43
+
44
+ class ListLedgerAccountBalancesLedgerLedgerAccountsPageInfo(BaseModel):
45
+ has_next_page: bool = Field(alias="hasNextPage")
46
+ end_cursor: Optional[str] = Field(alias="endCursor")
47
+ has_previous_page: bool = Field(alias="hasPreviousPage")
48
+ start_cursor: Optional[str] = Field(alias="startCursor")
49
+
50
+
51
+ ListLedgerAccountBalances.model_rebuild()
52
+ ListLedgerAccountBalancesLedger.model_rebuild()
53
+ ListLedgerAccountBalancesLedgerLedgerAccounts.model_rebuild()
@@ -0,0 +1,50 @@
1
+ # Generated by fragment (with the help of ariadne-codegen)
2
+ # Source: queries/
3
+
4
+ from typing import Any, List, Optional
5
+
6
+ from pydantic import Field
7
+
8
+ from .base_model import BaseModel
9
+ from .enums import LedgerAccountTypes
10
+
11
+
12
+ class ListLedgerAccounts(BaseModel):
13
+ ledger: Optional["ListLedgerAccountsLedger"]
14
+
15
+
16
+ class ListLedgerAccountsLedger(BaseModel):
17
+ id: str
18
+ ik: Any
19
+ name: str
20
+ created: Any
21
+ ledger_accounts: "ListLedgerAccountsLedgerLedgerAccounts" = Field(
22
+ alias="ledgerAccounts"
23
+ )
24
+
25
+
26
+ class ListLedgerAccountsLedgerLedgerAccounts(BaseModel):
27
+ nodes: List["ListLedgerAccountsLedgerLedgerAccountsNodes"]
28
+ page_info: "ListLedgerAccountsLedgerLedgerAccountsPageInfo" = Field(
29
+ alias="pageInfo"
30
+ )
31
+
32
+
33
+ class ListLedgerAccountsLedgerLedgerAccountsNodes(BaseModel):
34
+ id: str
35
+ path: str
36
+ name: Optional[str]
37
+ type: LedgerAccountTypes
38
+ created: Any
39
+
40
+
41
+ class ListLedgerAccountsLedgerLedgerAccountsPageInfo(BaseModel):
42
+ has_next_page: bool = Field(alias="hasNextPage")
43
+ end_cursor: Optional[str] = Field(alias="endCursor")
44
+ has_previous_page: bool = Field(alias="hasPreviousPage")
45
+ start_cursor: Optional[str] = Field(alias="startCursor")
46
+
47
+
48
+ ListLedgerAccounts.model_rebuild()
49
+ ListLedgerAccountsLedger.model_rebuild()
50
+ ListLedgerAccountsLedgerLedgerAccounts.model_rebuild()
@@ -0,0 +1,58 @@
1
+ # Generated by fragment (with the help of ariadne-codegen)
2
+ # Source: queries/
3
+
4
+ from typing import Any, List, Optional
5
+
6
+ from pydantic import Field
7
+
8
+ from .base_model import BaseModel
9
+
10
+
11
+ class ListLedgerEntries(BaseModel):
12
+ ledger: Optional["ListLedgerEntriesLedger"]
13
+
14
+
15
+ class ListLedgerEntriesLedger(BaseModel):
16
+ ledger_entries: "ListLedgerEntriesLedgerLedgerEntries" = Field(
17
+ alias="ledgerEntries"
18
+ )
19
+
20
+
21
+ class ListLedgerEntriesLedgerLedgerEntries(BaseModel):
22
+ nodes: List["ListLedgerEntriesLedgerLedgerEntriesNodes"]
23
+ page_info: "ListLedgerEntriesLedgerLedgerEntriesPageInfo" = Field(alias="pageInfo")
24
+
25
+
26
+ class ListLedgerEntriesLedgerLedgerEntriesNodes(BaseModel):
27
+ ik: str
28
+ type: Optional[Any]
29
+ posted: Any
30
+ lines: "ListLedgerEntriesLedgerLedgerEntriesNodesLines"
31
+
32
+
33
+ class ListLedgerEntriesLedgerLedgerEntriesNodesLines(BaseModel):
34
+ nodes: List["ListLedgerEntriesLedgerLedgerEntriesNodesLinesNodes"]
35
+
36
+
37
+ class ListLedgerEntriesLedgerLedgerEntriesNodesLinesNodes(BaseModel):
38
+ amount: Any
39
+ account: "ListLedgerEntriesLedgerLedgerEntriesNodesLinesNodesAccount"
40
+
41
+
42
+ class ListLedgerEntriesLedgerLedgerEntriesNodesLinesNodesAccount(BaseModel):
43
+ path: str
44
+
45
+
46
+ class ListLedgerEntriesLedgerLedgerEntriesPageInfo(BaseModel):
47
+ has_next_page: bool = Field(alias="hasNextPage")
48
+ end_cursor: Optional[str] = Field(alias="endCursor")
49
+ has_previous_page: bool = Field(alias="hasPreviousPage")
50
+ start_cursor: Optional[str] = Field(alias="startCursor")
51
+
52
+
53
+ ListLedgerEntries.model_rebuild()
54
+ ListLedgerEntriesLedger.model_rebuild()
55
+ ListLedgerEntriesLedgerLedgerEntries.model_rebuild()
56
+ ListLedgerEntriesLedgerLedgerEntriesNodes.model_rebuild()
57
+ ListLedgerEntriesLedgerLedgerEntriesNodesLines.model_rebuild()
58
+ ListLedgerEntriesLedgerLedgerEntriesNodesLinesNodes.model_rebuild()
@@ -0,0 +1,57 @@
1
+ # Generated by fragment (with the help of ariadne-codegen)
2
+ # Source: queries/
3
+
4
+ from typing import Any, List, Optional
5
+
6
+ from pydantic import Field
7
+
8
+ from .base_model import BaseModel
9
+ from .enums import CurrencyCode
10
+
11
+
12
+ class ListLedgerEntryGroupBalances(BaseModel):
13
+ ledger_entry_group: Optional["ListLedgerEntryGroupBalancesLedgerEntryGroup"] = (
14
+ Field(alias="ledgerEntryGroup")
15
+ )
16
+
17
+
18
+ class ListLedgerEntryGroupBalancesLedgerEntryGroup(BaseModel):
19
+ key: Any
20
+ value: Any
21
+ created: Optional[Any]
22
+ balances: "ListLedgerEntryGroupBalancesLedgerEntryGroupBalances"
23
+
24
+
25
+ class ListLedgerEntryGroupBalancesLedgerEntryGroupBalances(BaseModel):
26
+ nodes: List["ListLedgerEntryGroupBalancesLedgerEntryGroupBalancesNodes"]
27
+ page_info: "ListLedgerEntryGroupBalancesLedgerEntryGroupBalancesPageInfo" = Field(
28
+ alias="pageInfo"
29
+ )
30
+
31
+
32
+ class ListLedgerEntryGroupBalancesLedgerEntryGroupBalancesNodes(BaseModel):
33
+ account: "ListLedgerEntryGroupBalancesLedgerEntryGroupBalancesNodesAccount"
34
+ currency: "ListLedgerEntryGroupBalancesLedgerEntryGroupBalancesNodesCurrency"
35
+ own_balance: Any = Field(alias="ownBalance")
36
+
37
+
38
+ class ListLedgerEntryGroupBalancesLedgerEntryGroupBalancesNodesAccount(BaseModel):
39
+ path: str
40
+
41
+
42
+ class ListLedgerEntryGroupBalancesLedgerEntryGroupBalancesNodesCurrency(BaseModel):
43
+ code: CurrencyCode
44
+ custom_currency_id: Optional[Any] = Field(alias="customCurrencyId")
45
+
46
+
47
+ class ListLedgerEntryGroupBalancesLedgerEntryGroupBalancesPageInfo(BaseModel):
48
+ has_next_page: bool = Field(alias="hasNextPage")
49
+ end_cursor: Optional[str] = Field(alias="endCursor")
50
+ has_previous_page: bool = Field(alias="hasPreviousPage")
51
+ start_cursor: Optional[str] = Field(alias="startCursor")
52
+
53
+
54
+ ListLedgerEntryGroupBalances.model_rebuild()
55
+ ListLedgerEntryGroupBalancesLedgerEntryGroup.model_rebuild()
56
+ ListLedgerEntryGroupBalancesLedgerEntryGroupBalances.model_rebuild()
57
+ ListLedgerEntryGroupBalancesLedgerEntryGroupBalancesNodes.model_rebuild()