convexity-api-client 0.21.0.dev330__py3-none-any.whl → 0.21.0.dev332__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.
- convexity_api_client/api/v1/erp_config_delete_user_table_preference.py +180 -0
- convexity_api_client/api/v1/erp_config_list_user_table_preferences.py +166 -0
- convexity_api_client/api/v1/erp_config_update_user_table_preference.py +202 -0
- convexity_api_client/api/v1/inventory_list_templates.py +18 -61
- convexity_api_client/api/v1/purchasing_list_pos.py +18 -61
- convexity_api_client/api/v1/purchasing_list_vendors.py +18 -61
- convexity_api_client/api/v1/sales_list_invoices.py +18 -61
- convexity_api_client/api/v1/sales_list_orders.py +18 -61
- convexity_api_client/models/__init__.py +24 -12
- convexity_api_client/models/erp_configured_column_config.py +31 -0
- convexity_api_client/models/erp_configured_column_config_data_type_type_0.py +12 -0
- convexity_api_client/models/erp_project_config.py +18 -0
- convexity_api_client/models/erp_project_config_tablecolumns.py +68 -0
- convexity_api_client/models/erp_user_table_preference.py +201 -0
- convexity_api_client/models/erp_user_table_preference_response.py +102 -0
- convexity_api_client/models/erp_user_table_preference_response_columnlabels.py +47 -0
- convexity_api_client/models/erp_user_table_preference_response_columnwidths.py +47 -0
- convexity_api_client/models/import_task_payload.py +108 -0
- convexity_api_client/models/import_task_payload_type.py +9 -0
- convexity_api_client/models/list_erp_user_table_preferences_response.py +75 -0
- convexity_api_client/models/list_inventory_items_request.py +11 -62
- convexity_api_client/models/profile.py +43 -0
- convexity_api_client/models/project.py +43 -0
- convexity_api_client/models/search_purchase_orders_request.py +11 -51
- convexity_api_client/models/update_erp_user_table_preference_request.py +92 -0
- convexity_api_client/models/update_erp_user_table_preference_request_columnlabels.py +47 -0
- convexity_api_client/models/update_erp_user_table_preference_request_columnwidths.py +47 -0
- convexity_api_client/models/worker_task_response.py +18 -2
- {convexity_api_client-0.21.0.dev330.dist-info → convexity_api_client-0.21.0.dev332.dist-info}/METADATA +1 -1
- {convexity_api_client-0.21.0.dev330.dist-info → convexity_api_client-0.21.0.dev332.dist-info}/RECORD +31 -22
- {convexity_api_client-0.21.0.dev330.dist-info → convexity_api_client-0.21.0.dev332.dist-info}/WHEEL +1 -1
- convexity_api_client/models/inventory_list_templates_filter_operator_type_0.py +0 -19
- convexity_api_client/models/list_inventory_items_request_filter_operator_type_0.py +0 -19
- convexity_api_client/models/purchasing_list_pos_filter_operator_type_0.py +0 -19
- convexity_api_client/models/purchasing_list_vendors_filter_operator_type_0.py +0 -19
- convexity_api_client/models/sales_list_invoices_filter_operator_type_0.py +0 -19
- convexity_api_client/models/sales_list_orders_filter_operator_type_0.py +0 -19
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.erp_user_table_preference_response import ERPUserTablePreferenceResponse
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="ListERPUserTablePreferencesResponse")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class ListERPUserTablePreferencesResponse:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
preferences (list[ERPUserTablePreferenceResponse]):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
preferences: list[ERPUserTablePreferenceResponse]
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
preferences = []
|
|
28
|
+
for preferences_item_data in self.preferences:
|
|
29
|
+
preferences_item = preferences_item_data.to_dict()
|
|
30
|
+
preferences.append(preferences_item)
|
|
31
|
+
|
|
32
|
+
field_dict: dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
field_dict.update(
|
|
35
|
+
{
|
|
36
|
+
"preferences": preferences,
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
return field_dict
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
44
|
+
from ..models.erp_user_table_preference_response import ERPUserTablePreferenceResponse
|
|
45
|
+
|
|
46
|
+
d = dict(src_dict)
|
|
47
|
+
preferences = []
|
|
48
|
+
_preferences = d.pop("preferences")
|
|
49
|
+
for preferences_item_data in _preferences:
|
|
50
|
+
preferences_item = ERPUserTablePreferenceResponse.from_dict(preferences_item_data)
|
|
51
|
+
|
|
52
|
+
preferences.append(preferences_item)
|
|
53
|
+
|
|
54
|
+
list_erp_user_table_preferences_response = cls(
|
|
55
|
+
preferences=preferences,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
list_erp_user_table_preferences_response.additional_properties = d
|
|
59
|
+
return list_erp_user_table_preferences_response
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def additional_keys(self) -> list[str]:
|
|
63
|
+
return list(self.additional_properties.keys())
|
|
64
|
+
|
|
65
|
+
def __getitem__(self, key: str) -> Any:
|
|
66
|
+
return self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
69
|
+
self.additional_properties[key] = value
|
|
70
|
+
|
|
71
|
+
def __delitem__(self, key: str) -> None:
|
|
72
|
+
del self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __contains__(self, key: str) -> bool:
|
|
75
|
+
return key in self.additional_properties
|
|
@@ -6,7 +6,6 @@ from typing import Any, TypeVar, cast
|
|
|
6
6
|
from attrs import define as _attrs_define
|
|
7
7
|
from attrs import field as _attrs_field
|
|
8
8
|
|
|
9
|
-
from ..models.list_inventory_items_request_filter_operator_type_0 import ListInventoryItemsRequestFilterOperatorType0
|
|
10
9
|
from ..models.list_inventory_items_request_sort_direction_type_0 import ListInventoryItemsRequestSortDirectionType0
|
|
11
10
|
from ..types import UNSET, Unset
|
|
12
11
|
|
|
@@ -29,9 +28,7 @@ class ListInventoryItemsRequest:
|
|
|
29
28
|
is_active (bool | None | Unset):
|
|
30
29
|
sort_by (None | str | Unset):
|
|
31
30
|
sort_direction (ListInventoryItemsRequestSortDirectionType0 | None | Unset):
|
|
32
|
-
|
|
33
|
-
filter_operator (ListInventoryItemsRequestFilterOperatorType0 | None | Unset):
|
|
34
|
-
filter_value (None | str | Unset):
|
|
31
|
+
filters (None | str | Unset):
|
|
35
32
|
limit (int | Unset): Default: 50.
|
|
36
33
|
offset (int | Unset): Default: 0.
|
|
37
34
|
"""
|
|
@@ -43,9 +40,7 @@ class ListInventoryItemsRequest:
|
|
|
43
40
|
is_active: bool | None | Unset = UNSET
|
|
44
41
|
sort_by: None | str | Unset = UNSET
|
|
45
42
|
sort_direction: ListInventoryItemsRequestSortDirectionType0 | None | Unset = UNSET
|
|
46
|
-
|
|
47
|
-
filter_operator: ListInventoryItemsRequestFilterOperatorType0 | None | Unset = UNSET
|
|
48
|
-
filter_value: None | str | Unset = UNSET
|
|
43
|
+
filters: None | str | Unset = UNSET
|
|
49
44
|
limit: int | Unset = 50
|
|
50
45
|
offset: int | Unset = 0
|
|
51
46
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
@@ -101,25 +96,11 @@ class ListInventoryItemsRequest:
|
|
|
101
96
|
else:
|
|
102
97
|
sort_direction = self.sort_direction
|
|
103
98
|
|
|
104
|
-
|
|
105
|
-
if isinstance(self.
|
|
106
|
-
|
|
99
|
+
filters: None | str | Unset
|
|
100
|
+
if isinstance(self.filters, Unset):
|
|
101
|
+
filters = UNSET
|
|
107
102
|
else:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
filter_operator: None | str | Unset
|
|
111
|
-
if isinstance(self.filter_operator, Unset):
|
|
112
|
-
filter_operator = UNSET
|
|
113
|
-
elif isinstance(self.filter_operator, ListInventoryItemsRequestFilterOperatorType0):
|
|
114
|
-
filter_operator = self.filter_operator.value
|
|
115
|
-
else:
|
|
116
|
-
filter_operator = self.filter_operator
|
|
117
|
-
|
|
118
|
-
filter_value: None | str | Unset
|
|
119
|
-
if isinstance(self.filter_value, Unset):
|
|
120
|
-
filter_value = UNSET
|
|
121
|
-
else:
|
|
122
|
-
filter_value = self.filter_value
|
|
103
|
+
filters = self.filters
|
|
123
104
|
|
|
124
105
|
limit = self.limit
|
|
125
106
|
|
|
@@ -142,12 +123,8 @@ class ListInventoryItemsRequest:
|
|
|
142
123
|
field_dict["sort_by"] = sort_by
|
|
143
124
|
if sort_direction is not UNSET:
|
|
144
125
|
field_dict["sort_direction"] = sort_direction
|
|
145
|
-
if
|
|
146
|
-
field_dict["
|
|
147
|
-
if filter_operator is not UNSET:
|
|
148
|
-
field_dict["filter_operator"] = filter_operator
|
|
149
|
-
if filter_value is not UNSET:
|
|
150
|
-
field_dict["filter_value"] = filter_value
|
|
126
|
+
if filters is not UNSET:
|
|
127
|
+
field_dict["filters"] = filters
|
|
151
128
|
if limit is not UNSET:
|
|
152
129
|
field_dict["limit"] = limit
|
|
153
130
|
if offset is not UNSET:
|
|
@@ -246,40 +223,14 @@ class ListInventoryItemsRequest:
|
|
|
246
223
|
|
|
247
224
|
sort_direction = _parse_sort_direction(d.pop("sort_direction", UNSET))
|
|
248
225
|
|
|
249
|
-
def
|
|
250
|
-
if data is None:
|
|
251
|
-
return data
|
|
252
|
-
if isinstance(data, Unset):
|
|
253
|
-
return data
|
|
254
|
-
return cast(None | str | Unset, data)
|
|
255
|
-
|
|
256
|
-
filter_column = _parse_filter_column(d.pop("filter_column", UNSET))
|
|
257
|
-
|
|
258
|
-
def _parse_filter_operator(data: object) -> ListInventoryItemsRequestFilterOperatorType0 | None | Unset:
|
|
259
|
-
if data is None:
|
|
260
|
-
return data
|
|
261
|
-
if isinstance(data, Unset):
|
|
262
|
-
return data
|
|
263
|
-
try:
|
|
264
|
-
if not isinstance(data, str):
|
|
265
|
-
raise TypeError()
|
|
266
|
-
filter_operator_type_0 = ListInventoryItemsRequestFilterOperatorType0(data)
|
|
267
|
-
|
|
268
|
-
return filter_operator_type_0
|
|
269
|
-
except (TypeError, ValueError, AttributeError, KeyError):
|
|
270
|
-
pass
|
|
271
|
-
return cast(ListInventoryItemsRequestFilterOperatorType0 | None | Unset, data)
|
|
272
|
-
|
|
273
|
-
filter_operator = _parse_filter_operator(d.pop("filter_operator", UNSET))
|
|
274
|
-
|
|
275
|
-
def _parse_filter_value(data: object) -> None | str | Unset:
|
|
226
|
+
def _parse_filters(data: object) -> None | str | Unset:
|
|
276
227
|
if data is None:
|
|
277
228
|
return data
|
|
278
229
|
if isinstance(data, Unset):
|
|
279
230
|
return data
|
|
280
231
|
return cast(None | str | Unset, data)
|
|
281
232
|
|
|
282
|
-
|
|
233
|
+
filters = _parse_filters(d.pop("filters", UNSET))
|
|
283
234
|
|
|
284
235
|
limit = d.pop("limit", UNSET)
|
|
285
236
|
|
|
@@ -293,9 +244,7 @@ class ListInventoryItemsRequest:
|
|
|
293
244
|
is_active=is_active,
|
|
294
245
|
sort_by=sort_by,
|
|
295
246
|
sort_direction=sort_direction,
|
|
296
|
-
|
|
297
|
-
filter_operator=filter_operator,
|
|
298
|
-
filter_value=filter_value,
|
|
247
|
+
filters=filters,
|
|
299
248
|
limit=limit,
|
|
300
249
|
offset=offset,
|
|
301
250
|
)
|
|
@@ -11,6 +11,7 @@ from ..types import UNSET, Unset
|
|
|
11
11
|
|
|
12
12
|
if TYPE_CHECKING:
|
|
13
13
|
from ..models.api_key import ApiKey
|
|
14
|
+
from ..models.erp_user_table_preference import ERPUserTablePreference
|
|
14
15
|
from ..models.organization_invitation import OrganizationInvitation
|
|
15
16
|
from ..models.organization_invitation_redemption import OrganizationInvitationRedemption
|
|
16
17
|
from ..models.organization_member import OrganizationMember
|
|
@@ -50,6 +51,7 @@ class Profile:
|
|
|
50
51
|
created_api_keys (list[ApiKey] | None | Unset):
|
|
51
52
|
revoked_api_keys (list[ApiKey] | None | Unset):
|
|
52
53
|
role_assignments (list[RoleAssignment] | None | Unset):
|
|
54
|
+
erp_table_preferences (list[ERPUserTablePreference] | None | Unset):
|
|
53
55
|
created_organization_invitations (list[OrganizationInvitation] | None | Unset):
|
|
54
56
|
redeemed_organization_invitations (list[OrganizationInvitationRedemption] | None | Unset):
|
|
55
57
|
"""
|
|
@@ -74,6 +76,7 @@ class Profile:
|
|
|
74
76
|
created_api_keys: list[ApiKey] | None | Unset = UNSET
|
|
75
77
|
revoked_api_keys: list[ApiKey] | None | Unset = UNSET
|
|
76
78
|
role_assignments: list[RoleAssignment] | None | Unset = UNSET
|
|
79
|
+
erp_table_preferences: list[ERPUserTablePreference] | None | Unset = UNSET
|
|
77
80
|
created_organization_invitations: list[OrganizationInvitation] | None | Unset = UNSET
|
|
78
81
|
redeemed_organization_invitations: list[OrganizationInvitationRedemption] | None | Unset = UNSET
|
|
79
82
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
@@ -238,6 +241,18 @@ class Profile:
|
|
|
238
241
|
else:
|
|
239
242
|
role_assignments = self.role_assignments
|
|
240
243
|
|
|
244
|
+
erp_table_preferences: list[dict[str, Any]] | None | Unset
|
|
245
|
+
if isinstance(self.erp_table_preferences, Unset):
|
|
246
|
+
erp_table_preferences = UNSET
|
|
247
|
+
elif isinstance(self.erp_table_preferences, list):
|
|
248
|
+
erp_table_preferences = []
|
|
249
|
+
for erp_table_preferences_type_0_item_data in self.erp_table_preferences:
|
|
250
|
+
erp_table_preferences_type_0_item = erp_table_preferences_type_0_item_data.to_dict()
|
|
251
|
+
erp_table_preferences.append(erp_table_preferences_type_0_item)
|
|
252
|
+
|
|
253
|
+
else:
|
|
254
|
+
erp_table_preferences = self.erp_table_preferences
|
|
255
|
+
|
|
241
256
|
created_organization_invitations: list[dict[str, Any]] | None | Unset
|
|
242
257
|
if isinstance(self.created_organization_invitations, Unset):
|
|
243
258
|
created_organization_invitations = UNSET
|
|
@@ -308,6 +323,8 @@ class Profile:
|
|
|
308
323
|
field_dict["revoked_api_keys"] = revoked_api_keys
|
|
309
324
|
if role_assignments is not UNSET:
|
|
310
325
|
field_dict["role_assignments"] = role_assignments
|
|
326
|
+
if erp_table_preferences is not UNSET:
|
|
327
|
+
field_dict["erp_table_preferences"] = erp_table_preferences
|
|
311
328
|
if created_organization_invitations is not UNSET:
|
|
312
329
|
field_dict["created_organization_invitations"] = created_organization_invitations
|
|
313
330
|
if redeemed_organization_invitations is not UNSET:
|
|
@@ -318,6 +335,7 @@ class Profile:
|
|
|
318
335
|
@classmethod
|
|
319
336
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
320
337
|
from ..models.api_key import ApiKey
|
|
338
|
+
from ..models.erp_user_table_preference import ERPUserTablePreference
|
|
321
339
|
from ..models.organization_invitation import OrganizationInvitation
|
|
322
340
|
from ..models.organization_invitation_redemption import OrganizationInvitationRedemption
|
|
323
341
|
from ..models.organization_member import OrganizationMember
|
|
@@ -603,6 +621,30 @@ class Profile:
|
|
|
603
621
|
|
|
604
622
|
role_assignments = _parse_role_assignments(d.pop("role_assignments", UNSET))
|
|
605
623
|
|
|
624
|
+
def _parse_erp_table_preferences(data: object) -> list[ERPUserTablePreference] | None | Unset:
|
|
625
|
+
if data is None:
|
|
626
|
+
return data
|
|
627
|
+
if isinstance(data, Unset):
|
|
628
|
+
return data
|
|
629
|
+
try:
|
|
630
|
+
if not isinstance(data, list):
|
|
631
|
+
raise TypeError()
|
|
632
|
+
erp_table_preferences_type_0 = []
|
|
633
|
+
_erp_table_preferences_type_0 = data
|
|
634
|
+
for erp_table_preferences_type_0_item_data in _erp_table_preferences_type_0:
|
|
635
|
+
erp_table_preferences_type_0_item = ERPUserTablePreference.from_dict(
|
|
636
|
+
erp_table_preferences_type_0_item_data
|
|
637
|
+
)
|
|
638
|
+
|
|
639
|
+
erp_table_preferences_type_0.append(erp_table_preferences_type_0_item)
|
|
640
|
+
|
|
641
|
+
return erp_table_preferences_type_0
|
|
642
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
643
|
+
pass
|
|
644
|
+
return cast(list[ERPUserTablePreference] | None | Unset, data)
|
|
645
|
+
|
|
646
|
+
erp_table_preferences = _parse_erp_table_preferences(d.pop("erp_table_preferences", UNSET))
|
|
647
|
+
|
|
606
648
|
def _parse_created_organization_invitations(data: object) -> list[OrganizationInvitation] | None | Unset:
|
|
607
649
|
if data is None:
|
|
608
650
|
return data
|
|
@@ -678,6 +720,7 @@ class Profile:
|
|
|
678
720
|
created_api_keys=created_api_keys,
|
|
679
721
|
revoked_api_keys=revoked_api_keys,
|
|
680
722
|
role_assignments=role_assignments,
|
|
723
|
+
erp_table_preferences=erp_table_preferences,
|
|
681
724
|
created_organization_invitations=created_organization_invitations,
|
|
682
725
|
redeemed_organization_invitations=redeemed_organization_invitations,
|
|
683
726
|
)
|
|
@@ -34,6 +34,7 @@ if TYPE_CHECKING:
|
|
|
34
34
|
from ..models.erp_module_gate import ERPModuleGate
|
|
35
35
|
from ..models.erp_project_settings import ERPProjectSettings
|
|
36
36
|
from ..models.erp_status_mapping import ERPStatusMapping
|
|
37
|
+
from ..models.erp_user_table_preference import ERPUserTablePreference
|
|
37
38
|
from ..models.goods_receipt import GoodsReceipt
|
|
38
39
|
from ..models.goods_receipt_line import GoodsReceiptLine
|
|
39
40
|
from ..models.import_job import ImportJob
|
|
@@ -150,6 +151,7 @@ class Project:
|
|
|
150
151
|
stock_balances (list[StockBalance] | None | Unset):
|
|
151
152
|
stock_transactions (list[StockTransaction] | None | Unset):
|
|
152
153
|
erp_project_settings (ERPProjectSettings | None | Unset):
|
|
154
|
+
erp_user_table_preferences (list[ERPUserTablePreference] | None | Unset):
|
|
153
155
|
erp_module_gates (list[ERPModuleGate] | None | Unset):
|
|
154
156
|
erp_status_mappings (list[ERPStatusMapping] | None | Unset):
|
|
155
157
|
sales_invoices (list[SalesInvoice] | None | Unset):
|
|
@@ -248,6 +250,7 @@ class Project:
|
|
|
248
250
|
stock_balances: list[StockBalance] | None | Unset = UNSET
|
|
249
251
|
stock_transactions: list[StockTransaction] | None | Unset = UNSET
|
|
250
252
|
erp_project_settings: ERPProjectSettings | None | Unset = UNSET
|
|
253
|
+
erp_user_table_preferences: list[ERPUserTablePreference] | None | Unset = UNSET
|
|
251
254
|
erp_module_gates: list[ERPModuleGate] | None | Unset = UNSET
|
|
252
255
|
erp_status_mappings: list[ERPStatusMapping] | None | Unset = UNSET
|
|
253
256
|
sales_invoices: list[SalesInvoice] | None | Unset = UNSET
|
|
@@ -744,6 +747,18 @@ class Project:
|
|
|
744
747
|
else:
|
|
745
748
|
erp_project_settings = self.erp_project_settings
|
|
746
749
|
|
|
750
|
+
erp_user_table_preferences: list[dict[str, Any]] | None | Unset
|
|
751
|
+
if isinstance(self.erp_user_table_preferences, Unset):
|
|
752
|
+
erp_user_table_preferences = UNSET
|
|
753
|
+
elif isinstance(self.erp_user_table_preferences, list):
|
|
754
|
+
erp_user_table_preferences = []
|
|
755
|
+
for erp_user_table_preferences_type_0_item_data in self.erp_user_table_preferences:
|
|
756
|
+
erp_user_table_preferences_type_0_item = erp_user_table_preferences_type_0_item_data.to_dict()
|
|
757
|
+
erp_user_table_preferences.append(erp_user_table_preferences_type_0_item)
|
|
758
|
+
|
|
759
|
+
else:
|
|
760
|
+
erp_user_table_preferences = self.erp_user_table_preferences
|
|
761
|
+
|
|
747
762
|
erp_module_gates: list[dict[str, Any]] | None | Unset
|
|
748
763
|
if isinstance(self.erp_module_gates, Unset):
|
|
749
764
|
erp_module_gates = UNSET
|
|
@@ -1452,6 +1467,8 @@ class Project:
|
|
|
1452
1467
|
field_dict["stock_transactions"] = stock_transactions
|
|
1453
1468
|
if erp_project_settings is not UNSET:
|
|
1454
1469
|
field_dict["erpProjectSettings"] = erp_project_settings
|
|
1470
|
+
if erp_user_table_preferences is not UNSET:
|
|
1471
|
+
field_dict["erpUserTablePreferences"] = erp_user_table_preferences
|
|
1455
1472
|
if erp_module_gates is not UNSET:
|
|
1456
1473
|
field_dict["erpModuleGates"] = erp_module_gates
|
|
1457
1474
|
if erp_status_mappings is not UNSET:
|
|
@@ -1585,6 +1602,7 @@ class Project:
|
|
|
1585
1602
|
from ..models.erp_module_gate import ERPModuleGate
|
|
1586
1603
|
from ..models.erp_project_settings import ERPProjectSettings
|
|
1587
1604
|
from ..models.erp_status_mapping import ERPStatusMapping
|
|
1605
|
+
from ..models.erp_user_table_preference import ERPUserTablePreference
|
|
1588
1606
|
from ..models.goods_receipt import GoodsReceipt
|
|
1589
1607
|
from ..models.goods_receipt_line import GoodsReceiptLine
|
|
1590
1608
|
from ..models.import_job import ImportJob
|
|
@@ -2464,6 +2482,30 @@ class Project:
|
|
|
2464
2482
|
|
|
2465
2483
|
erp_project_settings = _parse_erp_project_settings(d.pop("erpProjectSettings", UNSET))
|
|
2466
2484
|
|
|
2485
|
+
def _parse_erp_user_table_preferences(data: object) -> list[ERPUserTablePreference] | None | Unset:
|
|
2486
|
+
if data is None:
|
|
2487
|
+
return data
|
|
2488
|
+
if isinstance(data, Unset):
|
|
2489
|
+
return data
|
|
2490
|
+
try:
|
|
2491
|
+
if not isinstance(data, list):
|
|
2492
|
+
raise TypeError()
|
|
2493
|
+
erp_user_table_preferences_type_0 = []
|
|
2494
|
+
_erp_user_table_preferences_type_0 = data
|
|
2495
|
+
for erp_user_table_preferences_type_0_item_data in _erp_user_table_preferences_type_0:
|
|
2496
|
+
erp_user_table_preferences_type_0_item = ERPUserTablePreference.from_dict(
|
|
2497
|
+
erp_user_table_preferences_type_0_item_data
|
|
2498
|
+
)
|
|
2499
|
+
|
|
2500
|
+
erp_user_table_preferences_type_0.append(erp_user_table_preferences_type_0_item)
|
|
2501
|
+
|
|
2502
|
+
return erp_user_table_preferences_type_0
|
|
2503
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
2504
|
+
pass
|
|
2505
|
+
return cast(list[ERPUserTablePreference] | None | Unset, data)
|
|
2506
|
+
|
|
2507
|
+
erp_user_table_preferences = _parse_erp_user_table_preferences(d.pop("erpUserTablePreferences", UNSET))
|
|
2508
|
+
|
|
2467
2509
|
def _parse_erp_module_gates(data: object) -> list[ERPModuleGate] | None | Unset:
|
|
2468
2510
|
if data is None:
|
|
2469
2511
|
return data
|
|
@@ -3678,6 +3720,7 @@ class Project:
|
|
|
3678
3720
|
stock_balances=stock_balances,
|
|
3679
3721
|
stock_transactions=stock_transactions,
|
|
3680
3722
|
erp_project_settings=erp_project_settings,
|
|
3723
|
+
erp_user_table_preferences=erp_user_table_preferences,
|
|
3681
3724
|
erp_module_gates=erp_module_gates,
|
|
3682
3725
|
erp_status_mappings=erp_status_mappings,
|
|
3683
3726
|
sales_invoices=sales_invoices,
|
|
@@ -34,9 +34,7 @@ class SearchPurchaseOrdersRequest:
|
|
|
34
34
|
reference_ids (list[str] | None | Unset):
|
|
35
35
|
sort_by (None | str | Unset):
|
|
36
36
|
sort_direction (None | SearchPurchaseOrdersRequestSortDirectionType0 | Unset):
|
|
37
|
-
|
|
38
|
-
filter_operator (None | str | Unset):
|
|
39
|
-
filter_value (None | str | Unset):
|
|
37
|
+
filters (None | str | Unset):
|
|
40
38
|
limit (int | Unset): Default: 50.
|
|
41
39
|
offset (int | Unset): Default: 0.
|
|
42
40
|
"""
|
|
@@ -49,9 +47,7 @@ class SearchPurchaseOrdersRequest:
|
|
|
49
47
|
reference_ids: list[str] | None | Unset = UNSET
|
|
50
48
|
sort_by: None | str | Unset = UNSET
|
|
51
49
|
sort_direction: None | SearchPurchaseOrdersRequestSortDirectionType0 | Unset = UNSET
|
|
52
|
-
|
|
53
|
-
filter_operator: None | str | Unset = UNSET
|
|
54
|
-
filter_value: None | str | Unset = UNSET
|
|
50
|
+
filters: None | str | Unset = UNSET
|
|
55
51
|
limit: int | Unset = 50
|
|
56
52
|
offset: int | Unset = 0
|
|
57
53
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
@@ -118,23 +114,11 @@ class SearchPurchaseOrdersRequest:
|
|
|
118
114
|
else:
|
|
119
115
|
sort_direction = self.sort_direction
|
|
120
116
|
|
|
121
|
-
|
|
122
|
-
if isinstance(self.
|
|
123
|
-
|
|
117
|
+
filters: None | str | Unset
|
|
118
|
+
if isinstance(self.filters, Unset):
|
|
119
|
+
filters = UNSET
|
|
124
120
|
else:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
filter_operator: None | str | Unset
|
|
128
|
-
if isinstance(self.filter_operator, Unset):
|
|
129
|
-
filter_operator = UNSET
|
|
130
|
-
else:
|
|
131
|
-
filter_operator = self.filter_operator
|
|
132
|
-
|
|
133
|
-
filter_value: None | str | Unset
|
|
134
|
-
if isinstance(self.filter_value, Unset):
|
|
135
|
-
filter_value = UNSET
|
|
136
|
-
else:
|
|
137
|
-
filter_value = self.filter_value
|
|
121
|
+
filters = self.filters
|
|
138
122
|
|
|
139
123
|
limit = self.limit
|
|
140
124
|
|
|
@@ -159,12 +143,8 @@ class SearchPurchaseOrdersRequest:
|
|
|
159
143
|
field_dict["sort_by"] = sort_by
|
|
160
144
|
if sort_direction is not UNSET:
|
|
161
145
|
field_dict["sort_direction"] = sort_direction
|
|
162
|
-
if
|
|
163
|
-
field_dict["
|
|
164
|
-
if filter_operator is not UNSET:
|
|
165
|
-
field_dict["filter_operator"] = filter_operator
|
|
166
|
-
if filter_value is not UNSET:
|
|
167
|
-
field_dict["filter_value"] = filter_value
|
|
146
|
+
if filters is not UNSET:
|
|
147
|
+
field_dict["filters"] = filters
|
|
168
148
|
if limit is not UNSET:
|
|
169
149
|
field_dict["limit"] = limit
|
|
170
150
|
if offset is not UNSET:
|
|
@@ -296,32 +276,14 @@ class SearchPurchaseOrdersRequest:
|
|
|
296
276
|
|
|
297
277
|
sort_direction = _parse_sort_direction(d.pop("sort_direction", UNSET))
|
|
298
278
|
|
|
299
|
-
def
|
|
300
|
-
if data is None:
|
|
301
|
-
return data
|
|
302
|
-
if isinstance(data, Unset):
|
|
303
|
-
return data
|
|
304
|
-
return cast(None | str | Unset, data)
|
|
305
|
-
|
|
306
|
-
filter_column = _parse_filter_column(d.pop("filter_column", UNSET))
|
|
307
|
-
|
|
308
|
-
def _parse_filter_operator(data: object) -> None | str | Unset:
|
|
309
|
-
if data is None:
|
|
310
|
-
return data
|
|
311
|
-
if isinstance(data, Unset):
|
|
312
|
-
return data
|
|
313
|
-
return cast(None | str | Unset, data)
|
|
314
|
-
|
|
315
|
-
filter_operator = _parse_filter_operator(d.pop("filter_operator", UNSET))
|
|
316
|
-
|
|
317
|
-
def _parse_filter_value(data: object) -> None | str | Unset:
|
|
279
|
+
def _parse_filters(data: object) -> None | str | Unset:
|
|
318
280
|
if data is None:
|
|
319
281
|
return data
|
|
320
282
|
if isinstance(data, Unset):
|
|
321
283
|
return data
|
|
322
284
|
return cast(None | str | Unset, data)
|
|
323
285
|
|
|
324
|
-
|
|
286
|
+
filters = _parse_filters(d.pop("filters", UNSET))
|
|
325
287
|
|
|
326
288
|
limit = d.pop("limit", UNSET)
|
|
327
289
|
|
|
@@ -336,9 +298,7 @@ class SearchPurchaseOrdersRequest:
|
|
|
336
298
|
reference_ids=reference_ids,
|
|
337
299
|
sort_by=sort_by,
|
|
338
300
|
sort_direction=sort_direction,
|
|
339
|
-
|
|
340
|
-
filter_operator=filter_operator,
|
|
341
|
-
filter_value=filter_value,
|
|
301
|
+
filters=filters,
|
|
342
302
|
limit=limit,
|
|
343
303
|
offset=offset,
|
|
344
304
|
)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
|
|
8
|
+
from ..types import UNSET, Unset
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ..models.update_erp_user_table_preference_request_columnlabels import (
|
|
12
|
+
UpdateERPUserTablePreferenceRequestColumnlabels,
|
|
13
|
+
)
|
|
14
|
+
from ..models.update_erp_user_table_preference_request_columnwidths import (
|
|
15
|
+
UpdateERPUserTablePreferenceRequestColumnwidths,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
T = TypeVar("T", bound="UpdateERPUserTablePreferenceRequest")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class UpdateERPUserTablePreferenceRequest:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
visible_column_ids (list[str]):
|
|
27
|
+
column_widths (UpdateERPUserTablePreferenceRequestColumnwidths | Unset):
|
|
28
|
+
column_labels (UpdateERPUserTablePreferenceRequestColumnlabels | Unset):
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
visible_column_ids: list[str]
|
|
32
|
+
column_widths: UpdateERPUserTablePreferenceRequestColumnwidths | Unset = UNSET
|
|
33
|
+
column_labels: UpdateERPUserTablePreferenceRequestColumnlabels | Unset = UNSET
|
|
34
|
+
|
|
35
|
+
def to_dict(self) -> dict[str, Any]:
|
|
36
|
+
visible_column_ids = self.visible_column_ids
|
|
37
|
+
|
|
38
|
+
column_widths: dict[str, Any] | Unset = UNSET
|
|
39
|
+
if not isinstance(self.column_widths, Unset):
|
|
40
|
+
column_widths = self.column_widths.to_dict()
|
|
41
|
+
|
|
42
|
+
column_labels: dict[str, Any] | Unset = UNSET
|
|
43
|
+
if not isinstance(self.column_labels, Unset):
|
|
44
|
+
column_labels = self.column_labels.to_dict()
|
|
45
|
+
|
|
46
|
+
field_dict: dict[str, Any] = {}
|
|
47
|
+
|
|
48
|
+
field_dict.update(
|
|
49
|
+
{
|
|
50
|
+
"visibleColumnIds": visible_column_ids,
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
if column_widths is not UNSET:
|
|
54
|
+
field_dict["columnWidths"] = column_widths
|
|
55
|
+
if column_labels is not UNSET:
|
|
56
|
+
field_dict["columnLabels"] = column_labels
|
|
57
|
+
|
|
58
|
+
return field_dict
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
62
|
+
from ..models.update_erp_user_table_preference_request_columnlabels import (
|
|
63
|
+
UpdateERPUserTablePreferenceRequestColumnlabels,
|
|
64
|
+
)
|
|
65
|
+
from ..models.update_erp_user_table_preference_request_columnwidths import (
|
|
66
|
+
UpdateERPUserTablePreferenceRequestColumnwidths,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
d = dict(src_dict)
|
|
70
|
+
visible_column_ids = cast(list[str], d.pop("visibleColumnIds"))
|
|
71
|
+
|
|
72
|
+
_column_widths = d.pop("columnWidths", UNSET)
|
|
73
|
+
column_widths: UpdateERPUserTablePreferenceRequestColumnwidths | Unset
|
|
74
|
+
if isinstance(_column_widths, Unset):
|
|
75
|
+
column_widths = UNSET
|
|
76
|
+
else:
|
|
77
|
+
column_widths = UpdateERPUserTablePreferenceRequestColumnwidths.from_dict(_column_widths)
|
|
78
|
+
|
|
79
|
+
_column_labels = d.pop("columnLabels", UNSET)
|
|
80
|
+
column_labels: UpdateERPUserTablePreferenceRequestColumnlabels | Unset
|
|
81
|
+
if isinstance(_column_labels, Unset):
|
|
82
|
+
column_labels = UNSET
|
|
83
|
+
else:
|
|
84
|
+
column_labels = UpdateERPUserTablePreferenceRequestColumnlabels.from_dict(_column_labels)
|
|
85
|
+
|
|
86
|
+
update_erp_user_table_preference_request = cls(
|
|
87
|
+
visible_column_ids=visible_column_ids,
|
|
88
|
+
column_widths=column_widths,
|
|
89
|
+
column_labels=column_labels,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
return update_erp_user_table_preference_request
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="UpdateERPUserTablePreferenceRequestColumnlabels")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class UpdateERPUserTablePreferenceRequestColumnlabels:
|
|
14
|
+
""" """
|
|
15
|
+
|
|
16
|
+
additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
|
|
17
|
+
|
|
18
|
+
def to_dict(self) -> dict[str, Any]:
|
|
19
|
+
|
|
20
|
+
field_dict: dict[str, Any] = {}
|
|
21
|
+
field_dict.update(self.additional_properties)
|
|
22
|
+
|
|
23
|
+
return field_dict
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
27
|
+
d = dict(src_dict)
|
|
28
|
+
update_erp_user_table_preference_request_columnlabels = cls()
|
|
29
|
+
|
|
30
|
+
update_erp_user_table_preference_request_columnlabels.additional_properties = d
|
|
31
|
+
return update_erp_user_table_preference_request_columnlabels
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def additional_keys(self) -> list[str]:
|
|
35
|
+
return list(self.additional_properties.keys())
|
|
36
|
+
|
|
37
|
+
def __getitem__(self, key: str) -> str:
|
|
38
|
+
return self.additional_properties[key]
|
|
39
|
+
|
|
40
|
+
def __setitem__(self, key: str, value: str) -> None:
|
|
41
|
+
self.additional_properties[key] = value
|
|
42
|
+
|
|
43
|
+
def __delitem__(self, key: str) -> None:
|
|
44
|
+
del self.additional_properties[key]
|
|
45
|
+
|
|
46
|
+
def __contains__(self, key: str) -> bool:
|
|
47
|
+
return key in self.additional_properties
|